Class InstanceIdentityProvider<PUB extends PublicKey,​PRIV extends PrivateKey>

  • Type Parameters:
    PUB - the type of public key.
    PRIV - the type of private key.
    All Implemented Interfaces:
    ExtensionPoint

    public abstract class InstanceIdentityProvider<PUB extends PublicKey,​PRIV extends PrivateKey>
    extends Object
    implements ExtensionPoint
    A source of instance identity.

    Should not be used from plugins, except to be implemented by instance-identity. Other plugins wishing to get the RSA key may depend on instance-identity directly.

    Since:
    2.16
    • Constructor Detail

      • InstanceIdentityProvider

        public InstanceIdentityProvider()
    • Method Detail

      • getKeyPair

        @CheckForNull
        protected abstract KeyPair getKeyPair()
        Gets the KeyPair that comprises the instance identity.
        Returns:
        the KeyPair that comprises the instance identity. null could technically be returned in the event that a keypair could not be generated, for example if the specific key type of this provider is not permitted at the required length by the JCA policy. More commonly it just means that the instance-identity plugin needs to be installed.
      • getCertificate

        @CheckForNull
        protected abstract X509Certificate getCertificate()
        Gets the self-signed X509Certificate that is associated with this identity. The certificate will must be currently valid. Repeated calls to this method may result in new certificates being generated.
        Returns:
        the certificate. null if getKeyPair() is null.