checker.proto 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Copyright 2019 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. //
  15. syntax = "proto3";
  16. package google.cloud.policytroubleshooter.v1;
  17. import public "google/cloud/policytroubleshooter/v1/explanations.proto";
  18. import "google/api/annotations.proto";
  19. import "google/api/client.proto";
  20. option cc_enable_arenas = true;
  21. option csharp_namespace = "Google.Cloud.PolicyTroubleshooter.V1";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/policytroubleshooter/v1;policytroubleshooter";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "IAMCheckerProto";
  25. option java_package = "com.google.cloud.policytroubleshooter.v1";
  26. option php_namespace = "Google\\Cloud\\PolicyTroubleshooter\\V1";
  27. option ruby_package = "Google::Cloud::PolicyTroubleshooter::V1";
  28. // IAM Policy Troubleshooter service.
  29. //
  30. // This service helps you troubleshoot access issues for Google Cloud resources.
  31. service IamChecker {
  32. option (google.api.default_host) = "policytroubleshooter.googleapis.com";
  33. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  34. // Checks whether a member has a specific permission for a specific resource,
  35. // and explains why the member does or does not have that permission.
  36. rpc TroubleshootIamPolicy(TroubleshootIamPolicyRequest) returns (TroubleshootIamPolicyResponse) {
  37. option (google.api.http) = {
  38. post: "/v1/iam:troubleshoot"
  39. body: "*"
  40. };
  41. }
  42. }
  43. // Request for [TroubleshootIamPolicy][google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy].
  44. message TroubleshootIamPolicyRequest {
  45. // The information to use for checking whether a member has a permission for a
  46. // resource.
  47. AccessTuple access_tuple = 1;
  48. }
  49. // Response for [TroubleshootIamPolicy][google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy].
  50. message TroubleshootIamPolicyResponse {
  51. // Indicates whether the member has the specified permission for the specified
  52. // resource, based on evaluating all of the applicable IAM policies.
  53. AccessState access = 1;
  54. // List of IAM policies that were evaluated to check the member's permissions,
  55. // with annotations to indicate how each policy contributed to the final
  56. // result.
  57. //
  58. // The list of policies can include the policy for the resource itself. It can
  59. // also include policies that are inherited from higher levels of the resource
  60. // hierarchy, including the organization, the folder, and the project.
  61. //
  62. // To learn more about the resource hierarchy, see
  63. // https://cloud.google.com/iam/help/resource-hierarchy.
  64. repeated ExplainedPolicy explained_policies = 2;
  65. }