Merge pull request #335 from smallstep/max/sshpop

Add SSHPOP default provisioner if SSH enabled during init
This commit is contained in:
Max 2020-07-31 11:07:48 -07:00 committed by GitHub
commit e55ad2ad52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -446,9 +446,19 @@ func (p *PKI) GenerateConfig(opt ...Option) (*authority.Config, error) {
HostKey: p.sshHostKey,
UserKey: p.sshUserKey,
}
// Enable SSH authorization for default JWK provisioner
prov.Claims = &provisioner.Claims{
EnableSSHCA: &enableSSHCA,
}
// Add default SSHPOP provisioner
sshpop := &provisioner.SSHPOP{
Type: "SSHPOP",
Name: "sshpop",
Claims: &provisioner.Claims{
EnableSSHCA: &enableSSHCA,
},
}
config.AuthorityConfig.Provisioners = append(config.AuthorityConfig.Provisioners, sshpop)
}
// Apply configuration modifiers