Add extra group constants and validation to pkg/bootstrap/api
.
This adds constants and validation for a new `auth-extra-groups` key on `bootstrap.kubernetes.io/token` secrets. This key allows a bootstrap token to authenticate to extra groups in addition to the `system:bootstrappers` group. Extra groups are always applied in addition to the `system:bootstrappers` group, must begin with a `system:bootstrappers:` prefix, are limited in length, and are limited to a restricted set of characters (alphanumeric, colons, and dashes without a trailing colon/dash).
This commit is contained in:
@@ -136,7 +136,7 @@ func (t *TokenAuthenticator) AuthenticateToken(token string) (user.Info, bool, e
|
||||
|
||||
return &user.DefaultInfo{
|
||||
Name: bootstrapapi.BootstrapUserPrefix + string(id),
|
||||
Groups: []string{bootstrapapi.BootstrapGroup},
|
||||
Groups: []string{bootstrapapi.BootstrapDefaultGroup},
|
||||
}, true, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user