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
Modifier and TypeClassDescriptionstatic final class
InstanceIdentityProvider.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
Modifier 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract X509Certificate
Gets the self-signedX509Certificate
that is associated with this identity.protected abstract KeyPair
Gets theKeyPair
that comprises the instance identity.protected PRIV
Shortcut toKeyPair.getPrivate()
.protected PUB
Shortcut 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 theKeyPair
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 theinstance-identity
plugin needs to be installed.
-
getPublicKey
Shortcut toKeyPair.getPublic()
.- Returns:
- the public key.
null
ifgetKeyPair()
isnull
.
-
getPrivateKey
Shortcut toKeyPair.getPrivate()
.- Returns:
- the private key.
null
ifgetKeyPair()
isnull
.
-
getCertificate
Gets the self-signedX509Certificate
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
ifgetKeyPair()
isnull
.
-