Multiple grant scope IDs (#4251)
Co-authored-by: Timothy Messier <tim.messier@gmail.com> Co-authored-by: Todd <github@quaddi.com>
This commit is contained in:
70 files changed
+5460
-1009
No files matched your search
@@ -47,11 +47,6 @@ message Role {
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
uint32 version = 70;
|
||||
|
||||
// grant_scope_id is used for delegating access; it defines a scope other than
|
||||
// the role's scope that is used when compiling these grants into an ACL
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string grant_scope_id = 80 [(custom_options.v1.mask_mapping) = {
|
||||
this: "GrantScopeId"
|
||||
that: "grant_scope_id"
|
||||
}];
|
||||
// Previously grant_scope_id
|
||||
reserved 80;
|
||||
}
|
||||
@@ -15,7 +15,7 @@ message RoleGrant {
|
||||
timestamp.v1.Timestamp create_time = 1;
|
||||
|
||||
// role_id is the ID of the role this is a part of
|
||||
// @inject_tag: gorm:"primary_key"
|
||||
// @inject_tag: `gorm:"primary_key"`
|
||||
string role_id = 2;
|
||||
|
||||
// raw_grant is the string grant value as provided by the user
|
||||
@@ -24,6 +24,6 @@ message RoleGrant {
|
||||
|
||||
// canonical_grant is the canonical string representation of the grant value.
|
||||
// We use this as the unique constraint.
|
||||
// @inject_tag: gorm:"primary_key"
|
||||
// @inject_tag: `gorm:"primary_key"`
|
||||
string canonical_grant = 4;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package controller.storage.iam.store.v1;
|
||||
|
||||
import "controller/storage/timestamp/v1/timestamp.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/iam/store;store";
|
||||
|
||||
message RoleGrantScope {
|
||||
// create_time from the RDBMS
|
||||
// @inject_tag: `gorm:"default:current_timestamp"`
|
||||
timestamp.v1.Timestamp create_time = 1;
|
||||
|
||||
// role_id is the ID of the role this is a part of
|
||||
// @inject_tag: `gorm:"primary_key"`
|
||||
string role_id = 2;
|
||||
|
||||
// scope_id_or_special is the string grant scope value as provided by the
|
||||
// user, which may be one of a few special values as well
|
||||
//
|
||||
// @inject_tag: `gorm:"primary_key"`
|
||||
string scope_id_or_special = 3;
|
||||
}
|
||||
Reference in new issue
Block a user