83a50baeeb8238178fff4ca15ab82703c49c71b3
[sdc.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 //US505653
22 package org.openecomp.sdc.ci.tests.execute.general;
23
24 import static org.testng.AssertJUnit.assertEquals;
25 import static org.testng.AssertJUnit.assertFalse;
26 import static org.testng.AssertJUnit.assertTrue;
27
28 import java.util.ArrayList;
29 import java.util.HashMap;
30 import java.util.List;
31 import java.util.Map;
32
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.general.AtomicOperationUtils;
56 import org.openecomp.sdc.ci.tests.utils.general.ElementFactory;
57 import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils;
58 import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils;
59 import org.openecomp.sdc.ci.tests.utils.rest.ComponentInstanceRestUtils;
60 import org.openecomp.sdc.ci.tests.utils.rest.ConsumerRestUtils;
61 import org.openecomp.sdc.ci.tests.utils.rest.LifecycleRestUtils;
62 import org.openecomp.sdc.ci.tests.utils.validation.AuditValidationUtils;
63 import org.openecomp.sdc.ci.tests.utils.validation.ErrorValidationUtils;
64 import org.openecomp.sdc.common.util.ValidationUtils;
65 import org.testng.AssertJUnit;
66 import org.testng.annotations.AfterMethod;
67 import org.testng.annotations.BeforeMethod;
68 import org.testng.annotations.Test;
69
70 public class BasicHttpAuthenticationTest extends ComponentBaseTest {
71
72         protected static final String AUTH_FAILED_INVALID_AUTHENTICATION_HEADER = "AUTH_FAILED_INVALID_AUTHENTICATION_HEADER";
73
74         protected static final String AUTH_SUCCESS = "AUTH_SUCCESS";
75
76         protected static final String AUTH_FAILED_INVALID_PASSWORD = "AUTH_FAILED_INVALID_PASSWORD";
77
78         protected static final String AUTH_FAILED_USER_NOT_FOUND = "AUTH_FAILED_USER_NOT_FOUND";
79
80         protected static final String AUTH_REQUIRED = "AUTH_REQUIRED";
81
82         protected static final String WWW_AUTHENTICATE = "WWW-Authenticate";
83
84         // user ci password 123456
85         // protected final String authorizationHeader = "Basic Y2k6MTIzNDU2";
86         // user ci password 123456
87         protected final String USER = "ci";
88
89         protected final String PASSWORD = "123456";
90
91         protected final String SALT = "2a1f887d607d4515d4066fe0f5452a50";
92
93         protected final String HASHED_PASSWORD = "0a0dc557c3bf594b1a48030e3e99227580168b21f44e285c69740b8d5b13e33b";
94
95         protected User sdncAdminUserDetails;
96
97         protected ConsumerDataDefinition consumerDataDefinition;
98         protected ResourceReqDetails resourceDetails;
99         protected ServiceReqDetails serviceDetails;
100         protected User sdncUserDetails;
101
102         protected ArtifactReqDetails deploymentArtifact;
103
104         protected ExpectedAuthenticationAudit expectedAuthenticationAudit;
105
106         protected final String auditAction = "HttpAuthentication";
107
108         protected String expectedDownloadServiceUrl;
109         protected String expectedDownloadResourceUrl;
110         protected ComponentInstanceReqDetails componentInstanceReqDetails;
111
112         @Rule
113         public static TestName name = new TestName();
114
115         public BasicHttpAuthenticationTest() {
116                 super(name, BasicHttpAuthenticationTest.class.getName());
117         }
118
119         @BeforeMethod
120         public void init() throws Exception {
121
122                 sdncUserDetails = ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER);
123                 Resource resourceObject = AtomicOperationUtils.createResourceByType(ResourceTypeEnum.VFC, UserRoleEnum.DESIGNER, true).left().value();
124                 resourceDetails = new ResourceReqDetails(resourceObject);
125                 Service serviceObject = AtomicOperationUtils.createDefaultService(UserRoleEnum.DESIGNER, true).left().value();
126                 serviceDetails = new ServiceReqDetails(serviceObject);
127
128                 deploymentArtifact = ElementFactory.getDefaultDeploymentArtifactForType(ArtifactTypeEnum.HEAT.getType());
129                 RestResponse response = ArtifactRestUtils.addInformationalArtifactToResource(deploymentArtifact, sdncUserDetails, resourceDetails.getUniqueId());
130                 AssertJUnit.assertTrue("add HEAT artifact to resource request returned status:" + response.getErrorCode(), response.getErrorCode() == 200);
131
132                 componentInstanceReqDetails = ElementFactory.getDefaultComponentInstance();
133                 // certified resource
134                 response = LifecycleRestUtils.certifyResource(resourceDetails);
135                 AssertJUnit.assertTrue("certify resource request returned status:" + response.getErrorCode(), response.getErrorCode() == 200);
136
137                 // add resource instance with HEAT deployment artifact to the service
138                 componentInstanceReqDetails.setComponentUid(resourceDetails.getUniqueId());
139                 response = ComponentInstanceRestUtils.createComponentInstance(componentInstanceReqDetails, sdncUserDetails, serviceDetails.getUniqueId(), ComponentTypeEnum.SERVICE);
140                 AssertJUnit.assertTrue("response code is not 201, returned: " + response.getErrorCode(), response.getErrorCode() == 201);
141                 expectedAuthenticationAudit = new ExpectedAuthenticationAudit();
142
143                 // RestResponse addDeploymentArtifactResponse =
144                 // ArtifactRestUtils.addInformationalArtifactToService(deploymentArtifact,
145                 // sdncUserDetails, serviceDetails.getUniqueId());
146                 // assertEquals("didn't succeed to upload deployment artifact", 200,
147                 // addDeploymentArtifactResponse.getErrorCode().intValue());
148                 //
149                 // downloadUrl =
150                 // String.format(Urls.DISTRIB_DOWNLOAD_SERVICE_ARTIFACT_RELATIVE_URL,
151                 // ValidationUtils.convertToSystemName(serviceDetails.getServiceName()),
152                 // serviceDetails.getVersion(),
153                 // ValidationUtils.normalizeFileName(deploymentArtifact.getArtifactName()));
154
155                 expectedDownloadResourceUrl = String.format(Urls.DISTRIB_DOWNLOAD_RESOURCE_ARTIFACT_RELATIVE_URL, ValidationUtils.convertToSystemName(serviceDetails.getName()), serviceDetails.getVersion(),
156                                 ValidationUtils.convertToSystemName(resourceDetails.getName()), resourceDetails.getVersion(), ValidationUtils.normalizeFileName(deploymentArtifact.getArtifactName()));
157                 expectedDownloadResourceUrl = expectedDownloadResourceUrl.substring("/asdc/".length(), expectedDownloadResourceUrl.length());
158
159                 expectedDownloadServiceUrl = String.format(Urls.DISTRIB_DOWNLOAD_SERVICE_ARTIFACT_RELATIVE_URL, ValidationUtils.convertToSystemName(serviceDetails.getName()), serviceDetails.getVersion(),
160                                 ValidationUtils.normalizeFileName(deploymentArtifact.getArtifactName()));
161                 expectedDownloadServiceUrl = expectedDownloadServiceUrl.substring("/asdc/".length(), expectedDownloadServiceUrl.length());
162
163                 sdncAdminUserDetails = ElementFactory.getDefaultUser(UserRoleEnum.ADMIN);
164                 consumerDataDefinition = createConsumer();
165                 RestResponse deleteResponse = ConsumerRestUtils.deleteConsumer(consumerDataDefinition, sdncAdminUserDetails);
166                 BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
167                 ;
168
169                 RestResponse createResponse = ConsumerRestUtils.createConsumer(consumerDataDefinition, sdncAdminUserDetails);
170                 BaseRestUtils.checkCreateResponse(createResponse);
171
172         }
173
174         @AfterMethod
175         public void tearDown() throws Exception {
176                 RestResponse deleteResponse = ConsumerRestUtils.deleteConsumer(consumerDataDefinition, sdncAdminUserDetails);
177                 BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
178                 ;
179         }
180
181         @Test
182         public void sendAuthenticatedRequestTest_success() throws Exception, Exception {
183                 DbUtils.cleanAllAudits();
184                 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(USER, PASSWORD);
185                 // RestResponse restResponse =
186                 // ArtifactRestUtils.downloadServiceArtifact(serviceDetails,
187                 // deploymentArtifact, sdncUserDetails, authorizationHeader);
188                 RestResponse restResponse = ArtifactRestUtils.downloadResourceArtifact(serviceDetails, resourceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
189                 AssertJUnit.assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
190                 AssertJUnit.assertFalse(restResponse.getHeaderFields().containsKey(HttpHeaderEnum.WWW_AUTHENTICATE.getValue()));
191
192                 validateAuditAuthentication(USER, AUTH_SUCCESS, ComponentTypeEnum.RESOURCE);
193
194         }
195
196         protected void validateAuditAuthentication(String userName, String AuthStatus, ComponentTypeEnum compType) throws Exception {
197                 if (compType.equals(ComponentTypeEnum.RESOURCE)) {
198                         expectedAuthenticationAudit = new ExpectedAuthenticationAudit(expectedDownloadResourceUrl, userName, auditAction, AuthStatus);
199                 } else {
200                         expectedAuthenticationAudit = new ExpectedAuthenticationAudit(expectedDownloadServiceUrl, userName, auditAction, AuthStatus);
201                 }
202                 AuditValidationUtils.validateAuthenticationAudit(expectedAuthenticationAudit);
203         }
204
205         protected ConsumerDataDefinition createConsumer() {
206                 ConsumerDataDefinition consumer = new ConsumerDataDefinition();
207                 consumer.setConsumerName(USER);
208                 consumer.setConsumerSalt(SALT);
209                 consumer.setConsumerPassword(HASHED_PASSWORD);
210                 return consumer;
211
212         }
213
214         @Test
215         public void sendAuthenticatedRequestWithoutHeadersTest() throws Exception, Exception {
216                 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, new HashMap<String, String>());
217                 assertEquals("Check response code after download artifact", 401, restResponse.getErrorCode().intValue());
218                 ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_REQUIRED.name(), new ArrayList<String>(), restResponse.getResponse());
219                 assertTrue(restResponse.getHeaderFields().containsKey(WWW_AUTHENTICATE));
220                 List<String> getAuthenticateHeader = restResponse.getHeaderFields().get(WWW_AUTHENTICATE);
221                 assertEquals("www-authenticate header contains more then one value", 1, getAuthenticateHeader.size());
222                 assertTrue(getAuthenticateHeader.get(0).equals("Basic realm=" + "\"ASDC\""));
223
224                 validateAuditAuthentication("", AUTH_REQUIRED, ComponentTypeEnum.SERVICE);
225         }
226
227         @Test
228         public void sendAuthenticatedRequestTest_userIsNotProvsioned() throws Exception, Exception {
229                 String userName = "shay";
230                 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(userName, "123456");
231                 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
232                 assertEquals("Check response code after download artifact", 403, restResponse.getErrorCode().intValue());
233                 ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_FAILED.name(), new ArrayList<String>(), restResponse.getResponse());
234                 assertFalse(restResponse.getHeaderFields().containsKey(WWW_AUTHENTICATE));
235
236                 validateAuditAuthentication(userName, AUTH_FAILED_USER_NOT_FOUND, ComponentTypeEnum.SERVICE);
237         }
238
239         @Test
240         public void sendAuthenticatedRequestTest_userIsNull() throws Exception, Exception {
241                 String userName = "";
242                 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(userName, "123456");
243                 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
244                 assertEquals("Check response code after download artifact", 403, restResponse.getErrorCode().intValue());
245                 ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_FAILED.name(), new ArrayList<String>(), restResponse.getResponse());
246                 assertFalse(restResponse.getHeaderFields().containsKey(WWW_AUTHENTICATE));
247
248                 validateAuditAuthentication(userName, AUTH_FAILED_USER_NOT_FOUND, ComponentTypeEnum.SERVICE);
249         }
250
251         @Test
252         public void sendAuthenticatedRequestTest_passwordIsNull() throws Exception, Exception {
253                 String userName = "ci";
254                 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(userName, "");
255                 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
256                 assertEquals("Check response code after download artifact", 403, restResponse.getErrorCode().intValue());
257                 ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_FAILED.name(), new ArrayList<String>(), restResponse.getResponse());
258                 assertFalse(restResponse.getHeaderFields().containsKey(WWW_AUTHENTICATE));
259
260                 validateAuditAuthentication(userName, AUTH_FAILED_INVALID_PASSWORD, ComponentTypeEnum.SERVICE);
261         }
262
263         @Test
264         public void sendAuthenticatedRequestTest_passowrdIsNotValidated() throws Exception, Exception {
265                 String userCi = "ci";
266                 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(userCi, "98765");
267                 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
268                 assertEquals("Check response code after download artifact", 403, restResponse.getErrorCode().intValue());
269                 ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_FAILED.name(), new ArrayList<String>(), restResponse.getResponse());
270                 assertFalse(restResponse.getHeaderFields().containsKey(HttpHeaderEnum.WWW_AUTHENTICATE.getValue()));
271
272                 validateAuditAuthentication(userCi, AUTH_FAILED_INVALID_PASSWORD, ComponentTypeEnum.SERVICE);
273         }
274
275         @Test
276         public void sendAuthenticatedRequestTest_InvalidHeader() throws Exception, Exception {
277                 String userCredentials = USER + ":" + PASSWORD;
278                 byte[] encodeBase64 = Base64.encodeBase64(userCredentials.getBytes());
279                 String encodedUserCredentials = new String(encodeBase64);
280                 Map<String, String> authorizationHeader = new HashMap<String, String>();
281                 authorizationHeader.put(HttpHeaderEnum.AUTHORIZATION.getValue(), encodedUserCredentials);
282                 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
283                 assertEquals("Check response code after download artifact", 400, restResponse.getErrorCode().intValue());
284                 assertFalse(restResponse.getHeaderFields().containsKey(HttpHeaderEnum.WWW_AUTHENTICATE.getValue()));
285
286                 validateAuditAuthentication("", AUTH_FAILED_INVALID_AUTHENTICATION_HEADER, ComponentTypeEnum.SERVICE);
287         }
288
289         @Test(enabled = false)
290         public void sendTwoAuthenticatedRequestsTest() throws Exception, Exception {
291                 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(USER, PASSWORD);
292                 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
293                 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
294
295                 RestResponse secondRestResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
296                 assertEquals("Check response code after second download artifact", 200, secondRestResponse.getErrorCode().intValue());
297         }
298
299         @Test(enabled = false)
300         public void sendAuthenticatedRequestTest_userValidation_1() throws Exception, Exception {
301
302                 ConsumerDataDefinition consumer = new ConsumerDataDefinition();
303                 consumer.setConsumerName("cI2468");
304                 consumer.setConsumerPassword(HASHED_PASSWORD);
305                 consumer.setConsumerSalt(SALT);
306                 RestResponse deleteResponse = ConsumerRestUtils.deleteConsumer(consumer, sdncAdminUserDetails);
307                 BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
308
309                 RestResponse createResponse = ConsumerRestUtils.createConsumer(consumer, sdncAdminUserDetails);
310                 BaseRestUtils.checkCreateResponse(createResponse);
311
312                 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(consumer.getConsumerName(), PASSWORD);
313                 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
314                 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
315
316                 deleteResponse = ConsumerRestUtils.deleteConsumer(consumer, sdncAdminUserDetails);
317                 BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
318         }
319
320         // ECOMP Consumer Name - UTF-8 string up to 255 characters containing the
321         // following characters : ( maybe to limit 4-64 chars ? )
322         // Lowercase characters {a-z}
323         // Uppercase characters {A-Z}
324         // Numbers {0-9}
325         // Dash {-}; this character is not supported as the first character in the
326         // user name
327         // Period {.}; this character is not supported as the first character in the
328         // user name
329         // Underscore {_}
330         // @Ignore("add manually user:password 24-!68:123456 to
331         // users-configuration.yaml in runtime")
332         @Test(enabled = false)
333         public void sendAuthenticatedRequestTest_userValidation_2() throws Exception, Exception {
334                 ConsumerDataDefinition consumer = new ConsumerDataDefinition();
335                 consumer.setConsumerName("24-!68");
336                 consumer.setConsumerPassword(HASHED_PASSWORD);
337                 consumer.setConsumerSalt(SALT);
338                 RestResponse deleteResponse = ConsumerRestUtils.deleteConsumer(consumer, sdncAdminUserDetails);
339                 BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
340
341                 RestResponse createResponse = ConsumerRestUtils.createConsumer(consumer, sdncAdminUserDetails);
342                 BaseRestUtils.checkCreateResponse(createResponse);
343                 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(consumer.getConsumerName(), PASSWORD);
344                 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
345                 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
346
347                 deleteResponse = ConsumerRestUtils.deleteConsumer(consumer, sdncAdminUserDetails);
348                 BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
349         }
350
351         // this is invalide becouse we do not use the : any more
352         // @Ignore("can't exectue, yaml file does not allow to enter more then one
353         // colon continuously (\":\") ")
354         @Test(enabled = false)
355         public void sendAuthenticatedRequestTest_userValidation_3() throws Exception, Exception {
356                 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader("a:", "123456");
357                 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
358                 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
359         }
360
361         //
362         // * ECOMP Consumer Password - expected to be SHA-2 256 encrypted value (
363         // SALT + "real" password ) => maximal length 256 bytes = 32 characters
364         // Before storing/comparing please convert upper case letter to lower.
365         // The "normalized" encrypted password should match the following format :
366         // [a-z0-9]
367         // @Ignore("add manually user:password 2468:123:456 to
368         // users-configuration.yaml in runtime")
369         @Test(enabled = false)
370         public void sendAuthenticatedRequestTest_passwordValidation_1() throws Exception, Exception {
371                 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader("A1", "123:456");
372                 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
373                 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
374         }
375
376         // * ECOMP Consumer Password - expected to be SHA-2 256 encrypted value (
377         // SALT + "real" password ) => maximal length 256 bytes = 32 characters
378         // Before storing/comparing please convert upper case letter to lower.
379         // The "normalized" encrypted password should match the following format :
380         // [a-z0-9]
381         @Test(enabled = false)
382         // @Ignore("add manually user:password 2468:Sq123a456B to
383         // users-configuration.yaml in runtime")
384         public void sendAuthenticatedRequestTest_passwordValidation_2() throws Exception, Exception {
385                 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader("B2", "Sq123a456B");
386                 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
387                 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
388         }
389
390         // * ECOMP Consumer Password - expected to be SHA-2 256 encrypted value (
391         // SALT + "real" password ) => maximal length 256 bytes = 32 characters
392         // Before storing/comparing please convert upper case letter to lower.
393         // The "normalized" encrypted password should match the following format :
394         // [a-z0-9]
395         @Test
396         // @Ignore("add C3:111T-0-*# to file")
397         public void sendAuthenticatedRequestTest_passwordValidation_3() throws Exception, Exception {
398                 Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader("C3", "111T-0-*#");
399                 RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact, sdncUserDetails, authorizationHeader);
400                 assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
401         }
402
403 }