Package jenkins.model.identity
Class InstanceIdentityProvider<PUB extends PublicKey,PRIV extends PrivateKey>
java.lang.Object
jenkins.model.identity.InstanceIdentityProvider<PUB,PRIV>
- 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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classInstanceIdentityProvider.KeyTypes<PUB extends PublicKey,PRIV extends PrivateKey> Holds information about the paired keytypes that can be used to form the various identity keys.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final InstanceIdentityProvider.KeyTypes<DSAPublicKey,DSAPrivateKey> Deprecated.unusedstatic final InstanceIdentityProvider.KeyTypes<ECPublicKey,ECPrivateKey> Deprecated.unusedstatic final InstanceIdentityProvider.KeyTypes<RSAPublicKey,RSAPrivateKey> RSA keys. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract X509CertificateGets the self-signedX509Certificatethat is associated with this identity.protected abstract KeyPairGets theKeyPairthat comprises the instance identity.protected PRIVShortcut toKeyPair.getPrivate().protected PUBShortcut toKeyPair.getPublic().
-
Field Details
-
RSA
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final InstanceIdentityProvider.KeyTypes<RSAPublicKey,RSAPrivateKey> RSARSA keys. -
DSA
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Deprecated public static final InstanceIdentityProvider.KeyTypes<DSAPublicKey,DSAPrivateKey> DSADeprecated.unusedDSA keys. -
EC
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Deprecated public static final InstanceIdentityProvider.KeyTypes<ECPublicKey,ECPrivateKey> ECDeprecated.unusedEC keys
-
-
Constructor Details
-
InstanceIdentityProvider
public InstanceIdentityProvider()
-
-
Method Details
-
getKeyPair
Gets theKeyPairthat comprises the instance identity.- Returns:
- the
KeyPairthat comprises the instance identity.nullcould 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 theinstance-identityplugin needs to be installed.
-
getPublicKey
Shortcut toKeyPair.getPublic().- Returns:
- the public key.
nullifgetKeyPair()isnull.
-
getPrivateKey
Shortcut toKeyPair.getPrivate().- Returns:
- the private key.
nullifgetKeyPair()isnull.
-
getCertificate
Gets the self-signedX509Certificatethat 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.
nullifgetKeyPair()isnull.
-