103 lines
2.6 KiB
Protocol Buffer
103 lines
2.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package controller.api.resources.roles.v1;
|
|
|
|
option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api/resources/roles;roles";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
import "google/protobuf/wrappers.proto";
|
|
|
|
message Principal {
|
|
// The ID of the principal.
|
|
// Output only.
|
|
string id = 1;
|
|
|
|
// The type of the principal.
|
|
// Output only.
|
|
string type = 2;
|
|
|
|
// The scope ID of the principal.
|
|
// Output only.
|
|
string scope_id = 3 [json_name="scope_id"];
|
|
}
|
|
|
|
message GrantJson {
|
|
// The ID, if set.
|
|
// Output only.
|
|
string id = 1;
|
|
|
|
// The type, if set.
|
|
// Output only.
|
|
string type = 2;
|
|
|
|
// The actions.
|
|
// Output only.
|
|
repeated string actions = 3;
|
|
}
|
|
|
|
message Grant {
|
|
// The original user-supplied string.
|
|
// Output only.
|
|
string raw = 1;
|
|
|
|
// The canonically formatted string.
|
|
// Output only.
|
|
string canonical = 2;
|
|
|
|
// The JSON representation of the grant.
|
|
// Output only.
|
|
GrantJson json = 3;
|
|
}
|
|
|
|
// Role contains all fields related to a Role resource
|
|
message Role {
|
|
// The ID of the Role
|
|
// Output only.
|
|
string id = 1;
|
|
|
|
// Optional name for identification purposes
|
|
google.protobuf.StringValue name = 2;
|
|
|
|
// Optional user-set description for identification purposes
|
|
google.protobuf.StringValue description = 3;
|
|
|
|
// The time this resource was created
|
|
// Output only.
|
|
google.protobuf.Timestamp created_time = 4 [json_name="created_time"];
|
|
|
|
// The time this resource was last updated.
|
|
// Output only.
|
|
google.protobuf.Timestamp updated_time = 5 [json_name="updated_time"];
|
|
|
|
// Whether the resource is disabled
|
|
google.protobuf.BoolValue disabled = 6;
|
|
|
|
// The scope the grants will apply to. If the role is at the global scope,
|
|
// this can be an org or project. If the role is at an org
|
|
// scope, this can be a project within the org. It is invalid for
|
|
// this to be anything other than the role's scope when the role's scope is
|
|
// a project.
|
|
google.protobuf.StringValue grant_scope_id = 7 [json_name="grant_scope_id"];
|
|
|
|
// The version can be used in subsiquent write requests to ensure this resource
|
|
// has not changed and to fail the write if it has.
|
|
// Output only.
|
|
uint32 version = 8;
|
|
|
|
// The IDs (only) of principals that are assigned to this role.
|
|
// Output only.
|
|
repeated string principal_ids = 9 [json_name="principal_ids"];
|
|
|
|
// The principals that are assigned to this role.
|
|
// Output only.
|
|
repeated Principal principals = 10;
|
|
|
|
// The grants that this role provides for its principals.
|
|
// Output only.
|
|
repeated string grant_strings = 11 [json_name="grant_strings"];
|
|
|
|
// The parsed grant information.
|
|
// Output only.
|
|
repeated Grant grants = 12;
|
|
}
|