aboutsummaryrefslogtreecommitdiffstats
path: root/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/general/BasicHttpAuthenticationTest.java
blob: c3371493d95cd43830401929a080575d5e5a220f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
/*-
 * ============LICENSE_START=======================================================
 * SDC
 * ================================================================================
 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 * ================================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============LICENSE_END=========================================================
 */

//US505653
package org.openecomp.sdc.ci.tests.execute.general;

import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertFalse;
import static org.testng.AssertJUnit.assertTrue;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.codec.binary.Base64;
import org.junit.Rule;
import org.junit.rules.TestName;
import org.openecomp.sdc.be.dao.api.ActionStatus;
import org.openecomp.sdc.be.datatypes.elements.ConsumerDataDefinition;
import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
import org.openecomp.sdc.be.model.Resource;
import org.openecomp.sdc.be.model.Service;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.ci.tests.api.ComponentBaseTest;
import org.openecomp.sdc.ci.tests.api.Urls;
import org.openecomp.sdc.ci.tests.datatypes.ArtifactReqDetails;
import org.openecomp.sdc.ci.tests.datatypes.ComponentInstanceReqDetails;
import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails;
import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails;
import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum;
import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum;
import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedAuthenticationAudit;
import org.openecomp.sdc.ci.tests.datatypes.http.HttpHeaderEnum;
import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse;
import org.openecomp.sdc.ci.tests.utils.DbUtils;
import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils;
import org.openecomp.sdc.ci.tests.utils.general.ElementFactory;
import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils;
import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils;
import org.openecomp.sdc.ci.tests.utils.rest.ComponentInstanceRestUtils;
import org.openecomp.sdc.ci.tests.utils.rest.ConsumerRestUtils;
import org.openecomp.sdc.ci.tests.utils.rest.LifecycleRestUtils;
import org.openecomp.sdc.ci.tests.utils.validation.AuditValidationUtils;
import org.openecomp.sdc.ci.tests.utils.validation.ErrorValidationUtils;
import org.openecomp.sdc.common.util.ValidationUtils;
import org.testng.AssertJUnit;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

public class BasicHttpAuthenticationTest extends ComponentBaseTest {

	protected static final String AUTH_FAILED_INVALID_AUTHENTICATION_HEADER = "AUTH_FAILED_INVALID_AUTHENTICATION_HEADER";

	protected static final String AUTH_SUCCESS = "AUTH_SUCCESS";

	protected static final String AUTH_FAILED_INVALID_PASSWORD = "AUTH_FAILED_INVALID_PASSWORD";

	protected static final String AUTH_FAILED_USER_NOT_FOUND = "AUTH_FAILED_USER_NOT_FOUND";

	protected static final String AUTH_REQUIRED = "AUTH_REQUIRED";

	protected static final String WWW_AUTHENTICATE = "WWW-Authenticate";

	// user ci password 123456
	// protected final String authorizationHeader = "Basic Y2k6MTIzNDU2";
	// user ci password 123456
	protected final String USER = "ci";

	protected final String PASSWORD = "123456";

	protected final String SALT = "2a1f887d607d4515d4066fe0f5452a50";

	protected final String HASHED_PASSWORD = "0a0dc557c3bf594b1a48030e3e99227580168b21f44e285c69740b8d5b13e33b";

	protected User sdncAdminUserDetails;

	protected ConsumerDataDefinition consumerDataDefinition;
	protected ResourceReqDetails resourceDetails;
	protected ServiceReqDetails serviceDetails;
	protected User sdncUserDetails;

	protected ArtifactReqDetails deploymentArtifact;

	protected ExpectedAuthenticationAudit expectedAuthenticationAudit;

	protected final String auditAction = "HttpAuthentication";

	protected String expectedDownloadServiceUrl;
	protected String expectedDownloadResourceUrl;
	protected ComponentInstanceReqDetails componentInstanceReqDetails;

	@Rule
	public static TestName name = new TestName();

	public BasicHttpAuthenticationTest() {
		super(name, BasicHttpAuthenticationTest.class.getName());
	}

	@BeforeMethod
	public void init() throws Exception {

		sdncUserDetails = ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER);
		Resource resourceObject = AtomicOperationUtils
				.createResourceByType(ResourceTypeEnum.VFC, UserRoleEnum.DESIGNER, true).left().value();
		resourceDetails = new ResourceReqDetails(resourceObject);
		Service serviceObject = AtomicOperationUtils.createDefaultService(UserRoleEnum.DESIGNER, true).left().value();
		serviceDetails = new ServiceReqDetails(serviceObject);

		deploymentArtifact = ElementFactory.getDefaultDeploymentArtifactForType(ArtifactTypeEnum.HEAT.getType());
		RestResponse response = ArtifactRestUtils.addInformationalArtifactToResource(deploymentArtifact,
				sdncUserDetails, resourceDetails.getUniqueId());
		AssertJUnit.assertTrue("add HEAT artifact to resource request returned status:" + response.getErrorCode(),
				response.getErrorCode() == 200);

		componentInstanceReqDetails = ElementFactory.getDefaultComponentInstance();
		// certified resource
		response = LifecycleRestUtils.certifyResource(resourceDetails);
		AssertJUnit.assertTrue("certify resource request returned status:" + response.getErrorCode(),
				response.getErrorCode() == 200);

		// add resource instance with HEAT deployment artifact to the service
		componentInstanceReqDetails.setComponentUid(resourceDetails.getUniqueId());
		response = ComponentInstanceRestUtils.createComponentInstance(componentInstanceReqDetails, sdncUserDetails,
				serviceDetails.getUniqueId(), ComponentTypeEnum.SERVICE);
		AssertJUnit.assertTrue("response code is not 201, returned: " + response.getErrorCode(),
				response.getErrorCode() == 201);
		expectedAuthenticationAudit = new ExpectedAuthenticationAudit();

		// RestResponse addDeploymentArtifactResponse =
		// ArtifactRestUtils.addInformationalArtifactToService(deploymentArtifact,
		// sdncUserDetails, serviceDetails.getUniqueId());
		// assertEquals("didn't succeed to upload deployment artifact", 200,
		// addDeploymentArtifactResponse.getErrorCode().intValue());
		//
		// downloadUrl =
		// String.format(Urls.DISTRIB_DOWNLOAD_SERVICE_ARTIFACT_RELATIVE_URL,
		// ValidationUtils.convertToSystemName(serviceDetails.getServiceName()),
		// serviceDetails.getVersion(),
		// ValidationUtils.normalizeFileName(deploymentArtifact.getArtifactName()));

		expectedDownloadResourceUrl = String.format(Urls.DISTRIB_DOWNLOAD_RESOURCE_ARTIFACT_RELATIVE_URL,
				ValidationUtils.convertToSystemName(serviceDetails.getName()), serviceDetails.getVersion(),
				ValidationUtils.convertToSystemName(resourceDetails.getName()), resourceDetails.getVersion(),
				ValidationUtils.normalizeFileName(deploymentArtifact.getArtifactName()));
		expectedDownloadResourceUrl = expectedDownloadResourceUrl.substring("/sdc/".length(),
				expectedDownloadResourceUrl.length());

		expectedDownloadServiceUrl = String.format(Urls.DISTRIB_DOWNLOAD_SERVICE_ARTIFACT_RELATIVE_URL,
				ValidationUtils.convertToSystemName(serviceDetails.getName()), serviceDetails.getVersion(),
				ValidationUtils.normalizeFileName(deploymentArtifact.getArtifactName()));
		expectedDownloadServiceUrl = expectedDownloadServiceUrl.substring("/sdc/".length(),
				expectedDownloadServiceUrl.length());

		sdncAdminUserDetails = ElementFactory.getDefaultUser(UserRoleEnum.ADMIN);
		consumerDataDefinition = createConsumer();
		RestResponse deleteResponse = ConsumerRestUtils.deleteConsumer(consumerDataDefinition, sdncAdminUserDetails);
		BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
		;

		RestResponse createResponse = ConsumerRestUtils.createConsumer(consumerDataDefinition, sdncAdminUserDetails);
		BaseRestUtils.checkCreateResponse(createResponse);

	}

	@AfterMethod
	public void tearDown() throws Exception {
		RestResponse deleteResponse = ConsumerRestUtils.deleteConsumer(consumerDataDefinition, sdncAdminUserDetails);
		BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
		;
	}

	@Test
	public void sendAuthenticatedRequestTest_success() throws Exception, Exception {
		DbUtils.cleanAllAudits();
		Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(USER, PASSWORD);
		// RestResponse restResponse =
		// ArtifactRestUtils.downloadServiceArtifact(serviceDetails,
		// deploymentArtifact, sdncUserDetails, authorizationHeader);
		RestResponse restResponse = ArtifactRestUtils.downloadResourceArtifact(serviceDetails, resourceDetails,
				deploymentArtifact, sdncUserDetails, authorizationHeader);
		AssertJUnit.assertEquals("Check response code after download artifact", 200,
				restResponse.getErrorCode().intValue());
		AssertJUnit.assertFalse(restResponse.getHeaderFields().containsKey(HttpHeaderEnum.WWW_AUTHENTICATE.getValue()));

		validateAuditAuthentication(USER, AUTH_SUCCESS, ComponentTypeEnum.RESOURCE);

	}

	protected void validateAuditAuthentication(String userName, String AuthStatus, ComponentTypeEnum compType)
			throws Exception {
		if (compType.equals(ComponentTypeEnum.RESOURCE)) {
			expectedAuthenticationAudit = new ExpectedAuthenticationAudit(expectedDownloadResourceUrl, userName,
					auditAction, AuthStatus);
		} else {
			expectedAuthenticationAudit = new ExpectedAuthenticationAudit(expectedDownloadServiceUrl, userName,
					auditAction, AuthStatus);
		}
		AuditValidationUtils.validateAuthenticationAudit(expectedAuthenticationAudit);
	}

	protected ConsumerDataDefinition createConsumer() {
		ConsumerDataDefinition consumer = new ConsumerDataDefinition();
		consumer.setConsumerName(USER);
		consumer.setConsumerSalt(SALT);
		consumer.setConsumerPassword(HASHED_PASSWORD);
		return consumer;

	}

	@Test
	public void sendAuthenticatedRequestWithoutHeadersTest() throws Exception, Exception {
		RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, new HashMap<String, String>());
		assertEquals("Check response code after download artifact", 401, restResponse.getErrorCode().intValue());
		ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_REQUIRED.name(), new ArrayList<String>(),
				restResponse.getResponse());
		assertTrue(restResponse.getHeaderFields().containsKey(WWW_AUTHENTICATE));
		List<String> getAuthenticateHeader = restResponse.getHeaderFields().get(WWW_AUTHENTICATE);
		assertEquals("www-authenticate header contains more then one value", 1, getAuthenticateHeader.size());
		assertTrue(getAuthenticateHeader.get(0).equals("Basic realm=" + "\"SDC\""));

		validateAuditAuthentication("", AUTH_REQUIRED, ComponentTypeEnum.SERVICE);
	}

	@Test
	public void sendAuthenticatedRequestTest_userIsNotProvsioned() throws Exception, Exception {
		String userName = "shay";
		Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(userName, "123456");
		RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, authorizationHeader);
		assertEquals("Check response code after download artifact", 403, restResponse.getErrorCode().intValue());
		ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_FAILED.name(), new ArrayList<String>(),
				restResponse.getResponse());
		assertFalse(restResponse.getHeaderFields().containsKey(WWW_AUTHENTICATE));

		validateAuditAuthentication(userName, AUTH_FAILED_USER_NOT_FOUND, ComponentTypeEnum.SERVICE);
	}

	@Test
	public void sendAuthenticatedRequestTest_userIsNull() throws Exception, Exception {
		String userName = "";
		Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(userName, "123456");
		RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, authorizationHeader);
		assertEquals("Check response code after download artifact", 403, restResponse.getErrorCode().intValue());
		ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_FAILED.name(), new ArrayList<String>(),
				restResponse.getResponse());
		assertFalse(restResponse.getHeaderFields().containsKey(WWW_AUTHENTICATE));

		validateAuditAuthentication(userName, AUTH_FAILED_USER_NOT_FOUND, ComponentTypeEnum.SERVICE);
	}

	@Test
	public void sendAuthenticatedRequestTest_passwordIsNull() throws Exception, Exception {
		String userName = "ci";
		Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(userName, "");
		RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, authorizationHeader);
		assertEquals("Check response code after download artifact", 403, restResponse.getErrorCode().intValue());
		ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_FAILED.name(), new ArrayList<String>(),
				restResponse.getResponse());
		assertFalse(restResponse.getHeaderFields().containsKey(WWW_AUTHENTICATE));

		validateAuditAuthentication(userName, AUTH_FAILED_INVALID_PASSWORD, ComponentTypeEnum.SERVICE);
	}

	@Test
	public void sendAuthenticatedRequestTest_passowrdIsNotValidated() throws Exception, Exception {
		String userCi = "ci";
		Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(userCi, "98765");
		RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, authorizationHeader);
		assertEquals("Check response code after download artifact", 403, restResponse.getErrorCode().intValue());
		ErrorValidationUtils.checkBodyResponseOnError(ActionStatus.AUTH_FAILED.name(), new ArrayList<String>(),
				restResponse.getResponse());
		assertFalse(restResponse.getHeaderFields().containsKey(HttpHeaderEnum.WWW_AUTHENTICATE.getValue()));

		validateAuditAuthentication(userCi, AUTH_FAILED_INVALID_PASSWORD, ComponentTypeEnum.SERVICE);
	}

	@Test
	public void sendAuthenticatedRequestTest_InvalidHeader() throws Exception, Exception {
		String userCredentials = USER + ":" + PASSWORD;
		byte[] encodeBase64 = Base64.encodeBase64(userCredentials.getBytes());
		String encodedUserCredentials = new String(encodeBase64);
		Map<String, String> authorizationHeader = new HashMap<String, String>();
		authorizationHeader.put(HttpHeaderEnum.AUTHORIZATION.getValue(), encodedUserCredentials);
		RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, authorizationHeader);
		assertEquals("Check response code after download artifact", 400, restResponse.getErrorCode().intValue());
		assertFalse(restResponse.getHeaderFields().containsKey(HttpHeaderEnum.WWW_AUTHENTICATE.getValue()));

		validateAuditAuthentication("", AUTH_FAILED_INVALID_AUTHENTICATION_HEADER, ComponentTypeEnum.SERVICE);
	}

	@Test(enabled = false)
	public void sendTwoAuthenticatedRequestsTest() throws Exception, Exception {
		Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(USER, PASSWORD);
		RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, authorizationHeader);
		assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());

		RestResponse secondRestResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, authorizationHeader);
		assertEquals("Check response code after second download artifact", 200,
				secondRestResponse.getErrorCode().intValue());
	}

	@Test(enabled = false)
	public void sendAuthenticatedRequestTest_userValidation_1() throws Exception, Exception {

		ConsumerDataDefinition consumer = new ConsumerDataDefinition();
		consumer.setConsumerName("cI2468");
		consumer.setConsumerPassword(HASHED_PASSWORD);
		consumer.setConsumerSalt(SALT);
		RestResponse deleteResponse = ConsumerRestUtils.deleteConsumer(consumer, sdncAdminUserDetails);
		BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);

		RestResponse createResponse = ConsumerRestUtils.createConsumer(consumer, sdncAdminUserDetails);
		BaseRestUtils.checkCreateResponse(createResponse);

		Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(consumer.getConsumerName(),
				PASSWORD);
		RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, authorizationHeader);
		assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());

		deleteResponse = ConsumerRestUtils.deleteConsumer(consumer, sdncAdminUserDetails);
		BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
	}

	// ECOMP Consumer Name - UTF-8 string up to 255 characters containing the
	// following characters : ( maybe to limit 4-64 chars ? )
	// Lowercase characters {a-z}
	// Uppercase characters {A-Z}
	// Numbers {0-9}
	// Dash {-}; this character is not supported as the first character in the
	// user name
	// Period {.}; this character is not supported as the first character in the
	// user name
	// Underscore {_}
	// @Ignore("add manually user:password 24-!68:123456 to
	// users-configuration.yaml in runtime")
	@Test(enabled = false)
	public void sendAuthenticatedRequestTest_userValidation_2() throws Exception, Exception {
		ConsumerDataDefinition consumer = new ConsumerDataDefinition();
		consumer.setConsumerName("24-!68");
		consumer.setConsumerPassword(HASHED_PASSWORD);
		consumer.setConsumerSalt(SALT);
		RestResponse deleteResponse = ConsumerRestUtils.deleteConsumer(consumer, sdncAdminUserDetails);
		BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);

		RestResponse createResponse = ConsumerRestUtils.createConsumer(consumer, sdncAdminUserDetails);
		BaseRestUtils.checkCreateResponse(createResponse);
		Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader(consumer.getConsumerName(),
				PASSWORD);
		RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, authorizationHeader);
		assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());

		deleteResponse = ConsumerRestUtils.deleteConsumer(consumer, sdncAdminUserDetails);
		BaseRestUtils.checkStatusCode(deleteResponse, "delete operation filed", false, 404, 200);
	}

	// this is invalide becouse we do not use the : any more
	// @Ignore("can't exectue, yaml file does not allow to enter more then one
	// colon continuously (\":\") ")
	@Test(enabled = false)
	public void sendAuthenticatedRequestTest_userValidation_3() throws Exception, Exception {
		Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader("a:", "123456");
		RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, authorizationHeader);
		assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
	}

	//
	// * ECOMP Consumer Password - expected to be SHA-2 256 encrypted value (
	// SALT + "real" password ) => maximal length 256 bytes = 32 characters
	// Before storing/comparing please convert upper case letter to lower.
	// The "normalized" encrypted password should match the following format :
	// [a-z0-9]
	// @Ignore("add manually user:password 2468:123:456 to
	// users-configuration.yaml in runtime")
	@Test(enabled = false)
	public void sendAuthenticatedRequestTest_passwordValidation_1() throws Exception, Exception {
		Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader("A1", "123:456");
		RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, authorizationHeader);
		assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
	}

	// * ECOMP Consumer Password - expected to be SHA-2 256 encrypted value (
	// SALT + "real" password ) => maximal length 256 bytes = 32 characters
	// Before storing/comparing please convert upper case letter to lower.
	// The "normalized" encrypted password should match the following format :
	// [a-z0-9]
	@Test(enabled = false)
	// @Ignore("add manually user:password 2468:Sq123a456B to
	// users-configuration.yaml in runtime")
	public void sendAuthenticatedRequestTest_passwordValidation_2() throws Exception, Exception {
		Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader("B2", "Sq123a456B");
		RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, authorizationHeader);
		assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
	}

	// * ECOMP Consumer Password - expected to be SHA-2 256 encrypted value (
	// SALT + "real" password ) => maximal length 256 bytes = 32 characters
	// Before storing/comparing please convert upper case letter to lower.
	// The "normalized" encrypted password should match the following format :
	// [a-z0-9]
	@Test
	// @Ignore("add C3:111T-0-*# to file")
	public void sendAuthenticatedRequestTest_passwordValidation_3() throws Exception, Exception {
		Map<String, String> authorizationHeader = BaseRestUtils.addAuthorizeHeader("C3", "111T-0-*#");
		RestResponse restResponse = ArtifactRestUtils.downloadServiceArtifact(serviceDetails, deploymentArtifact,
				sdncUserDetails, authorizationHeader);
		assertEquals("Check response code after download artifact", 200, restResponse.getErrorCode().intValue());
	}

}