add group member capabilities (#178)
* add group member capabilities Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
This commit is contained in:
1 parent
c657e4b9fc
commit
260703febe
16 files changed
+1848
-27
No files matched your search
@@ -4,6 +4,7 @@ package controller.storage.iam.store.v1;
|
||||
option go_package = "github.com/hashicorp/watchtower/internal/iam/store;store";
|
||||
|
||||
import "controller/storage/timestamp/v1/timestamp.proto";
|
||||
import "controller/storage/iam/store/v1/scope.proto";
|
||||
|
||||
message Group {
|
||||
// public_id is used to access the Group via an API
|
||||
@@ -34,4 +35,9 @@ message Group {
|
||||
// disabled is by default false and allows a Group to be marked disabled.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
bool disabled = 7;
|
||||
|
||||
// version allows optimistic locking of the group when modifying the group
|
||||
// itself and when modifying dependent items like group members.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
uint32 version = 8;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package controller.storage.iam.store.v1;
|
||||
option go_package = "github.com/hashicorp/watchtower/internal/iam/store;store";
|
||||
|
||||
import "controller/storage/timestamp/v1/timestamp.proto";
|
||||
import "controller/storage/iam/store/v1/scope.proto";
|
||||
|
||||
message GroupMemberUser {
|
||||
// create_time from the RDBMS
|
||||
// @inject_tag: `gorm:"default:current_timestamp"`
|
||||
timestamp.v1.Timestamp create_time = 1;
|
||||
|
||||
// group_id is the group of this member.
|
||||
// @inject_tag: gorm:"primary_key"
|
||||
string group_id = 2;
|
||||
|
||||
// member_id is the public_id of the user (which is the member)
|
||||
// @inject_tag: gorm:"primary_key"
|
||||
string member_id = 3;
|
||||
}
|
||||
|
||||
message GroupMemberView {
|
||||
// create_time from the RDBMS
|
||||
// @inject_tag: `gorm:"default:current_timestamp"`
|
||||
timestamp.v1.Timestamp create_time = 1;
|
||||
|
||||
// group_id is the group of this member.
|
||||
// @inject_tag: gorm:"primary_key"
|
||||
string group_id = 2;
|
||||
|
||||
// member_id is the public_id of member
|
||||
// @inject_tag: gorm:"primary_key"
|
||||
string member_id = 3;
|
||||
|
||||
// Principal type (User or Group)
|
||||
string type = 4;
|
||||
|
||||
// member_scope_id of the member
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string member_scope_id = 5;
|
||||
|
||||
// group_scope_id of the role
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string group_scope_id = 6;
|
||||
|
||||
// scoped_member_id of the member
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string scoped_member_id = 7;
|
||||
}
|
||||
Reference in new issue
Block a user