|
1 | 1 | package auth |
2 | 2 |
|
| 3 | +import "time" |
| 4 | + |
3 | 5 | // PasswordAuthRequest is an authentication request for password authentication. |
4 | 6 | // |
5 | 7 | // swagger:model PasswordAuthRequest |
@@ -58,6 +60,13 @@ type PublicKeyAuthRequest struct { |
58 | 60 | // |
59 | 61 | // required: true |
60 | 62 | PublicKey string `json:"publicKey"` |
| 63 | + |
| 64 | + // CACertificate contains information about the SSH certificate presented by a connecting client. This certificate |
| 65 | + // is not an SSL/TLS/x509 certificate and has a much simpler structure. However, this can be used to verify if the |
| 66 | + // connecting client belongs to an organization. |
| 67 | + // |
| 68 | + // required: false |
| 69 | + CACertificate CACertificate `json:"caCertificate,omitempty"` |
61 | 70 | } |
62 | 71 |
|
63 | 72 | // ResponseBody is a response to authentication requests. |
@@ -85,3 +94,22 @@ type Response struct { |
85 | 94 | // in: body |
86 | 95 | ResponseBody |
87 | 96 | } |
| 97 | + |
| 98 | +// CACertificate contains information about the SSH certificate presented by a connecting client. This certificate |
| 99 | +// is not an SSL/TLS/x509 certificate and has a much simpler structure. However, this can be used to verify if the |
| 100 | +// connecting client belongs to an organization. |
| 101 | +// |
| 102 | +// swagger:model CACertificate |
| 103 | +type CACertificate struct { |
| 104 | + // PublicKey contains the public key of the CA signing the public key presented in the OpenSSH authorized key |
| 105 | + // format. |
| 106 | + PublicKey string `json:"key"` |
| 107 | + // KeyID contains an identifier for the key. |
| 108 | + KeyID string `json:"keyID"` |
| 109 | + // ValidPrincipals contains a list of principals for which this CA certificate is valid. |
| 110 | + ValidPrincipals []string `json:"validPrincipals"` |
| 111 | + // ValidAfter contains the time after which this certificate is valid. This may be empty. |
| 112 | + ValidAfter *time.Time `json:"validAfter,omitempty"` |
| 113 | + // ValidBefore contains the time when this certificate expires. This may be empty. |
| 114 | + ValidBefore *time.Time `json:"validBefore,omitempty"` |
| 115 | +} |
0 commit comments