Search in sources :

Example 1 with EmptyKeyManager

use of org.springframework.security.saml.key.EmptyKeyManager in project hub-alert by blackducksoftware.

the class SamlManagerTest method init.

@BeforeEach
public void init() throws Exception {
    gson = new Gson();
    context = Mockito.mock(SAMLContext.class);
    parserPool = Mockito.mock(ParserPool.class);
    extendedMetadata = Mockito.mock(ExtendedMetadata.class);
    metadataManager = new CachingMetadataManager(Collections.emptyList());
    metadataManager.setKeyManager(new EmptyKeyManager());
    metadataGenerator = Mockito.mock(MetadataGenerator.class);
    currentConfiguration = Mockito.mock(ConfigurationModel.class);
    alertProperties = Mockito.mock(AlertProperties.class);
    Mockito.when(alertProperties.getAlertSecretsDir()).thenReturn("./testDB/run/secrets");
    filePersistenceUtil = new FilePersistenceUtil(alertProperties, gson);
}
Also used : ParserPool(org.opensaml.xml.parse.ParserPool) ConfigurationModel(com.synopsys.integration.alert.common.persistence.model.ConfigurationModel) FilePersistenceUtil(com.synopsys.integration.alert.common.persistence.util.FilePersistenceUtil) Gson(com.google.gson.Gson) ExtendedMetadata(org.springframework.security.saml.metadata.ExtendedMetadata) EmptyKeyManager(org.springframework.security.saml.key.EmptyKeyManager) AlertProperties(com.synopsys.integration.alert.common.AlertProperties) CachingMetadataManager(org.springframework.security.saml.metadata.CachingMetadataManager) MetadataGenerator(org.springframework.security.saml.metadata.MetadataGenerator) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

Gson (com.google.gson.Gson)1 AlertProperties (com.synopsys.integration.alert.common.AlertProperties)1 ConfigurationModel (com.synopsys.integration.alert.common.persistence.model.ConfigurationModel)1 FilePersistenceUtil (com.synopsys.integration.alert.common.persistence.util.FilePersistenceUtil)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 ParserPool (org.opensaml.xml.parse.ParserPool)1 EmptyKeyManager (org.springframework.security.saml.key.EmptyKeyManager)1 CachingMetadataManager (org.springframework.security.saml.metadata.CachingMetadataManager)1 ExtendedMetadata (org.springframework.security.saml.metadata.ExtendedMetadata)1 MetadataGenerator (org.springframework.security.saml.metadata.MetadataGenerator)1