mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-12 02:15:01 +00:00
Clarify requirement that spec.assigned_scope be equiv or descendent to scope for ScopedToken (#64211)
* Clarify equiv||descendent nature of `spec.assigned_scope` in RFD * Update proto * spag: remove "a"
This commit is contained in:
@@ -144,6 +144,8 @@ func (x *ScopedToken) GetStatus() *ScopedTokenStatus {
|
||||
type ScopedTokenSpec struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The scope to which this token is assigned.
|
||||
//
|
||||
// Must be equivalent or descendent to the scope of the token itself.
|
||||
AssignedScope string `protobuf:"bytes,1,opt,name=assigned_scope,json=assignedScope,proto3" json:"assigned_scope,omitempty"`
|
||||
// The list of roles associated with the token. They will be converted
|
||||
// to metadata in the SSH and X509 certificates issued to the user of the
|
||||
|
||||
@@ -51,6 +51,8 @@ message ScopedToken {
|
||||
// ScopedTokenSpec is the specification of a scoped token.
|
||||
message ScopedTokenSpec {
|
||||
// The scope to which this token is assigned.
|
||||
//
|
||||
// Must be equivalent or descendent to the scope of the token itself.
|
||||
string assigned_scope = 1;
|
||||
|
||||
// The list of roles associated with the token. They will be converted
|
||||
|
||||
@@ -86,6 +86,8 @@ to facilitate existing provisioning semantics.
|
||||
message ScopedTokenSpec {
|
||||
- // AssignedScope is the scope to which this token is assigned.
|
||||
+ // The scope to which this token is assigned.
|
||||
+ //
|
||||
* // Must be equivalent or descendent to the scope of the token itself.
|
||||
string assigned_scope = 1;
|
||||
|
||||
- // TODO(fspmarshall): port relevant token features to scoped tokens.
|
||||
@@ -167,6 +169,10 @@ keypair join method manages the registration secret. The `token` join method
|
||||
will require specifying both the token's name and secret when using scoped
|
||||
tokens.
|
||||
|
||||
The `spec.assigned_scope` field specifies the scope that will be assigned to any
|
||||
resource provisioned using this token. This must be specified and must be
|
||||
equivalent or descendent to the `scope` of the token resource itself.
|
||||
|
||||
### Provisioning
|
||||
|
||||
Scoped resources will be provisioned by extending the existing `Join` RPC to
|
||||
|
||||
Reference in New Issue
Block a user