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 oninstance-identitydirectly.- Since:
- 2.16
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static 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
Fields Modifier and Type Field Description static InstanceIdentityProvider.KeyTypes<DSAPublicKey,DSAPrivateKey>DSADeprecated.unusedstatic InstanceIdentityProvider.KeyTypes<ECPublicKey,ECPrivateKey>ECDeprecated.unusedstatic InstanceIdentityProvider.KeyTypes<RSAPublicKey,RSAPrivateKey>RSARSA keys.
-
Constructor Summary
Constructors Constructor Description InstanceIdentityProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract X509CertificategetCertificate()Gets the self-signedX509Certificatethat is associated with this identity.protected abstract KeyPairgetKeyPair()Gets theKeyPairthat comprises the instance identity.protected PRIVgetPrivateKey()Shortcut toKeyPair.getPrivate().protected PUBgetPublicKey()Shortcut toKeyPair.getPublic().
-
-
-
Field Detail
-
RSA
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final InstanceIdentityProvider.KeyTypes<RSAPublicKey,RSAPrivateKey> RSA
RSA keys.
-
DSA
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Deprecated public static final InstanceIdentityProvider.KeyTypes<DSAPublicKey,DSAPrivateKey> DSA
Deprecated.unusedDSA keys.
-
EC
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Deprecated public static final InstanceIdentityProvider.KeyTypes<ECPublicKey,ECPrivateKey> EC
Deprecated.unusedEC keys
-
-
Method Detail
-
getKeyPair
@CheckForNull protected abstract KeyPair 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
@CheckForNull protected PUB getPublicKey()
Shortcut toKeyPair.getPublic().- Returns:
- the public key.
nullifgetKeyPair()isnull.
-
getPrivateKey
@CheckForNull protected PRIV getPrivateKey()
Shortcut toKeyPair.getPrivate().- Returns:
- the private key.
nullifgetKeyPair()isnull.
-
getCertificate
@CheckForNull protected abstract X509Certificate 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.
-
-