Class StoreConfigurationProperties

java.lang.Object
se.swedenconnect.security.credential.config.properties.StoreConfigurationProperties
All Implemented Interfaces:
StoreConfiguration

public class StoreConfigurationProperties extends Object implements StoreConfiguration
Configuration properties for creating a Java KeyStore.
Author:
Martin Lindström
  • Constructor Details

    • StoreConfigurationProperties

      public StoreConfigurationProperties()
  • Method Details

    • getLocation

      @Nullable public String getLocation()
      Gets the location of the resource containing the store content.
      Returns:
      the store location
    • setLocation

      public void setLocation(@Nullable String location)
      Assigns the location of the resource containing the store content.
      Parameters:
      location - the store location
    • getPassword

      @Nullable public String getPassword()
      Gets the password used to access the store.
      Returns:
      the store password
    • setPassword

      public void setPassword(@Nullable String password)
      Assigns the password used to access the store.
      Parameters:
      password - the store password
    • getType

      @Nullable public String getType()
      Gets the type of the store to create, e.g., JKS, PKCS12 or PKCS11.
      Returns:
      the store type
    • setType

      public void setType(@Nullable String type)
      Assigns the type of the store to create, e.g., JKS, PKCS12 or PKCS11.
      Parameters:
      type - the store type
    • getProvider

      @Nullable public String getProvider()
      Gets the security provider for the store.
      Returns:
      the security provider name
    • setProvider

      public void setProvider(@Nullable String provider)
      Assigns the security provider for the store.
      Parameters:
      provider - the security provider name
    • getPkcs11

      Gets the additional PKCS#11 configuration.
      Returns:
      the PKCS#11 configuration
    • setPkcs11

      public void setPkcs11(@Nullable StoreConfigurationProperties.Pkcs11ConfigurationProperties pkcs11)
      Assigns the additional PKCS#11 configuration.
      Parameters:
      pkcs11 - the PKCS#11 configuration
    • location

      public Optional<String> location()
      Location of the resource containing the store content.
      Specified by:
      location in interface StoreConfiguration
      Returns:
      the location of the resource containing the store content
    • password

      public String password()
      Password used to access the store.
      Specified by:
      password in interface StoreConfiguration
      Returns:
      the password used to access the store
    • type

      public Optional<String> type()
      Type of the store to create, e.g., JKS, PKCS12 or PKCS11.
      Specified by:
      type in interface StoreConfiguration
      Returns:
      the type of the store to create
    • provider

      public Optional<String> provider()
      Security provider for the store.
      Specified by:
      provider in interface StoreConfiguration
      Returns:
      the name of the security provider for the store
    • pkcs11

      If the type is "PKCS11" and a provider that is not statically configured for PKCS#11, additional PKCS#11 configuration needs to be supplied.

      Note: The security provider used must support PKCS#11 via the KeyStoreSpi interface. The "SunPKCS11" is such a provider.

      Specified by:
      pkcs11 in interface StoreConfiguration
      Returns:
      additional PKCS#11 configuration
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object