Class CoreSecurityService

    • Field Detail

      • branchingEnabled

        protected transient boolean branchingEnabled
    • Constructor Detail

      • CoreSecurityService

        public CoreSecurityService()
        Creates a new Object with the following defaults.
        • Default encryption algorithm is DESede/CBC/PKCS5Padding, KeySize=168
        • V1 compatibility is false
        • security factory is null (suitable for communication with V1 implementations)
    • Method Detail

      • getKeystoreUrls

        public java.util.List<ConfiguredKeystore> getKeystoreUrls()
        Get the list of keystore urls.
        Returns:
        the list of keystore urls.
      • setKeystoreUrls

        public void setKeystoreUrls​(java.util.List<ConfiguredKeystore> list)
        Set the keystore urls.
        Parameters:
        list - the list of keystore urls.
      • addKeystoreUrl

        public void addKeystoreUrl​(ConfiguredKeystore url)
        Add an url to the list.

        Valid URLS are in the form
        [protocol]://[server]:[port]/[path]?keystoreType=[type]& keystorePassword=[password]

        • protocol - the protocol to use, e.g. http
        • server - the server hosting the keystore
        • port - the port through which the protocol will operate
        • path - Path to the keystore
        • type - The type of keystore to use (e.g. JKS)
        • password - password to the keystore

        An example would be http://www.adaptris.com/my.ks?keystoreType=JKS& keystorePassword=ABCDE or file://localhost/c:/my.ks?keystoreType=JKS& keystorePassword=ABCDE

        For the purposes of security each of the keystores will be searched in turn for the matching partner information. Only the first matching partner will be used.

        Parameters:
        url - an individual url
        See Also:
        getKeystoreUrls(), ConfiguredKeystore
      • setLocalPartner

        public void setLocalPartner​(java.lang.String s)
        Set the local partner keystore alias.
        Parameters:
        s - the local partner
      • getLocalPartner

        public java.lang.String getLocalPartner()
        Get the local partner keystore alias.
        Returns:
        the local partner
      • setRemotePartner

        public void setRemotePartner​(java.lang.String s)
        Set the remote partner keystore alias.

        If this is not set, then it will be derived from metadata.

        Parameters:
        s - the remote partner
        See Also:
        CoreConstants.SECURITY_REMOTE_PARTNER
      • getRemotePartner

        public java.lang.String getRemotePartner()
        Get the remote partner alias.
        Returns:
        the remote partner.
      • setEncryptionAlgorithm

        public void setEncryptionAlgorithm​(EncryptionAlgorithm enc)
        Set the encryption algorithm to be used.
        Parameters:
        enc - the encryption algorithm
      • getEncryptionAlgorithm

        public EncryptionAlgorithm getEncryptionAlgorithm()
        Get the encryption algorithm to be used.
        Returns:
        the encryption algorithm
      • setSecurityFactory

        public void setSecurityFactory​(SecurityServiceFactory s)
        Set the type of encryption to be used.
        Parameters:
        s - the encryption type.
      • getSecurityFactory

        public SecurityServiceFactory getSecurityFactory()
        Get the encryption type to be used.
        Returns:
        the encryption type.
      • getFailId

        public java.lang.String getFailId()
        Returns:
        the failId
      • setFailId

        public void setFailId​(java.lang.String s)
        Parameters:
        s - the failId to set
      • getSuccessId

        public java.lang.String getSuccessId()
        Returns:
        the successId
      • setSuccessId

        public void setSuccessId​(java.lang.String s)
        Parameters:
        s - the successId to set
      • getRemotePartnerMetadataKey

        public java.lang.String getRemotePartnerMetadataKey()
      • setRemotePartnerMetadataKey

        public void setRemotePartnerMetadataKey​(java.lang.String s)
      • setPrivateKeyPasswordProvider

        public void setPrivateKeyPasswordProvider​(PrivateKeyPasswordProvider pkpp)
        Set the private key password provider.
        Parameters:
        pkpp - the provider; default is LegacyPrivateKeyPasswordProvider which retrieves the private key password from 'security.properties' on the classpath to support backward compatibility.