Package com.ngrok.definitions
Class SshUserCertificate
java.lang.Object
com.ngrok.definitions.SshUserCertificate
A class encapsulating the
SshUserCertificate
resource.-
Constructor Summary
ConstructorDescriptionSshUserCertificate
(String id, URI uri, OffsetDateTime createdAt, String description, String metadata, String publicKey, String keyType, String sshCertificateAuthorityId, List<String> principals, Map<String, String> criticalOptions, Map<String, String> extensions, OffsetDateTime validAfter, OffsetDateTime validUntil, String certificate) Creates a new instance ofSshUserCertificate
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
the signed SSH certificate in OpenSSH Authorized Keys Format.timestamp when the SSH User Certificate API resource was created, RFC 3339 formatA map of critical options included in the certificate.human-readable description of this SSH User Certificate.A map of extensions included in the certificate.getId()
unique identifier for this SSH User Certificatethe key type of thepublic_key
, one ofrsa
,ecdsa
ored25519
arbitrary user-defined machine-readable data of this SSH User Certificate.the list of principals included in the ssh user certificate.a public key in OpenSSH Authorized Keys format that this certificate signsthe ssh certificate authority that is used to sign this ssh user certificategetUri()
URI of the SSH User Certificate API resourcethe time when the ssh host certificate becomes valid, in RFC 3339 format.the time after which the ssh host certificate becomes invalid, in RFC 3339 format.int
hashCode()
toString()
-
Constructor Details
-
SshUserCertificate
public SshUserCertificate(String id, URI uri, OffsetDateTime createdAt, String description, String metadata, String publicKey, String keyType, String sshCertificateAuthorityId, List<String> principals, Map<String, String> criticalOptions, Map<String, String> extensions, OffsetDateTime validAfter, OffsetDateTime validUntil, String certificate) Creates a new instance ofSshUserCertificate
.- Parameters:
id
- unique identifier for this SSH User Certificateuri
- URI of the SSH User Certificate API resourcecreatedAt
- timestamp when the SSH User Certificate API resource was created, RFC 3339 formatdescription
- 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.publicKey
- a public key in OpenSSH Authorized Keys format that this certificate signskeyType
- the key type of thepublic_key
, one ofrsa
,ecdsa
ored25519
sshCertificateAuthorityId
- the ssh certificate authority that is used to sign this ssh user certificateprincipals
- 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.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 ssh host certificate becomes valid, in RFC 3339 format.validUntil
- the time after which the ssh host certificate becomes invalid, in RFC 3339 format. the OpenSSH certificates RFC calls thisvalid_before
.certificate
- the signed SSH certificate in OpenSSH Authorized Keys Format. this value should be placed in a-cert.pub
certificate file on disk that should be referenced in yoursshd_config
configuration file with aHostCertificate
directive
-
-
Method Details
-
getId
unique identifier for this SSH User Certificate- Returns:
- the value of the property as a
String
-
getUri
URI of the SSH User Certificate API resource- Returns:
- the value of the property as a
URI
-
getCreatedAt
timestamp when the SSH User Certificate API resource was created, RFC 3339 format- Returns:
- the value of the property as a
OffsetDateTime
-
getDescription
human-readable description of this SSH User Certificate. optional, max 255 bytes.- Returns:
- the value of the property as a
String
-
getMetadata
arbitrary user-defined machine-readable data of this SSH User Certificate. optional, max 4096 bytes.- Returns:
- the value of the property as a
String
-
getPublicKey
a public key in OpenSSH Authorized Keys format that this certificate signs- Returns:
- the value of the property as a
String
-
getKeyType
the key type of thepublic_key
, one ofrsa
,ecdsa
ored25519
- Returns:
- the value of the property as a
String
-
getSshCertificateAuthorityId
the ssh certificate authority that is used to sign this ssh user certificate- Returns:
- the value of the property as a
String
-
getPrincipals
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. -
getCriticalOptions
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. -
getExtensions
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. -
getValidAfter
the time when the ssh host certificate becomes valid, in RFC 3339 format.- Returns:
- the value of the property as a
OffsetDateTime
-
getValidUntil
the time after which the ssh host certificate becomes invalid, in RFC 3339 format. the OpenSSH certificates RFC calls thisvalid_before
.- Returns:
- the value of the property as a
OffsetDateTime
-
getCertificate
the signed SSH certificate in OpenSSH Authorized Keys Format. this value should be placed in a-cert.pub
certificate file on disk that should be referenced in yoursshd_config
configuration file with aHostCertificate
directive- Returns:
- the value of the property as a
String
-
equals
-
hashCode
public int hashCode() -
toString
-