2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
22 package org.openecomp.sdc.ci.tests.execute.general;
24 import static org.testng.AssertJUnit.assertEquals;
25 import static org.testng.AssertJUnit.assertFalse;
26 import static org.testng.AssertJUnit.assertTrue;
28 import java.util.ArrayList;
29 import java.util.HashMap;
30 import java.util.List;
33 import org.apache.commons.codec.binary.Base64;
34 import org.junit.Rule;
35 import org.junit.rules.TestName;
36 import org.openecomp.sdc.be.dao.api.ActionStatus;
37 import org.openecomp.sdc.be.datatypes.elements.ConsumerDataDefinition;
38 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
39 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
40 import org.openecomp.sdc.be.model.Resource;
41 import org.openecomp.sdc.be.model.Service;
42 import org.openecomp.sdc.be.model.User;
43 import org.openecomp.sdc.ci.tests.api.ComponentBaseTest;
44 import org.openecomp.sdc.ci.tests.api.Urls;
45 import org.openecomp.sdc.ci.tests.datatypes.ArtifactReqDetails;
46 import org.openecomp.sdc.ci.tests.datatypes.ComponentInstanceReqDetails;
47 import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails;
48 import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails;
49 import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum;
50 import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum;
51 import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedAuthenticationAudit;
52 import org.openecomp.sdc.ci.tests.datatypes.http.HttpHeaderEnum;
53 import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse;
54 import org.openecomp.sdc.ci.tests.utils.DbUtils;
55 import org.openecomp.sdc.ci.tests.utils.Utils;
56 import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils;
57 import org.openecomp.sdc.ci.tests.utils.general.ElementFactory;
58 import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils;
59 import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils;
60 import org.openecomp.sdc.ci.tests.utils.rest.ComponentInstanceRestUtils;
61 import org.openecomp.sdc.ci.tests.utils.rest.ConsumerRestUtils;
62 import org.openecomp.sdc.ci.tests.utils.rest.LifecycleRestUtils;
63 import org.openecomp.sdc.ci.tests.utils.validation.AuditValidationUtils;
64 import org.openecomp.sdc.ci.tests.utils.validation.ErrorValidationUtils;
65 import org.openecomp.sdc.common.util.ValidationUtils;
66 import org.testng.AssertJUnit;
67 import org.testng.annotations.AfterMethod;
68 import org.testng.annotations.BeforeMethod;
69 import org.testng.annotations.Test;
71 public class BasicHttpAuthenticationTest extends ComponentBaseTest {
73 protected static final String AUTH_FAILED_INVALID_AUTHENTICATION_HEADER = "AUTH_FAILED_INVALID_AUTHENTICATION_HEADER";
75 protected static final String AUTH_SUCCESS = "AUTH_SUCCESS";
77 protected static final String AUTH_FAILED_INVALID_PASSWORD = "AUTH_FAILED_INVALID_PASSWORD";
79 protected static final String AUTH_FAILED_USER_NOT_FOUND = "AUTH_FAILED_USER_NOT_FOUND";
81 protected static final String AUTH_REQUIRED = "AUTH_REQUIRED";
83 protected static final String WWW_AUTHENTICATE = "WWW-Authenticate";
85 // user ci password 123456
86 // protected final String authorizationHeader = "Basic Y2k6MTIzNDU2";
87 // user ci password 123456
88 protected final String USER = "ci";
90 protected final String PASSWORD = "123456";
92 protected final String SALT = "2a1f887d607d4515d4066fe0f5452a50";
94 protected final String HASHED_PASSWORD = "0a0dc557c3bf594b1a48030e3e99227580168b21f44e285c69740b8d5b13e33b";
96 protected User sdncAdminUserDetails;
98 protected ConsumerDataDefinition consumerDataDefinition;
99 protected ResourceReqDetails resourceDetails;
100 protected ServiceReqDetails serviceDetails;
101 protected User sdncUserDetails;
103 protected ArtifactReqDetails deploymentArtifact;
105 protected ExpectedAuthenticationAudit expectedAuthenticationAudit;
107 protected final String auditAction = "HttpAuthentication";
109 protected String expectedDownloadServiceUrl;
110 protected String expectedDownloadResourceUrl;
111 protected ComponentInstanceReqDetails componentInstanceReqDetails;
114 public static TestName name = new TestName();
116 public BasicHttpAuthenticationTest() {
117 super(name, BasicHttpAuthenticationTest.class.getName());
121 public void init() throws Exception {
123 sdncUserDetails = ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER);
124 Resource resourceObject = AtomicOperationUtils
125 .createResourceByType(ResourceTypeEnum.VFC, UserRoleEnum.DESIGNER, true).left().value();
126 resourceDetails = new ResourceReqDetails(resourceObject);
127 Service serviceObject = AtomicOperationUtils.createDefaultService(UserRoleEnum.DESIGNER, true).left().value();
128 serviceDetails = new ServiceReqDetails(serviceObject);
130 deploymentArtifact = ElementFactory.getDefaultDeploymentArtifactForType(ArtifactTypeEnum.HEAT.getType());
131 RestResponse response = ArtifactRestUtils.addInformationalArtifactToResource(deploymentArtifact,
132 sdncUserDetails, resourceDetails.getUniqueId());
133 AssertJUnit.assertTrue("add HEAT artifact to resource request returned status:" + response.getErrorCode(),
134 response.getErrorCode() == 200);
136 componentInstanceReqDetails = ElementFactory.getDefaultComponentInstance();
137 // certified resource
138 response = LifecycleRestUtils.certifyResource(resourceDetails);
139 AssertJUnit.assertTrue("certify resource request returned status:" + response.getErrorCode(),
140 response.getErrorCode() == 200);
142 // add resource instance with HEAT deployment artifact to the service
143 componentInstanceReqDetails.setComponentUid(resourceDetails.getUniqueId());
144 response = ComponentInstanceRestUtils.createComponentInstance(componentInstanceReqDetails, sdncUserDetails,
145 serviceDetails.getUniqueId(), ComponentTypeEnum.SERVICE);
146 AssertJUnit.assertTrue("response code is not 201, returned: " + response.getErrorCode(),
147 response.getErrorCode() == 201);
148 expectedAuthenticationAudit = new ExpectedAuthenticationAudit();
150 // RestResponse addDeploymentArtifactResponse =
151 // ArtifactRestUtils.addInformationalArtifactToService(deploymentArtifact,
152 // sdncUserDetails, serviceDetails.getUniqueId());
153 // assertEquals("didn't succeed to upload deployment artifact", 200,
154 // addDeploymentArtifactResponse.getErrorCode().intValue());
157 // String.format(Urls.DISTRIB_DOWNLOAD_SERVICE_ARTIFACT_RELATIVE_URL,
158 // ValidationUtils.convertToSystemName(serviceDetails.getServiceName()),
159 // serviceDetails.getVersion(),
160 // ValidationUtils.normalizeFileName(deploymentArtifact.getArtifactName()));
162 expectedDownloadResourceUrl = String.format(Urls.DISTRIB_DOWNLOAD_RESOURCE_ARTIFACT_RELATIVE_URL,
163 ValidationUtils.convertToSystemName(serviceDetails.getName()), serviceDetails.getVersion(),
164 ValidationUtils.convertToSystemName(resourceDetails.getName()), resourceDetails.getVersion(),
165 ValidationUtils.normalizeFileName(deploymentArtifact.getArtifactName()));
166 expectedDownloadResourceUrl = expectedDownloadResourceUrl.substring("/sdc/".length(),
167 expectedDownloadResourceUrl.length());
169 expectedDownloadServiceUrl = String.format(Urls.DISTRIB_DOWNLOAD_SERVICE_ARTIFACT_RELATIVE_URL,
170 ValidationUtils.convertToSystemName(serviceDetails.getName()), serviceDetails.getVersion(),
171 ValidationUtils.normalizeFileName(deploymentArtifact.getArtifactName()));
172 expectedDownloadServiceUrl = expectedDownloadServiceUrl.substring("/sdc/".length(),
173 expectedDownloadServiceUrl.length());
175 sdncAdminUserDetails = ElementFactory.getDefaultUser(UserRoleEnum.ADMIN);
176 consumerDataDefinition = createConsumer();
177 RestResponse deleteResponse = ConsumerRestUtils.deleteConsumer(consumerDataDefinition, sdncAdminUserDetails);
178 BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
181 RestResponse createResponse = ConsumerRestUtils.createConsumer(consumerDataDefinition, sdncAdminUserDetails);
182 BaseRestUtils.checkCreateResponse(createResponse);
187 public void tearDown() throws Exception {
188 RestResponse deleteResponse = ConsumerRestUtils.deleteConsumer(consumerDataDefinition, sdncAdminUserDetails);
189 BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
194 public void sendAuthenticatedRequestTest_success() throws Exception, Exception {
195 DbUtils.cleanAllAudits();
196 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(USER, PASSWORD);
197 // RestResponse restResponse =
198 // ArtifactRestUtils.downloadServiceArtifact(serviceDetails,
199 // deploymentArtifact, sdncUserDetails, authorizationHeader);
200 RestResponse restResponse = ArtifactRestUtils.downloadResourceArtifact(serviceDetails, resourceDetails,
201 deploymentArtifact, sdncUserDetails, authorizationHeader);
202 AssertJUnit.assertEquals("Check response code after download artifact", 200,
203 restResponse.getErrorCode().intValue());
204 AssertJUnit.assertFalse(restResponse.getHeaderFields().containsKey(HttpHeaderEnum.WWW_AUTHENTICATE.getValue()));
206 validateAuditAuthentication(USER, AUTH_SUCCESS, ComponentTypeEnum.RESOURCE);
210 protected void validateAuditAuthentication(String userName, String AuthStatus, ComponentTypeEnum compType)
212 if (compType.equals(ComponentTypeEnum.RESOURCE)) {
213 expectedAuthenticationAudit = new ExpectedAuthenticationAudit(expectedDownloadResourceUrl, userName,
214 auditAction, AuthStatus);
216 expectedAuthenticationAudit = new ExpectedAuthenticationAudit(expectedDownloadServiceUrl, userName,
217 auditAction, AuthStatus);
219 AuditValidationUtils.validateAuthenticationAudit(expectedAuthenticationAudit);
222 protected ConsumerDataDefinition createConsumer() {
223 ConsumerDataDefinition consumer = new ConsumerDataDefinition();
224 consumer.setConsumerName(USER);
225 consumer.setConsumerSalt(SALT);
226 consumer.setConsumerPassword(HASHED_PASSWORD);
232 public void sendAuthenticatedRequestWithoutHeadersTest() throws Exception, Exception {
233 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
234 sdncUserDetails, new HashMap<String, String>());
235 assertEquals("Check response code after download artifact", 401, restResponse.getErrorCode().intValue());
236 ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_REQUIRED.name(), new ArrayList<String>(),
237 restResponse.getResponse());
238 assertTrue(restResponse.getHeaderFields().containsKey(WWW_AUTHENTICATE));
239 List<String> getAuthenticateHeader = restResponse.getHeaderFields().get(WWW_AUTHENTICATE);
240 assertEquals("www-authenticate header contains more then one value", 1, getAuthenticateHeader.size());
241 assertTrue(getAuthenticateHeader.get(0).equals("Basic realm=" + "\"ASDC\""));
243 validateAuditAuthentication("", AUTH_REQUIRED, ComponentTypeEnum.SERVICE);
247 public void sendAuthenticatedRequestTest_userIsNotProvsioned() throws Exception, Exception {
248 String userName = "shay";
249 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(userName, "123456");
250 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
251 sdncUserDetails, authorizationHeader);
252 assertEquals("Check response code after download artifact", 403, restResponse.getErrorCode().intValue());
253 ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_FAILED.name(), new ArrayList<String>(),
254 restResponse.getResponse());
255 assertFalse(restResponse.getHeaderFields().containsKey(WWW_AUTHENTICATE));
257 validateAuditAuthentication(userName, AUTH_FAILED_USER_NOT_FOUND, ComponentTypeEnum.SERVICE);
261 public void sendAuthenticatedRequestTest_userIsNull() throws Exception, Exception {
262 String userName = "";
263 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(userName, "123456");
264 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
265 sdncUserDetails, authorizationHeader);
266 assertEquals("Check response code after download artifact", 403, restResponse.getErrorCode().intValue());
267 ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_FAILED.name(), new ArrayList<String>(),
268 restResponse.getResponse());
269 assertFalse(restResponse.getHeaderFields().containsKey(WWW_AUTHENTICATE));
271 validateAuditAuthentication(userName, AUTH_FAILED_USER_NOT_FOUND, ComponentTypeEnum.SERVICE);
275 public void sendAuthenticatedRequestTest_passwordIsNull() throws Exception, Exception {
276 String userName = "ci";
277 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(userName, "");
278 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
279 sdncUserDetails, authorizationHeader);
280 assertEquals("Check response code after download artifact", 403, restResponse.getErrorCode().intValue());
281 ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_FAILED.name(), new ArrayList<String>(),
282 restResponse.getResponse());
283 assertFalse(restResponse.getHeaderFields().containsKey(WWW_AUTHENTICATE));
285 validateAuditAuthentication(userName, AUTH_FAILED_INVALID_PASSWORD, ComponentTypeEnum.SERVICE);
289 public void sendAuthenticatedRequestTest_passowrdIsNotValidated() throws Exception, Exception {
290 String userCi = "ci";
291 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(userCi, "98765");
292 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
293 sdncUserDetails, authorizationHeader);
294 assertEquals("Check response code after download artifact", 403, restResponse.getErrorCode().intValue());
295 ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_FAILED.name(), new ArrayList<String>(),
296 restResponse.getResponse());
297 assertFalse(restResponse.getHeaderFields().containsKey(HttpHeaderEnum.WWW_AUTHENTICATE.getValue()));
299 validateAuditAuthentication(userCi, AUTH_FAILED_INVALID_PASSWORD, ComponentTypeEnum.SERVICE);
303 public void sendAuthenticatedRequestTest_InvalidHeader() throws Exception, Exception {
304 String userCredentials = USER + ":" + PASSWORD;
305 byte[] encodeBase64 = Base64.encodeBase64(userCredentials.getBytes());
306 String encodedUserCredentials = new String(encodeBase64);
307 Map<String, String> authorizationHeader = new HashMap<String, String>();
308 authorizationHeader.put(HttpHeaderEnum.AUTHORIZATION.getValue(), encodedUserCredentials);
309 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
310 sdncUserDetails, authorizationHeader);
311 assertEquals("Check response code after download artifact", 400, restResponse.getErrorCode().intValue());
312 assertFalse(restResponse.getHeaderFields().containsKey(HttpHeaderEnum.WWW_AUTHENTICATE.getValue()));
314 validateAuditAuthentication("", AUTH_FAILED_INVALID_AUTHENTICATION_HEADER, ComponentTypeEnum.SERVICE);
317 @Test(enabled = false)
318 public void sendTwoAuthenticatedRequestsTest() throws Exception, Exception {
319 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(USER, PASSWORD);
320 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
321 sdncUserDetails, authorizationHeader);
322 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
324 RestResponse secondRestResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
325 sdncUserDetails, authorizationHeader);
326 assertEquals("Check response code after second download artifact", 200,
327 secondRestResponse.getErrorCode().intValue());
330 @Test(enabled = false)
331 public void sendAuthenticatedRequestTest_userValidation_1() throws Exception, Exception {
333 ConsumerDataDefinition consumer = new ConsumerDataDefinition();
334 consumer.setConsumerName("cI2468");
335 consumer.setConsumerPassword(HASHED_PASSWORD);
336 consumer.setConsumerSalt(SALT);
337 RestResponse deleteResponse = ConsumerRestUtils.deleteConsumer(consumer, sdncAdminUserDetails);
338 BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
340 RestResponse createResponse = ConsumerRestUtils.createConsumer(consumer, sdncAdminUserDetails);
341 BaseRestUtils.checkCreateResponse(createResponse);
343 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(consumer.getConsumerName(),
345 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
346 sdncUserDetails, authorizationHeader);
347 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
349 deleteResponse = ConsumerRestUtils.deleteConsumer(consumer, sdncAdminUserDetails);
350 BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
353 // ECOMP Consumer Name - UTF-8 string up to 255 characters containing the
354 // following characters : ( maybe to limit 4-64 chars ? )
355 // Lowercase characters {a-z}
356 // Uppercase characters {A-Z}
358 // Dash {-}; this character is not supported as the first character in the
360 // Period {.}; this character is not supported as the first character in the
363 // @Ignore("add manually user:password 24-!68:123456 to
364 // users-configuration.yaml in runtime")
365 @Test(enabled = false)
366 public void sendAuthenticatedRequestTest_userValidation_2() throws Exception, Exception {
367 ConsumerDataDefinition consumer = new ConsumerDataDefinition();
368 consumer.setConsumerName("24-!68");
369 consumer.setConsumerPassword(HASHED_PASSWORD);
370 consumer.setConsumerSalt(SALT);
371 RestResponse deleteResponse = ConsumerRestUtils.deleteConsumer(consumer, sdncAdminUserDetails);
372 BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
374 RestResponse createResponse = ConsumerRestUtils.createConsumer(consumer, sdncAdminUserDetails);
375 BaseRestUtils.checkCreateResponse(createResponse);
376 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(consumer.getConsumerName(),
378 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
379 sdncUserDetails, authorizationHeader);
380 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
382 deleteResponse = ConsumerRestUtils.deleteConsumer(consumer, sdncAdminUserDetails);
383 BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
386 // this is invalide becouse we do not use the : any more
387 // @Ignore("can't exectue, yaml file does not allow to enter more then one
388 // colon continuously (\":\") ")
389 @Test(enabled = false)
390 public void sendAuthenticatedRequestTest_userValidation_3() throws Exception, Exception {
391 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader("a:", "123456");
392 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
393 sdncUserDetails, authorizationHeader);
394 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
398 // * ECOMP Consumer Password - expected to be SHA-2 256 encrypted value (
399 // SALT + "real" password ) => maximal length 256 bytes = 32 characters
400 // Before storing/comparing please convert upper case letter to lower.
401 // The "normalized" encrypted password should match the following format :
403 // @Ignore("add manually user:password 2468:123:456 to
404 // users-configuration.yaml in runtime")
405 @Test(enabled = false)
406 public void sendAuthenticatedRequestTest_passwordValidation_1() throws Exception, Exception {
407 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader("A1", "123:456");
408 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
409 sdncUserDetails, authorizationHeader);
410 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
413 // * ECOMP Consumer Password - expected to be SHA-2 256 encrypted value (
414 // SALT + "real" password ) => maximal length 256 bytes = 32 characters
415 // Before storing/comparing please convert upper case letter to lower.
416 // The "normalized" encrypted password should match the following format :
418 @Test(enabled = false)
419 // @Ignore("add manually user:password 2468:Sq123a456B to
420 // users-configuration.yaml in runtime")
421 public void sendAuthenticatedRequestTest_passwordValidation_2() throws Exception, Exception {
422 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader("B2", "Sq123a456B");
423 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
424 sdncUserDetails, authorizationHeader);
425 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
428 // * ECOMP Consumer Password - expected to be SHA-2 256 encrypted value (
429 // SALT + "real" password ) => maximal length 256 bytes = 32 characters
430 // Before storing/comparing please convert upper case letter to lower.
431 // The "normalized" encrypted password should match the following format :
434 // @Ignore("add C3:111T-0-*# to file")
435 public void sendAuthenticatedRequestTest_passwordValidation_3() throws Exception, Exception {
436 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader("C3", "111T-0-*#");
437 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
438 sdncUserDetails, authorizationHeader);
439 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());