Class SshHostKeyVerificationStrategy<T extends HostKeyVerifierFactory>
java.lang.Object
hudson.model.AbstractDescribableImpl<SshHostKeyVerificationStrategy<T>>
org.jenkinsci.plugins.gitclient.verifier.SshHostKeyVerificationStrategy<T>
- All Implemented Interfaces:
ExtensionPoint
,Describable<SshHostKeyVerificationStrategy<T>>
- Direct Known Subclasses:
AcceptFirstConnectionStrategy
,KnownHostsFileVerificationStrategy
,ManuallyProvidedKeyVerificationStrategy
,NoHostKeyVerificationStrategy
public abstract class SshHostKeyVerificationStrategy<T extends HostKeyVerifierFactory>
extends AbstractDescribableImpl<SshHostKeyVerificationStrategy<T>>
implements ExtensionPoint
Secure shell host key verification strategy extension point for SSH connections from the git client plugin.
Secure shell (ssh) host key verification protects an SSH client from a
man in the middle attack.
Host key verifications strategies allow the Jenkins administrator to choose the level of host key verification that will be performed.
Host key verification strategies include:
Accept first connection
- Remembers the first host key encountered for each git server and requires that the same host key must be used for later access. This is usually the most convenient setting for administrators while still providing ssh host key verification
Known hosts file
- Uses the existing 'known_hosts' file on the controller and on the agent. This assumes the administrator has already configured this file on the controller and on all agents
Manually provided keys
- Provides a form field where the administrator inserts the host keys for the git repository servers. This works well when a small set of repository servers meet the needs of most users
No verification
- Disables all verification of ssh host keys. Not recommended because it provides no protection from "man-in-the-middle" attacks
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract T
Returns the ssh host key verifier for this strategy.
-
Field Details
-
KNOWN_HOSTS_DEFAULT
Default path to the known hosts file for the current user. -
JGIT_KNOWN_HOSTS_FILE
JGit known hosts file path for the current user. Uses thedefault path
to the known hosts file for the current user unless theJGIT_KNOWN_HOSTS_PROPERTY
property is set.
-
-
Constructor Details
-
SshHostKeyVerificationStrategy
public SshHostKeyVerificationStrategy()
-
-
Method Details
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<T extends HostKeyVerifierFactory>
- Overrides:
getDescriptor
in classAbstractDescribableImpl<SshHostKeyVerificationStrategy<T extends HostKeyVerifierFactory>>
-
getVerifier
Returns the ssh host key verifier for this strategy.- Returns:
- ssh host key verifier for this strategy.
-