google-cloud-os_login 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/README.md +39 -2
- data/lib/google/cloud/os_login.rb +34 -4
- data/lib/google/cloud/os_login/v1.rb +134 -0
- data/lib/google/cloud/os_login/v1/credentials.rb +43 -0
- data/lib/google/cloud/os_login/v1/doc/google/cloud/oslogin/common/common.rb +66 -0
- data/lib/google/cloud/os_login/v1/doc/google/cloud/oslogin/v1/oslogin.rb +111 -0
- data/lib/google/cloud/os_login/v1/doc/google/protobuf/empty.rb +28 -0
- data/lib/google/cloud/os_login/v1/doc/google/protobuf/field_mask.rb +223 -0
- data/lib/google/cloud/os_login/v1/doc/overview.rb +79 -0
- data/lib/google/cloud/os_login/v1/os_login_service_client.rb +473 -0
- data/lib/google/cloud/os_login/v1/os_login_service_client_config.json +56 -0
- data/lib/google/cloud/os_login/v1beta.rb +62 -28
- data/lib/google/cloud/os_login/v1beta/credentials.rb +43 -0
- data/lib/google/cloud/os_login/v1beta/doc/google/cloud/oslogin/common/common.rb +66 -0
- data/lib/google/cloud/os_login/v1beta/doc/google/cloud/oslogin/v1beta/oslogin.rb +2 -2
- data/lib/google/cloud/os_login/v1beta/doc/google/protobuf/empty.rb +28 -0
- data/lib/google/cloud/os_login/v1beta/doc/google/protobuf/field_mask.rb +1 -1
- data/lib/google/cloud/os_login/v1beta/doc/overview.rb +27 -2
- data/lib/google/cloud/os_login/v1beta/os_login_service_client.rb +82 -38
- data/lib/google/cloud/oslogin/{common_pb.rb → common/common_pb.rb} +1 -1
- data/lib/google/cloud/oslogin/v1/oslogin_pb.rb +59 -0
- data/lib/google/cloud/oslogin/v1/oslogin_services_pb.rb +62 -0
- data/lib/google/cloud/oslogin/v1beta/oslogin_pb.rb +1 -1
- metadata +53 -12
- data/lib/google/cloud/os_login/credentials.rb +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bb05e6e4b9504dc2201682cc2c8033222162dce9a4b53bc7e5e708b08adb2c5
|
4
|
+
data.tar.gz: e0331a575f3309fab23fada73e51532817d112d1052f54592c4c291b73245dc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 329d0d73690b45cfe7ced0ca7bcf2a9aac6ce2121a590fa4404228e85abb7f5743ce4cc7c4eedd2a1ac5e976a47ace9d2a60a0f707cea3729ba0541edaf2471b
|
7
|
+
data.tar.gz: 04d14aaf33ac1c1cea28163a204a732541b1436af297a20bb295a03317bab4672e4104ab58e746c197e6e79f4e2e78bdc2528043cbc4eef8d1700e33e3bf9778
|
data/.yardopts
CHANGED
data/README.md
CHANGED
@@ -11,7 +11,7 @@ steps:
|
|
11
11
|
|
12
12
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
13
13
|
2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
14
|
-
3. [Enable the Google Cloud OS Login API.](https://console.cloud.google.com/apis/
|
14
|
+
3. [Enable the Google Cloud OS Login API.](https://console.cloud.google.com/apis/library/oslogin.googleapis.com)
|
15
15
|
4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
16
16
|
|
17
17
|
### Installation
|
@@ -27,5 +27,42 @@ $ gem install google-cloud-os_login
|
|
27
27
|
- View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
28
28
|
to see the full list of Cloud APIs that we cover.
|
29
29
|
|
30
|
-
[Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-os_login/latest/google/cloud/oslogin
|
30
|
+
[Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-os_login/latest/google/cloud/oslogin/
|
31
31
|
[Product Documentation]: https://cloud.google.com/compute/docs/oslogin/rest/
|
32
|
+
|
33
|
+
## Enabling Logging
|
34
|
+
|
35
|
+
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
36
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
37
|
+
or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
38
|
+
that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
39
|
+
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
40
|
+
|
41
|
+
Configuring a Ruby stdlib logger:
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
require "logger"
|
45
|
+
|
46
|
+
module MyLogger
|
47
|
+
LOGGER = Logger.new $stderr, level: Logger::WARN
|
48
|
+
def logger
|
49
|
+
LOGGER
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
54
|
+
module GRPC
|
55
|
+
extend MyLogger
|
56
|
+
end
|
57
|
+
```
|
58
|
+
|
59
|
+
## Supported Ruby Versions
|
60
|
+
|
61
|
+
This library is supported on Ruby 2.3+.
|
62
|
+
|
63
|
+
Google provides official support for Ruby versions that are actively supported
|
64
|
+
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
65
|
+
in security maintenance, and not end of life. Currently, this means Ruby 2.3
|
66
|
+
and later. Older versions of Ruby _may_ still work, but are unsupported and not
|
67
|
+
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
|
68
|
+
about the Ruby support schedule.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2018 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -32,7 +32,7 @@ module Google
|
|
32
32
|
#
|
33
33
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
34
34
|
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
35
|
-
# 3. [Enable the Google Cloud OS Login API.](https://console.cloud.google.com/apis/
|
35
|
+
# 3. [Enable the Google Cloud OS Login API.](https://console.cloud.google.com/apis/library/oslogin.googleapis.com)
|
36
36
|
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
37
37
|
#
|
38
38
|
# ### Next Steps
|
@@ -43,6 +43,31 @@ module Google
|
|
43
43
|
#
|
44
44
|
# [Product Documentation]: https://cloud.google.com/compute/docs/oslogin/rest/
|
45
45
|
#
|
46
|
+
# ## Enabling Logging
|
47
|
+
#
|
48
|
+
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
|
+
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
50
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
51
|
+
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
|
+
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
|
+
#
|
54
|
+
# Configuring a Ruby stdlib logger:
|
55
|
+
#
|
56
|
+
# ```ruby
|
57
|
+
# require "logger"
|
58
|
+
#
|
59
|
+
# module MyLogger
|
60
|
+
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
61
|
+
# def logger
|
62
|
+
# LOGGER
|
63
|
+
# end
|
64
|
+
# end
|
65
|
+
#
|
66
|
+
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
+
# module GRPC
|
68
|
+
# extend MyLogger
|
69
|
+
# end
|
70
|
+
# ```
|
46
71
|
#
|
47
72
|
module OsLogin
|
48
73
|
# rubocop:enable LineLength
|
@@ -62,7 +87,7 @@ module Google
|
|
62
87
|
# public keys for logging into virtual machines on Google Cloud Platform.
|
63
88
|
#
|
64
89
|
# @param version [Symbol, String]
|
65
|
-
# The major version of the service to be used. By default :
|
90
|
+
# The major version of the service to be used. By default :v1
|
66
91
|
# is used.
|
67
92
|
# @overload new(version:, credentials:, scopes:, client_config:, timeout:)
|
68
93
|
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
@@ -89,7 +114,12 @@ module Google
|
|
89
114
|
# or the specified config is missing data points.
|
90
115
|
# @param timeout [Numeric]
|
91
116
|
# The default timeout, in seconds, for calls made through this client.
|
92
|
-
|
117
|
+
# @param metadata [Hash]
|
118
|
+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
119
|
+
# @param exception_transformer [Proc]
|
120
|
+
# An optional proc that intercepts any exceptions raised during an API call to inject
|
121
|
+
# custom error handling.
|
122
|
+
def self.new(*args, version: :v1, **kwargs)
|
93
123
|
unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
|
94
124
|
raise "The version: #{version} is not available. The available versions " \
|
95
125
|
"are: [#{AVAILABLE_VERSIONS.join(", ")}]"
|
@@ -0,0 +1,134 @@
|
|
1
|
+
# Copyright 2018 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
|
+
# https://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
|
+
require "google/cloud/os_login/v1/os_login_service_client"
|
16
|
+
|
17
|
+
module Google
|
18
|
+
module Cloud
|
19
|
+
module OsLogin
|
20
|
+
# rubocop:disable LineLength
|
21
|
+
|
22
|
+
##
|
23
|
+
# # Ruby Client for Google Cloud OS Login API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
24
|
+
#
|
25
|
+
# [Google Cloud OS Login API][Product Documentation]:
|
26
|
+
# Manages OS login configuration for Google account users.
|
27
|
+
# - [Product Documentation][]
|
28
|
+
#
|
29
|
+
# ## Quick Start
|
30
|
+
# In order to use this library, you first need to go through the following
|
31
|
+
# steps:
|
32
|
+
#
|
33
|
+
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
34
|
+
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
35
|
+
# 3. [Enable the Google Cloud OS Login API.](https://console.cloud.google.com/apis/library/oslogin.googleapis.com)
|
36
|
+
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
37
|
+
#
|
38
|
+
# ### Next Steps
|
39
|
+
# - Read the [Google Cloud OS Login API Product documentation][Product Documentation]
|
40
|
+
# to learn more about the product and see How-to Guides.
|
41
|
+
# - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
42
|
+
# to see the full list of Cloud APIs that we cover.
|
43
|
+
#
|
44
|
+
# [Product Documentation]: https://cloud.google.com/compute/docs/oslogin/rest/
|
45
|
+
#
|
46
|
+
# ## Enabling Logging
|
47
|
+
#
|
48
|
+
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
|
+
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
50
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
51
|
+
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
|
+
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
|
+
#
|
54
|
+
# Configuring a Ruby stdlib logger:
|
55
|
+
#
|
56
|
+
# ```ruby
|
57
|
+
# require "logger"
|
58
|
+
#
|
59
|
+
# module MyLogger
|
60
|
+
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
61
|
+
# def logger
|
62
|
+
# LOGGER
|
63
|
+
# end
|
64
|
+
# end
|
65
|
+
#
|
66
|
+
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
+
# module GRPC
|
68
|
+
# extend MyLogger
|
69
|
+
# end
|
70
|
+
# ```
|
71
|
+
#
|
72
|
+
module V1
|
73
|
+
# rubocop:enable LineLength
|
74
|
+
|
75
|
+
##
|
76
|
+
# Cloud OS Login API
|
77
|
+
#
|
78
|
+
# The Cloud OS Login API allows you to manage users and their associated SSH
|
79
|
+
# public keys for logging into virtual machines on Google Cloud Platform.
|
80
|
+
#
|
81
|
+
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
82
|
+
# Provides the means for authenticating requests made by the client. This parameter can
|
83
|
+
# be many types.
|
84
|
+
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
85
|
+
# authenticating requests made by this client.
|
86
|
+
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
87
|
+
# credentials for this client.
|
88
|
+
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
89
|
+
# credentials for this client.
|
90
|
+
# A `GRPC::Core::Channel` will be used to make calls through.
|
91
|
+
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
92
|
+
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
93
|
+
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
94
|
+
# metadata for requests, generally, to give OAuth credentials.
|
95
|
+
# @param scopes [Array<String>]
|
96
|
+
# The OAuth scopes for this service. This parameter is ignored if
|
97
|
+
# an updater_proc is supplied.
|
98
|
+
# @param client_config [Hash]
|
99
|
+
# A Hash for call options for each method. See
|
100
|
+
# Google::Gax#construct_settings for the structure of
|
101
|
+
# this data. Falls back to the default config if not specified
|
102
|
+
# or the specified config is missing data points.
|
103
|
+
# @param timeout [Numeric]
|
104
|
+
# The default timeout, in seconds, for calls made through this client.
|
105
|
+
# @param metadata [Hash]
|
106
|
+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
107
|
+
# @param exception_transformer [Proc]
|
108
|
+
# An optional proc that intercepts any exceptions raised during an API call to inject
|
109
|
+
# custom error handling.
|
110
|
+
def self.new \
|
111
|
+
credentials: nil,
|
112
|
+
scopes: nil,
|
113
|
+
client_config: nil,
|
114
|
+
timeout: nil,
|
115
|
+
metadata: nil,
|
116
|
+
exception_transformer: nil,
|
117
|
+
lib_name: nil,
|
118
|
+
lib_version: nil
|
119
|
+
kwargs = {
|
120
|
+
credentials: credentials,
|
121
|
+
scopes: scopes,
|
122
|
+
client_config: client_config,
|
123
|
+
timeout: timeout,
|
124
|
+
metadata: metadata,
|
125
|
+
exception_transformer: exception_transformer,
|
126
|
+
lib_name: lib_name,
|
127
|
+
lib_version: lib_version
|
128
|
+
}.select { |_, v| v != nil }
|
129
|
+
Google::Cloud::OsLogin::V1::OsLoginServiceClient.new(**kwargs)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Copyright 2018 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
|
+
# https://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
|
+
require "googleauth"
|
16
|
+
|
17
|
+
module Google
|
18
|
+
module Cloud
|
19
|
+
module OsLogin
|
20
|
+
module V1
|
21
|
+
class Credentials < Google::Auth::Credentials
|
22
|
+
SCOPE = [
|
23
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
24
|
+
"https://www.googleapis.com/auth/cloud-platform.read-only",
|
25
|
+
"https://www.googleapis.com/auth/compute",
|
26
|
+
"https://www.googleapis.com/auth/compute.readonly"
|
27
|
+
].freeze
|
28
|
+
PATH_ENV_VARS = %w(OS_LOGIN_CREDENTIALS
|
29
|
+
OS_LOGIN_KEYFILE
|
30
|
+
GOOGLE_CLOUD_CREDENTIALS
|
31
|
+
GOOGLE_CLOUD_KEYFILE
|
32
|
+
GCLOUD_KEYFILE)
|
33
|
+
JSON_ENV_VARS = %w(OS_LOGIN_CREDENTIALS_JSON
|
34
|
+
OS_LOGIN_KEYFILE_JSON
|
35
|
+
GOOGLE_CLOUD_CREDENTIALS_JSON
|
36
|
+
GOOGLE_CLOUD_KEYFILE_JSON
|
37
|
+
GCLOUD_KEYFILE_JSON)
|
38
|
+
DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Copyright 2018 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
|
+
# https://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
|
+
module Google
|
16
|
+
module Cloud
|
17
|
+
module Oslogin
|
18
|
+
module Common
|
19
|
+
# The POSIX account information associated with a Google account.
|
20
|
+
# @!attribute [rw] primary
|
21
|
+
# @return [true, false]
|
22
|
+
# Only one POSIX account can be marked as primary.
|
23
|
+
# @!attribute [rw] username
|
24
|
+
# @return [String]
|
25
|
+
# The username of the POSIX account.
|
26
|
+
# @!attribute [rw] uid
|
27
|
+
# @return [Integer]
|
28
|
+
# The user ID.
|
29
|
+
# @!attribute [rw] gid
|
30
|
+
# @return [Integer]
|
31
|
+
# The default group ID.
|
32
|
+
# @!attribute [rw] home_directory
|
33
|
+
# @return [String]
|
34
|
+
# The path to the home directory for this account.
|
35
|
+
# @!attribute [rw] shell
|
36
|
+
# @return [String]
|
37
|
+
# The path to the logic shell for this account.
|
38
|
+
# @!attribute [rw] gecos
|
39
|
+
# @return [String]
|
40
|
+
# The GECOS (user information) entry for this account.
|
41
|
+
# @!attribute [rw] system_id
|
42
|
+
# @return [String]
|
43
|
+
# System identifier for which account the username or uid applies to.
|
44
|
+
# By default, the empty value is used.
|
45
|
+
# @!attribute [rw] account_id
|
46
|
+
# @return [String]
|
47
|
+
# Output only. A POSIX account identifier.
|
48
|
+
class PosixAccount; end
|
49
|
+
|
50
|
+
# The SSH public key information associated with a Google account.
|
51
|
+
# @!attribute [rw] key
|
52
|
+
# @return [String]
|
53
|
+
# Public key text in SSH format, defined by
|
54
|
+
# <a href="https://www.ietf.org/rfc/rfc4253.txt" target="_blank">RFC4253</a>
|
55
|
+
# section 6.6.
|
56
|
+
# @!attribute [rw] expiration_time_usec
|
57
|
+
# @return [Integer]
|
58
|
+
# An expiration time in microseconds since epoch.
|
59
|
+
# @!attribute [rw] fingerprint
|
60
|
+
# @return [String]
|
61
|
+
# Output only. The SHA-256 fingerprint of the SSH public key.
|
62
|
+
class SshPublicKey; end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,111 @@
|
|
1
|
+
# Copyright 2018 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
|
+
# https://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
|
+
module Google
|
16
|
+
module Cloud
|
17
|
+
module Oslogin
|
18
|
+
##
|
19
|
+
# # Google Cloud OS Login API Contents
|
20
|
+
#
|
21
|
+
# | Class | Description |
|
22
|
+
# | ----- | ----------- |
|
23
|
+
# | [OsLoginServiceClient][] | Cloud OS Login API |
|
24
|
+
# | [Data Types][] | Data types for Google::Cloud::OsLogin::V1 |
|
25
|
+
#
|
26
|
+
# [OsLoginServiceClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-os_login/latest/google/cloud/oslogin/v1/osloginserviceclient
|
27
|
+
# [Data Types]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-os_login/latest/google/cloud/oslogin/v1/datatypes
|
28
|
+
#
|
29
|
+
module V1
|
30
|
+
# The user profile information used for logging in to a virtual machine on
|
31
|
+
# Google Compute Engine.
|
32
|
+
# @!attribute [rw] name
|
33
|
+
# @return [String]
|
34
|
+
# The primary email address that uniquely identifies the user.
|
35
|
+
# @!attribute [rw] posix_accounts
|
36
|
+
# @return [Array<Google::Cloud::Oslogin::Common::PosixAccount>]
|
37
|
+
# The list of POSIX accounts associated with the user.
|
38
|
+
# @!attribute [rw] ssh_public_keys
|
39
|
+
# @return [Hash{String => Google::Cloud::Oslogin::Common::SshPublicKey}]
|
40
|
+
# A map from SSH public key fingerprint to the associated key object.
|
41
|
+
# @!attribute [rw] suspended
|
42
|
+
# @return [true, false]
|
43
|
+
# Indicates if the user is suspended. A suspended user cannot log in but
|
44
|
+
# their profile information is retained.
|
45
|
+
class LoginProfile; end
|
46
|
+
|
47
|
+
# A request message for deleting a POSIX account entry.
|
48
|
+
# @!attribute [rw] name
|
49
|
+
# @return [String]
|
50
|
+
# A reference to the POSIX account to update. POSIX accounts are identified
|
51
|
+
# by the project ID they are associated with. A reference to the POSIX
|
52
|
+
# account is in format +users/{user}/projects/{project}+.
|
53
|
+
class DeletePosixAccountRequest; end
|
54
|
+
|
55
|
+
# A request message for deleting an SSH public key.
|
56
|
+
# @!attribute [rw] name
|
57
|
+
# @return [String]
|
58
|
+
# The fingerprint of the public key to update. Public keys are identified by
|
59
|
+
# their SHA-256 fingerprint. The fingerprint of the public key is in format
|
60
|
+
# +users/{user}/sshPublicKeys/{fingerprint}+.
|
61
|
+
class DeleteSshPublicKeyRequest; end
|
62
|
+
|
63
|
+
# A request message for retrieving the login profile information for a user.
|
64
|
+
# @!attribute [rw] name
|
65
|
+
# @return [String]
|
66
|
+
# The unique ID for the user in format +users/{user}+.
|
67
|
+
class GetLoginProfileRequest; end
|
68
|
+
|
69
|
+
# A request message for retrieving an SSH public key.
|
70
|
+
# @!attribute [rw] name
|
71
|
+
# @return [String]
|
72
|
+
# The fingerprint of the public key to retrieve. Public keys are identified
|
73
|
+
# by their SHA-256 fingerprint. The fingerprint of the public key is in
|
74
|
+
# format +users/{user}/sshPublicKeys/{fingerprint}+.
|
75
|
+
class GetSshPublicKeyRequest; end
|
76
|
+
|
77
|
+
# A request message for importing an SSH public key.
|
78
|
+
# @!attribute [rw] parent
|
79
|
+
# @return [String]
|
80
|
+
# The unique ID for the user in format +users/{user}+.
|
81
|
+
# @!attribute [rw] ssh_public_key
|
82
|
+
# @return [Google::Cloud::Oslogin::Common::SshPublicKey]
|
83
|
+
# The SSH public key and expiration time.
|
84
|
+
# @!attribute [rw] project_id
|
85
|
+
# @return [String]
|
86
|
+
# The project ID of the Google Cloud Platform project.
|
87
|
+
class ImportSshPublicKeyRequest; end
|
88
|
+
|
89
|
+
# A response message for importing an SSH public key.
|
90
|
+
# @!attribute [rw] login_profile
|
91
|
+
# @return [Google::Cloud::Oslogin::V1::LoginProfile]
|
92
|
+
# The login profile information for the user.
|
93
|
+
class ImportSshPublicKeyResponse; end
|
94
|
+
|
95
|
+
# A request message for updating an SSH public key.
|
96
|
+
# @!attribute [rw] name
|
97
|
+
# @return [String]
|
98
|
+
# The fingerprint of the public key to update. Public keys are identified by
|
99
|
+
# their SHA-256 fingerprint. The fingerprint of the public key is in format
|
100
|
+
# +users/{user}/sshPublicKeys/{fingerprint}+.
|
101
|
+
# @!attribute [rw] ssh_public_key
|
102
|
+
# @return [Google::Cloud::Oslogin::Common::SshPublicKey]
|
103
|
+
# The SSH public key and expiration time.
|
104
|
+
# @!attribute [rw] update_mask
|
105
|
+
# @return [Google::Protobuf::FieldMask]
|
106
|
+
# Mask to control which fields get updated. Updates all if not present.
|
107
|
+
class UpdateSshPublicKeyRequest; end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|