common.proto 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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.cloud.oslogin.common;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. option csharp_namespace = "Google.Cloud.OsLogin.Common";
  19. option go_package = "google.golang.org/genproto/googleapis/cloud/oslogin/common;common";
  20. option java_outer_classname = "OsLoginProto";
  21. option java_package = "com.google.cloud.oslogin.common";
  22. option php_namespace = "Google\\Cloud\\OsLogin\\Common";
  23. option ruby_package = "Google::Cloud::OsLogin::Common";
  24. option (google.api.resource_definition) = {
  25. type: "oslogin.googleapis.com/User"
  26. pattern: "users/{user}"
  27. };
  28. // The operating system options for account entries.
  29. enum OperatingSystemType {
  30. // The operating system type associated with the user account information is
  31. // unspecified.
  32. OPERATING_SYSTEM_TYPE_UNSPECIFIED = 0;
  33. // Linux user account information.
  34. LINUX = 1;
  35. // Windows user account information.
  36. WINDOWS = 2;
  37. }
  38. // The POSIX account information associated with a Google account.
  39. message PosixAccount {
  40. option (google.api.resource) = {
  41. type: "oslogin.googleapis.com/PosixAccount"
  42. pattern: "users/{user}/projects/{project}"
  43. };
  44. // Only one POSIX account can be marked as primary.
  45. bool primary = 1;
  46. // The username of the POSIX account.
  47. string username = 2;
  48. // The user ID.
  49. int64 uid = 3;
  50. // The default group ID.
  51. int64 gid = 4;
  52. // The path to the home directory for this account.
  53. string home_directory = 5;
  54. // The path to the logic shell for this account.
  55. string shell = 6;
  56. // The GECOS (user information) entry for this account.
  57. string gecos = 7;
  58. // System identifier for which account the username or uid applies to.
  59. // By default, the empty value is used.
  60. string system_id = 8;
  61. // Output only. A POSIX account identifier.
  62. string account_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  63. // The operating system type where this account applies.
  64. OperatingSystemType operating_system_type = 10;
  65. // Output only. The canonical resource name.
  66. string name = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  67. }
  68. // The SSH public key information associated with a Google account.
  69. message SshPublicKey {
  70. option (google.api.resource) = {
  71. type: "oslogin.googleapis.com/SshPublicKey"
  72. pattern: "users/{user}/sshPublicKeys/{fingerprint}"
  73. };
  74. // Public key text in SSH format, defined by
  75. // <a href="https://www.ietf.org/rfc/rfc4253.txt" target="_blank">RFC4253</a>
  76. // section 6.6.
  77. string key = 1;
  78. // An expiration time in microseconds since epoch.
  79. int64 expiration_time_usec = 2;
  80. // Output only. The SHA-256 fingerprint of the SSH public key.
  81. string fingerprint = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  82. // Output only. The canonical resource name.
  83. string name = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  84. }