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