Search in sources :

Example 6 with VaultSession

use of org.jboss.as.security.vault.VaultSession in project wildfly by wildfly.

the class RemoveSecuredAttributeTestCase method testRemoveSecuredAttributeBySameVaultSession.

/**
     * Test of remove secured attribute
     *
     * @throws Exception
     */
@Test
public void testRemoveSecuredAttributeBySameVaultSession() throws Exception {
    VaultSession vaultSession = vaultHandler.getVaultSession();
    String securedAttribute = addSecuredAttributeToDefaultVault(vaultSession, ATTRIBUTE_VALUE);
    assertArrayEquals("Retrieved secured attribute differs from the saved", vaultSession.retrieveSecuredAttribute(VAULT_BLOCK, ATTRIBUTE_NAME), ATTRIBUTE_VALUE);
    assertCorrectAttributeRemoval(vaultSession, securedAttribute);
}
Also used : VaultSession(org.jboss.as.security.vault.VaultSession) Test(org.junit.Test)

Aggregations

VaultSession (org.jboss.as.security.vault.VaultSession)6 Test (org.junit.Test)5 VaultHandler (org.jboss.as.test.integration.security.common.VaultHandler)2 File (java.io.File)1 OperationBuilder (org.jboss.as.controller.client.OperationBuilder)1 ModelNode (org.jboss.dmr.ModelNode)1