@Parameters(name = "Authentication Test {index} - {0} {2} - Returns: {1}")
	public static Collection<Object[]> data() {
		return Arrays.asList(new Object[][] {

			{ HttpMethod.GET, HttpStatus.OK, "/", adminOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.UNAUTHORIZED, "/", null, null },

			{ HttpMethod.GET, HttpStatus.UNAUTHORIZED, "/management/metrics", null, null },
			{ HttpMethod.GET, HttpStatus.OK, "/management/metrics", adminOnlyUser, null },

			{ HttpMethod.GET, HttpStatus.UNAUTHORIZED, "/modules", null, null }, //Unauthenticated
			{ HttpMethod.GET, HttpStatus.OK, "/modules", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.UNAUTHORIZED, "/modules", wrongUsername, null },
			{ HttpMethod.GET, HttpStatus.UNAUTHORIZED, "/modules", bootUsernameWithRandomPassword, null },
			{ HttpMethod.GET, HttpStatus.UNAUTHORIZED, "/modules", wrongPassword, null },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/streams/definitions", createOnlyUser, null }, //AuthenticatedButUnauthorized
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/streams/definitions.json", createOnlyUser, null },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/streams/definitions", adminOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/streams/definitions.json", adminOnlyUser, null },

			{ HttpMethod.GET, HttpStatus.OK, "/streams/definitions", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/streams/definitions.json", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/streams/definitions.json", viewOnlyUser,
				ImmutableMap.of("page", "0", "size", "10") },

			{ HttpMethod.DELETE, HttpStatus.FORBIDDEN, "/streams/definitions", viewOnlyUser, null },
			{ HttpMethod.DELETE, HttpStatus.FORBIDDEN, "/streams/definitions.json", viewOnlyUser, null },

			{ HttpMethod.DELETE, HttpStatus.FORBIDDEN, "/streams/definitions", adminOnlyUser, null },
			{ HttpMethod.DELETE, HttpStatus.FORBIDDEN, "/streams/definitions.json", adminOnlyUser, null },

			{ HttpMethod.DELETE, HttpStatus.OK, "/streams/definitions", createOnlyUser, null },
			{ HttpMethod.DELETE, HttpStatus.OK, "/streams/definitions.json", createOnlyUser, null },

			{ HttpMethod.POST, HttpStatus.FORBIDDEN, "/streams/deployments/abcd", viewOnlyUser, null },
			{ HttpMethod.POST, HttpStatus.FORBIDDEN, "/streams/deployments/abcd", adminOnlyUser, null },
			{ HttpMethod.POST, HttpStatus.NOT_FOUND, "/streams/deployments/abcd", createOnlyUser, null },

			{ HttpMethod.DELETE, HttpStatus.FORBIDDEN, "/streams/deployments/abcd", viewOnlyUser, null },
			{ HttpMethod.DELETE, HttpStatus.FORBIDDEN, "/streams/deployments/abcd", adminOnlyUser, null },
			{ HttpMethod.DELETE, HttpStatus.NOT_FOUND, "/streams/deployments/abcd", createOnlyUser, null },

			{ HttpMethod.DELETE, HttpStatus.FORBIDDEN, "/streams/definitions/abcd", viewOnlyUser, null },
			{ HttpMethod.DELETE, HttpStatus.FORBIDDEN, "/streams/definitions/abcd", adminOnlyUser, null },
			{ HttpMethod.DELETE, HttpStatus.NOT_FOUND, "/streams/definitions/abcd", createOnlyUser, null },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/definitions", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/definitions.json", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/jobs/definitions", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/jobs/definitions.json", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/definitions.json", createOnlyUser,
				ImmutableMap.of("page", "0", "size", "10") },
			{ HttpMethod.GET, HttpStatus.OK, "/jobs/definitions.json", viewOnlyUser,
				ImmutableMap.of("page", "0", "size", "10") },

			{ HttpMethod.POST, HttpStatus.FORBIDDEN, "/jobs/definitions", viewOnlyUser,
				ImmutableMap.of("definition", "timestampfile", "deploy", "true", "name", "abcdef") },
			{ HttpMethod.POST, HttpStatus.CREATED, "/jobs/definitions", createOnlyUser,
				ImmutableMap.of("definition", "timestampfile", "deploy", "true", "name", "abcdef") },

			{ HttpMethod.POST, HttpStatus.FORBIDDEN, "/jobs/executions", viewOnlyUser,
				ImmutableMap.of("jobname", "abcdef") },
			{ HttpMethod.PUT, HttpStatus.FORBIDDEN, "/jobs/executions", viewOnlyUser,
				ImmutableMap.of("stop", "true") },
			{ HttpMethod.PUT, HttpStatus.FORBIDDEN, "/jobs/executions", adminOnlyUser,
				ImmutableMap.of("stop", "true") },
			{ HttpMethod.PUT, HttpStatus.OK, "/jobs/executions", createOnlyUser,
				ImmutableMap.of("stop", "true") },
			{ HttpMethod.POST, HttpStatus.CREATED, "/jobs/executions", createOnlyUser,
				ImmutableMap.of("jobname", "abcdef") },

			{ HttpMethod.DELETE, HttpStatus.OK, "/jobs/definitions/abcdef", createOnlyUser, null },
			{ HttpMethod.DELETE, HttpStatus.FORBIDDEN, "/jobs/definitions/abcdef", viewOnlyUser, null },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/configurations", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/jobs/configurations", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/configurations.json", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/jobs/configurations.json", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/configurations.json", createOnlyUser,
				ImmutableMap.of("page", "0", "size", "10") },
			{ HttpMethod.GET, HttpStatus.OK, "/jobs/configurations.json", viewOnlyUser,
				ImmutableMap.of("page", "0", "size", "10") },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/executions", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/executions.json", createOnlyUser, null },

			{ HttpMethod.GET, HttpStatus.UNAUTHORIZED, "/jobs/executions/333/steps/123/progress", null, null },
			{ HttpMethod.GET, HttpStatus.NOT_FOUND, "/jobs/executions/333/steps/123/progress", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/executions/333/steps/123/progress", adminOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/executions/333/steps/123/progress", createOnlyUser, null },

			{ HttpMethod.GET, HttpStatus.UNAUTHORIZED, "/jobs/executions/333/steps/123/progress.json", null, null },
			{ HttpMethod.GET, HttpStatus.NOT_FOUND, "/jobs/executions/333/steps/123/progress.json", viewOnlyUser,
				null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/executions/333/steps/123/progress.json", adminOnlyUser,
				null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/executions/333/steps/123/progress.json", createOnlyUser,
				null },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/instances", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/jobs/instances.json", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.BAD_REQUEST, "/jobs/instances", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.NOT_FOUND, "/jobs/instances", viewOnlyUser,
				ImmutableMap.of("jobname", "testjobname") },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/modules", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/modules.json", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/modules", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/modules.json", viewOnlyUser, null },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/runtime/modules", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/runtime/modules.json", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/runtime/modules", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/runtime/modules.json", viewOnlyUser, null },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/runtime/containers", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/runtime/containers.json", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/runtime/containers", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/runtime/containers.json", viewOnlyUser, null },
			{ HttpMethod.DELETE, HttpStatus.FORBIDDEN, "/runtime/containers", viewOnlyUser, null },
			{ HttpMethod.DELETE, HttpStatus.BAD_REQUEST, "/runtime/containers", createOnlyUser, null },
			{ HttpMethod.DELETE, HttpStatus.NOT_FOUND, "/runtime/containers", createOnlyUser,
				ImmutableMap.of("containerId", "123456789") },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/metrics/counters", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/metrics/counters.json", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/metrics/counters", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/metrics/counters.json", viewOnlyUser, null },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/metrics/field-value-counters", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/metrics/field-value-counters.json", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/metrics/field-value-counters", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/metrics/field-value-counters.json", viewOnlyUser, null },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/metrics/aggregate-counters", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/metrics/aggregate-counters.json", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/metrics/aggregate-counters", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/metrics/aggregate-counters.json", viewOnlyUser, null },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/metrics/gauges", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/metrics/gauges.json", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/metrics/gauges", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/metrics/gauges.json", viewOnlyUser, null },

			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/metrics/rich-gauges", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.FORBIDDEN, "/metrics/rich-gauges.json", createOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/metrics/rich-gauges", viewOnlyUser, null },
			{ HttpMethod.GET, HttpStatus.OK, "/metrics/rich-gauges.json", viewOnlyUser, null }
		});
	}
Tests for security configuration backed by a file-based user list.

@author Eric Bottard
@author Gunnar Hillert
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/security/SingleNodeApplicationWithUsersFileTest.java