deny.proto 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. // Copyright 2022 Google LLC
  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. syntax = "proto3";
  15. package google.iam.v2beta;
  16. import "google/type/expr.proto";
  17. option csharp_namespace = "Google.Cloud.Iam.V2Beta";
  18. option go_package = "google.golang.org/genproto/googleapis/iam/v2beta;iam";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "DenyRuleProto";
  21. option java_package = "com.google.iam.v2beta";
  22. option php_namespace = "Google\\Cloud\\Iam\\V2beta";
  23. // A deny rule in an IAM deny policy.
  24. message DenyRule {
  25. // The identities that are prevented from using one or more permissions on
  26. // Google Cloud resources. This field can contain the following values:
  27. //
  28. // * `principalSet://goog/public:all`: A special identifier that represents
  29. // any principal that is on the internet, even if they do not have a Google
  30. // Account or are not logged in.
  31. //
  32. // * `principal://goog/subject/{email_id}`: A specific Google Account.
  33. // Includes Gmail, Cloud Identity, and Google Workspace user accounts. For
  34. // example, `principal://goog/subject/alice@example.com`.
  35. //
  36. // * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific
  37. // Google Account that was deleted recently. For example,
  38. // `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If
  39. // the Google Account is recovered, this identifier reverts to the standard
  40. // identifier for a Google Account.
  41. //
  42. // * `principalSet://goog/group/{group_id}`: A Google group. For example,
  43. // `principalSet://goog/group/admins@example.com`.
  44. //
  45. // * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group
  46. // that was deleted recently. For example,
  47. // `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If
  48. // the Google group is restored, this identifier reverts to the standard
  49. // identifier for a Google group.
  50. //
  51. // * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`:
  52. // A Google Cloud service account. For example,
  53. // `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`.
  54. //
  55. // * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`:
  56. // A Google Cloud service account that was deleted recently. For example,
  57. // `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`.
  58. // If the service account is undeleted, this identifier reverts to the
  59. // standard identifier for a service account.
  60. //
  61. // * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the
  62. // principals associated with the specified Google Workspace or Cloud
  63. // Identity customer ID. For example,
  64. // `principalSet://goog/cloudIdentityCustomerId/C01Abc35`.
  65. repeated string denied_principals = 1;
  66. // The identities that are excluded from the deny rule, even if they are
  67. // listed in the `denied_principals`. For example, you could add a Google
  68. // group to the `denied_principals`, then exclude specific users who belong to
  69. // that group.
  70. //
  71. // This field can contain the same values as the `denied_principals` field,
  72. // excluding `principalSet://goog/public:all`, which represents all users on
  73. // the internet.
  74. repeated string exception_principals = 2;
  75. // The permissions that are explicitly denied by this rule. Each permission
  76. // uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}`
  77. // is the fully qualified domain name for the service. For example,
  78. // `iam.googleapis.com/roles.list`.
  79. repeated string denied_permissions = 3;
  80. // Specifies the permissions that this rule excludes from the set of denied
  81. // permissions given by `denied_permissions`. If a permission appears in
  82. // `denied_permissions` _and_ in `exception_permissions` then it will _not_ be
  83. // denied.
  84. //
  85. // The excluded permissions can be specified using the same syntax as
  86. // `denied_permissions`.
  87. repeated string exception_permissions = 4;
  88. // The condition that determines whether this deny rule applies to a request.
  89. // If the condition expression evaluates to `true`, then the deny rule is
  90. // applied; otherwise, the deny rule is not applied.
  91. //
  92. // Each deny rule is evaluated independently. If this deny rule does not apply
  93. // to a request, other deny rules might still apply.
  94. //
  95. // The condition can use CEL functions that evaluate
  96. // [resource
  97. // tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other
  98. // functions and operators are not supported.
  99. google.type.Expr denial_condition = 5;
  100. }