mirror of
https://github.com/gravitational/teleport
synced 2024-10-20 17:23:22 +00:00
introduce setter and fix typo
This commit is contained in:
parent
176e0f5475
commit
daf04f1abe
|
@ -56,6 +56,8 @@ type CertAuthority interface {
|
|||
GetSigningKeys() [][]byte
|
||||
// GetRoles returns a list of roles assumed by users signed by this CA
|
||||
GetRoles() []string
|
||||
// SetRoles sets assigned roles for this certificate authority
|
||||
SetRoles(roles []string)
|
||||
// FirstSigningKey returns first signing key or returns error if it's not here
|
||||
// The first key is returned because multiple keys can exist during key rotation.
|
||||
FirstSigningKey() ([]byte, error)
|
||||
|
@ -195,6 +197,11 @@ func (ca *CertAuthorityV2) GetRoles() []string {
|
|||
return ca.Spec.Roles
|
||||
}
|
||||
|
||||
// SetRoles sets assigned roles for this certificate authority
|
||||
func (ca *CertAuthorityV2) SetRoles(roles []string) {
|
||||
ca.Spec.Roles = roles
|
||||
}
|
||||
|
||||
// GetRawObject returns raw object data, used for migrations
|
||||
func (ca *CertAuthorityV2) GetRawObject() interface{} {
|
||||
return ca.rawObject
|
||||
|
|
|
@ -647,7 +647,7 @@ func userCAFormat(ca services.CertAuthority, keyBytes []byte) (string, error) {
|
|||
// authorized_hosts format, a space-separated list of: makrer, hosts, key, and comment.
|
||||
// For example:
|
||||
//
|
||||
// @cert-authority *.cluster-a ssh-rsa AAA... type=user
|
||||
// @cert-authority *.cluster-a ssh-rsa AAA... type=host
|
||||
//
|
||||
// URL encoding is used to pass the CA type and allowed logins into the comment field.
|
||||
func hostCAFormat(ca services.CertAuthority, keyBytes []byte, client *auth.TunClient) (string, error) {
|
||||
|
|
Loading…
Reference in a new issue