use of org.cloudfoundry.credhub.helper.AuditingHelper in project credhub by cloudfoundry-incubator.
the class AuditTest method setup.
@Before
public void setup() {
mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).apply(springSecurity()).build();
auditingHelper = new AuditingHelper(requestAuditRecordRepository, eventAuditRecordRepository);
}
use of org.cloudfoundry.credhub.helper.AuditingHelper in project credhub by cloudfoundry-incubator.
the class CertificateGetTest method beforeEach.
@Before
public void beforeEach() throws Exception {
mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).apply(springSecurity()).build();
auditingHelper = new AuditingHelper(requestAuditRecordRepository, eventAuditRecordRepository);
}
use of org.cloudfoundry.credhub.helper.AuditingHelper in project credhub by cloudfoundry-incubator.
the class CertificateSetAndRegenerateTest method beforeEach.
@Before
public void beforeEach() throws Exception {
mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).apply(springSecurity()).build();
MockHttpServletRequestBuilder generateCaRequest = post("/api/v1/data").header("Authorization", "Bearer " + UAA_OAUTH2_PASSWORD_GRANT_TOKEN).accept(APPLICATION_JSON).contentType(APPLICATION_JSON).content("{\n" + " \"name\" :\"" + CA_NAME + "\",\n" + " \"type\" : \"certificate\",\n" + " \"parameters\" : {\n" + " \"common_name\" : \"federation\",\n" + " \"is_ca\" : true,\n" + " \"self_sign\" : true\n" + " }\n" + "}");
final String generateCaResponse = this.mockMvc.perform(generateCaRequest).andExpect(status().isOk()).andReturn().getResponse().getContentAsString();
caCertificate = JsonPath.parse(generateCaResponse).read("$.value.certificate");
caId = JsonPath.parse(generateCaResponse).read("$.id");
caCredentialUuid = getCertificateId(mockMvc, CA_NAME);
assertNotNull(caCertificate);
auditingHelper = new AuditingHelper(requestAuditRecordRepository, eventAuditRecordRepository);
}
use of org.cloudfoundry.credhub.helper.AuditingHelper in project credhub by cloudfoundry-incubator.
the class PermissionsEndpointWithoutEnforcementTest method beforeEach.
@Before
public void beforeEach() throws Exception {
mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).apply(springSecurity()).build();
RequestHelper.setPassword(mockMvc, credentialName, "testpassword", CredentialWriteMode.NO_OVERWRITE.mode);
auditingHelper = new AuditingHelper(requestAuditRecordRepository, eventAuditRecordRepository);
}
use of org.cloudfoundry.credhub.helper.AuditingHelper in project credhub by cloudfoundry-incubator.
the class CertificateVersionDeleteTest method beforeEach.
@Before
public void beforeEach() throws Exception {
mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).apply(springSecurity()).build();
auditingHelper = new AuditingHelper(requestAuditRecordRepository, eventAuditRecordRepository);
}
Aggregations