Add support for SSH certificates to OIDC.

Update the interface for all the provisioners.
This commit is contained in:
Mariano Cano 2019-07-29 15:54:07 -07:00
parent a44b0a1d52
commit f01286bb48
9 changed files with 147 additions and 13 deletions

View file

@ -205,11 +205,13 @@ func (m *sshCertificateValidityModifier) Modify(cert *ssh.Certificate) error {
// sshCertificateOptionsValidator validates the user SSHOptions with the ones
// usually present in the token.
type sshCertificateOptionsValidator struct {
*SSHOptions
Want *SSHOptions
}
func (want *sshCertificateOptionsValidator) Valid(got SSHOptions) error {
return want.match(got)
// Valid implements SSHCertificateOptionsValidator and returns nil if both
// SSHOptions match.
func (v *sshCertificateOptionsValidator) Valid(got SSHOptions) error {
return v.Want.match(got)
}
// sshCertificateDefaultValidator implements a simple validator for all the