Debian Codegraph @

third_party/googleapis/google/iam/v1/policy.proto

raw
1 // Copyright 2016 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 syntax = "proto3";
16
17 package google.iam.v1;
18
19 import "google/api/annotations.proto";
20
21 option cc_enable_arenas = true;
22 option csharp_namespace = "Google.Cloud.Iam.V1";
23 option go_package = "google.golang.org/genproto/googleapis/iam/v1;iam";
24 option java_multiple_files = true;
25 option java_outer_classname = "PolicyProto";
26 option java_package = "com.google.iam.v1";
27
28
29 // Defines an Identity and Access Management (IAM) policy. It is used to
30 // specify access control policies for Cloud Platform resources.
31 //
32 //
33 // A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
34 // `members` to a `role`, where the members can be user accounts, Google groups,
35 // Google domains, and service accounts. A `role` is a named list of permissions
36 // defined by IAM.
37 //
38 // **Example**
39 //
40 // {
41 // "bindings": [
42 // {
43 // "role": "roles/owner",
44 // "members": [
45 // "user:[email protected]",
46 // "group:[email protected]",
47 // "domain:google.com",
48 // "serviceAccount:[email protected]",
49 // ]
50 // },
51 // {
52 // "role": "roles/viewer",
53 // "members": ["user:[email protected]"]
54 // }
55 // ]
56 // }
57 //
58 // For a description of IAM and its features, see the
59 // [IAM developer's guide](https://cloud.google.com/iam).
60 message Policy {
61 // Version of the `Policy`. The default version is 0.
62 int32 version = 1;
63
64 // Associates a list of `members` to a `role`.
65 // Multiple `bindings` must not be specified for the same `role`.
66 // `bindings` with no members will result in an error.
67 repeated Binding bindings = 4;
68
69 // `etag` is used for optimistic concurrency control as a way to help
70 // prevent simultaneous updates of a policy from overwriting each other.
71 // It is strongly suggested that systems make use of the `etag` in the
72 // read-modify-write cycle to perform policy updates in order to avoid race
73 // conditions: An `etag` is returned in the response to `getIamPolicy`, and
74 // systems are expected to put that etag in the request to `setIamPolicy` to
75 // ensure that their change will be applied to the same version of the policy.
76 //
77 // If no `etag` is provided in the call to `setIamPolicy`, then the existing
78 // policy is overwritten blindly.
79 bytes etag = 3;
80 }
81
82 // Associates `members` with a `role`.
83 message Binding {
84 // Role that is assigned to `members`.
85 // For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
86 // Required
87 string role = 1;
88
89 // Specifies the identities requesting access for a Cloud Platform resource.
90 // `members` can have the following values:
91 //
92 // * `allUsers`: A special identifier that represents anyone who is
93 // on the internet; with or without a Google account.
94 //
95 // * `allAuthenticatedUsers`: A special identifier that represents anyone
96 // who is authenticated with a Google account or a service account.
97 //
98 // * `user:{emailid}`: An email address that represents a specific Google
99 // account. For example, `[email protected]` or `[email protected]`.
100 //
101 //
102 // * `serviceAccount:{emailid}`: An email address that represents a service
103 // account. For example, `[email protected]`.
104 //
105 // * `group:{emailid}`: An email address that represents a Google group.
106 // For example, `[email protected]`.
107 //
108 // * `domain:{domain}`: A Google Apps domain name that represents all the
109 // users of that domain. For example, `google.com` or `example.com`.
110 //
111 //
112 repeated string members = 2;
113 }
114
115 // The difference delta between two policies.
116 message PolicyDelta {
117 // The delta for Bindings between two policies.
118 repeated BindingDelta binding_deltas = 1;
119 }
120
121 // One delta entry for Binding. Each individual change (only one member in each
122 // entry) to a binding will be a separate entry.
123 message BindingDelta {
124 // The type of action performed on a Binding in a policy.
125 enum Action {
126 // Unspecified.
127 ACTION_UNSPECIFIED = 0;
128
129 // Addition of a Binding.
130 ADD = 1;
131
132 // Removal of a Binding.
133 REMOVE = 2;
134 }
135
136 // The action that was performed on a Binding.
137 // Required
138 Action action = 1;
139
140 // Role that is assigned to `members`.
141 // For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
142 // Required
143 string role = 2;
144
145 // A single identity requesting access for a Cloud Platform resource.
146 // Follows the same format of Binding.members.
147 // Required
148 string member = 3;
149 }