Package org.jenkinsci.remoting.engine
Class JnlpClientDatabase
java.lang.Object
org.jenkinsci.remoting.engine.JnlpClientDatabase
Represents a database of clients that are permitted to connect.
- Since:
- 3.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe types of certificate validation results. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanCheck if the supplied client name exists.abstract StringgetSecretOf(String clientName) Gets the secret for the supplied client name.validateCertificate(String clientName, X509Certificate certificate) Performs client certificate validation.
-
Constructor Details
-
JnlpClientDatabase
public JnlpClientDatabase()
-
-
Method Details
-
exists
Check if the supplied client name exists.- Parameters:
clientName- the client name.- Returns:
trueif and only if the named client exists.
-
getSecretOf
Gets the secret for the supplied client name.- Parameters:
clientName- the client name.- Returns:
- the secret or
null. Should not returnnullifexists(String)but this may occur if there is a race between establishing a connection and the client being removed from the database.
-
validateCertificate
@NonNull public JnlpClientDatabase.ValidationResult validateCertificate(@NonNull String clientName, @NonNull X509Certificate certificate) Performs client certificate validation.- Parameters:
clientName- the client name.certificate- the certificate.- Returns:
- the validation.
-