Package com.ngrok.services
Class SshUserCertificates.CreateCallBuilder
java.lang.Object
com.ngrok.services.SshUserCertificates.CreateCallBuilder
- Enclosing class:
- SshUserCertificates
A builder object encapsulating state for an unsent Create API call.
-
Method Summary
Modifier and TypeMethodDescriptionInitiates the API call and blocks until it returns.call()
Initiates the API call asynchronously.criticalOptions
(Map<String, String> criticalOptions) A map of critical options included in the certificate.criticalOptions
(Optional<Map<String, String>> criticalOptions) A map of critical options included in the certificate.description
(String description) human-readable description of this SSH User Certificate.description
(Optional<String> description) human-readable description of this SSH User Certificate.extensions
(Map<String, String> extensions) A map of extensions included in the certificate.extensions
(Optional<Map<String, String>> extensions) A map of extensions included in the certificate.arbitrary user-defined machine-readable data of this SSH User Certificate.arbitrary user-defined machine-readable data of this SSH User Certificate.principals
(List<String> principals) the list of principals included in the ssh user certificate.principals
(Optional<List<String>> principals) the list of principals included in the ssh user certificate.validAfter
(OffsetDateTime validAfter) The time when the user certificate becomes valid, in RFC 3339 format.validAfter
(Optional<OffsetDateTime> validAfter) The time when the user certificate becomes valid, in RFC 3339 format.validUntil
(OffsetDateTime validUntil) The time when this host certificate becomes invalid, in RFC 3339 format.validUntil
(Optional<OffsetDateTime> validUntil) The time when this host certificate becomes invalid, in RFC 3339 format.
-
Method Details
-
principals
the list of principals included in the ssh user certificate. This is the list of usernames that the certificate holder may sign in as on a machine authorizing the signing certificate authority. Dangerously, if no principals are specified, this certificate may be used to log in as any user. -
principals
the list of principals included in the ssh user certificate. This is the list of usernames that the certificate holder may sign in as on a machine authorizing the signing certificate authority. Dangerously, if no principals are specified, this certificate may be used to log in as any user. -
criticalOptions
A map of critical options included in the certificate. Only two critical options are currently defined by OpenSSH:force-command
andsource-address
. See the OpenSSH certificate protocol spec for additional details. -
criticalOptions
public SshUserCertificates.CreateCallBuilder criticalOptions(Optional<Map<String, String>> criticalOptions) A map of critical options included in the certificate. Only two critical options are currently defined by OpenSSH:force-command
andsource-address
. See the OpenSSH certificate protocol spec for additional details. -
extensions
A map of extensions included in the certificate. Extensions are additional metadata that can be interpreted by the SSH server for any purpose. These can be used to permit or deny the ability to open a terminal, do port forwarding, x11 forwarding, and more. If unspecified, the certificate will include limited permissions with the following extension map:{"permit-pty": "", "permit-user-rc": ""}
OpenSSH understands a number of predefined extensions. See the OpenSSH certificate protocol spec for additional details. -
extensions
A map of extensions included in the certificate. Extensions are additional metadata that can be interpreted by the SSH server for any purpose. These can be used to permit or deny the ability to open a terminal, do port forwarding, x11 forwarding, and more. If unspecified, the certificate will include limited permissions with the following extension map:{"permit-pty": "", "permit-user-rc": ""}
OpenSSH understands a number of predefined extensions. See the OpenSSH certificate protocol spec for additional details. -
validAfter
The time when the user certificate becomes valid, in RFC 3339 format. Defaults to the current time if unspecified.- Parameters:
validAfter
- the value of the valid_after parameter as aOffsetDateTime
- Returns:
- the call builder instance
-
validAfter
The time when the user certificate becomes valid, in RFC 3339 format. Defaults to the current time if unspecified.- Parameters:
validAfter
- the value of the valid_after parameter as anOptional
ofOffsetDateTime
- Returns:
- the call builder instance
-
validUntil
The time when this host certificate becomes invalid, in RFC 3339 format. If unspecified, a default value of 24 hours will be used. The OpenSSH certificates RFC calls thisvalid_before
.- Parameters:
validUntil
- the value of the valid_until parameter as aOffsetDateTime
- Returns:
- the call builder instance
-
validUntil
The time when this host certificate becomes invalid, in RFC 3339 format. If unspecified, a default value of 24 hours will be used. The OpenSSH certificates RFC calls thisvalid_before
.- Parameters:
validUntil
- the value of the valid_until parameter as anOptional
ofOffsetDateTime
- Returns:
- the call builder instance
-
description
human-readable description of this SSH User Certificate. optional, max 255 bytes.- Parameters:
description
- the value of the description parameter as aString
- Returns:
- the call builder instance
-
description
human-readable description of this SSH User Certificate. optional, max 255 bytes. -
metadata
arbitrary user-defined machine-readable data of this SSH User Certificate. optional, max 4096 bytes.- Parameters:
metadata
- the value of the metadata parameter as aString
- Returns:
- the call builder instance
-
metadata
arbitrary user-defined machine-readable data of this SSH User Certificate. optional, max 4096 bytes. -
call
Initiates the API call asynchronously.- Returns:
- a
CompletionStage
ofSshUserCertificate
-
blockingCall
Initiates the API call and blocks until it returns.- Returns:
SshUserCertificate
- Throws:
InterruptedException
- if the thread was interrupted during the call
-