Class SshHostCertificate

java.lang.Object
com.ngrok.definitions.SshHostCertificate

public class SshHostCertificate extends Object
A class encapsulating the SshHostCertificate resource.
  • Constructor Details

    • SshHostCertificate

      public SshHostCertificate(String id, URI uri, OffsetDateTime createdAt, String description, String metadata, String publicKey, String keyType, String sshCertificateAuthorityId, List<String> principals, OffsetDateTime validAfter, OffsetDateTime validUntil, String certificate)
      Creates a new instance of SshHostCertificate.
      Parameters:
      id - unique identifier for this SSH Host Certificate
      uri - URI of the SSH Host Certificate API resource
      createdAt - timestamp when the SSH Host Certificate API resource was created, RFC 3339 format
      description - human-readable description of this SSH Host Certificate. optional, max 255 bytes.
      metadata - arbitrary user-defined machine-readable data of this SSH Host Certificate. optional, max 4096 bytes.
      publicKey - a public key in OpenSSH Authorized Keys format that this certificate signs
      keyType - the key type of the public_key, one of rsa, ecdsa or ed25519
      sshCertificateAuthorityId - the ssh certificate authority that is used to sign this ssh host certificate
      principals - the list of principals included in the ssh host certificate. This is the list of hostnames and/or IP addresses that are authorized to serve SSH traffic with this certificate. Dangerously, if no principals are specified, this certificate is considered valid for all hosts.
      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 this valid_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 your sshd_config configuration file with a HostCertificate directive
  • Method Details

    • getId

      public String getId()
      unique identifier for this SSH Host Certificate
      Returns:
      the value of the property as a String
    • getUri

      public URI getUri()
      URI of the SSH Host Certificate API resource
      Returns:
      the value of the property as a URI
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      timestamp when the SSH Host Certificate API resource was created, RFC 3339 format
      Returns:
      the value of the property as a OffsetDateTime
    • getDescription

      public String getDescription()
      human-readable description of this SSH Host Certificate. optional, max 255 bytes.
      Returns:
      the value of the property as a String
    • getMetadata

      public String getMetadata()
      arbitrary user-defined machine-readable data of this SSH Host Certificate. optional, max 4096 bytes.
      Returns:
      the value of the property as a String
    • getPublicKey

      public String getPublicKey()
      a public key in OpenSSH Authorized Keys format that this certificate signs
      Returns:
      the value of the property as a String
    • getKeyType

      public String getKeyType()
      the key type of the public_key, one of rsa, ecdsa or ed25519
      Returns:
      the value of the property as a String
    • getSshCertificateAuthorityId

      public String getSshCertificateAuthorityId()
      the ssh certificate authority that is used to sign this ssh host certificate
      Returns:
      the value of the property as a String
    • getPrincipals

      public List<String> getPrincipals()
      the list of principals included in the ssh host certificate. This is the list of hostnames and/or IP addresses that are authorized to serve SSH traffic with this certificate. Dangerously, if no principals are specified, this certificate is considered valid for all hosts.
      Returns:
      the value of the property as a List of String
    • getValidAfter

      public OffsetDateTime getValidAfter()
      the time when the ssh host certificate becomes valid, in RFC 3339 format.
      Returns:
      the value of the property as a OffsetDateTime
    • getValidUntil

      public OffsetDateTime getValidUntil()
      the time after which the ssh host certificate becomes invalid, in RFC 3339 format. the OpenSSH certificates RFC calls this valid_before.
      Returns:
      the value of the property as a OffsetDateTime
    • getCertificate

      public String 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 your sshd_config configuration file with a HostCertificate directive
      Returns:
      the value of the property as a String
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object