Class KeyStoreSecureStorage

java.lang.Object
org.forgerock.audit.secure.KeyStoreSecureStorage
All Implemented Interfaces:
SecureStorage

public class KeyStoreSecureStorage extends Object implements SecureStorage
Implementation of a secure storage using a keystore.
  • Field Details

    • ENTRY_INITIAL_KEY

      public static final String ENTRY_INITIAL_KEY
      The initial key used to calculate the HEADER_HMAC.
      See Also:
    • ENTRY_SIGNATURE

      public static final String ENTRY_SIGNATURE
      The alias to lookup the private/public signature key into the keystore.
      See Also:
    • ENTRY_CURRENT_SIGNATURE

      public static final String ENTRY_CURRENT_SIGNATURE
      The last signature inserted into the file.
      See Also:
    • ENTRY_CURRENT_KEY

      public static final String ENTRY_CURRENT_KEY
      The current key used to calculate the HEADER_HMAC.
      See Also:
    • SIGNATURE_ALGORITHM

      public static final String SIGNATURE_ALGORITHM
      The algorithm to use for signing and verifying.
      See Also:
    • HMAC_ALGORITHM

      public static final String HMAC_ALGORITHM
      The HMAC algorithm to use.
      See Also:
    • JCEKS_KEYSTORE_TYPE

      public static final String JCEKS_KEYSTORE_TYPE
      The name of the Java Cryptography Extension KeyStore (JCEKS) type.
      See Also:
  • Constructor Details

    • KeyStoreSecureStorage

      public KeyStoreSecureStorage(KeyStoreHandler keyStoreHandler, PrivateKey privateKey)
      Creates the storage with a keystore handler, initialized to verify only.
      Parameters:
      keyStoreHandler - Handler of a keystore.
      privateKey - The private key used to initialize the signer
    • KeyStoreSecureStorage

      public KeyStoreSecureStorage(KeyStoreHandler keyStoreHandler, PublicKey publicKey)
      Creates the storage with a keystore handler, initialized to verify only.
      Parameters:
      keyStoreHandler - Handler of a keystore.
      publicKey - The public key used to initialize the verifier
    • KeyStoreSecureStorage

      public KeyStoreSecureStorage(KeyStoreHandler keyStoreHandler, PublicKey publicKey, PrivateKey privateKey)
      Creates the storage with a keystore handler, initialized to verify only.
      Parameters:
      keyStoreHandler - Handler of a keystore.
      publicKey - The public key used to initialize the verifier
      privateKey - The private key used to initialize the signer
  • Method Details