google-apis-sts_v1 0.5.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/lib/google/apis/sts_v1/classes.rb +143 -44
- data/lib/google/apis/sts_v1/gem_version.rb +3 -3
- data/lib/google/apis/sts_v1/representations.rb +34 -0
- data/lib/google/apis/sts_v1/service.rb +32 -0
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67b6ac980a291a4baa675d886464814e980c96614a0cfd55331ddd1a4a0f3734
|
4
|
+
data.tar.gz: ad9cf7bb5b5ec77e182eb721e68970af7377cee07162d5f6a447f5f27376d4fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9029389e49cbd1dbe4e46c9fc4f8f7ff410328a0e3f5df9013ef30c9293ce21ceb88407584e11ba34476a8dcfe598efb8f5cbea173fe1eedf60f61245fb720b
|
7
|
+
data.tar.gz: 033e572b461a96b3a3437f30323c6369fd1305319eb6615abcc9f2e5b77e826e4e7a6fb55fd3c6717b9e0523007548032fc2c9096a836f0af2372d66a0c64b75
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# Release history for google-apis-sts_v1
|
2
2
|
|
3
|
+
### v0.10.0 (2021-07-03)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20210625
|
6
|
+
* Regenerated using generator version 0.4.0
|
7
|
+
|
8
|
+
### v0.9.0 (2021-06-24)
|
9
|
+
|
10
|
+
* Unspecified changes
|
11
|
+
|
12
|
+
### v0.8.0 (2021-06-19)
|
13
|
+
|
14
|
+
* Regenerated from discovery document revision 20210613
|
15
|
+
* Regenerated using generator version 0.3.0
|
16
|
+
|
17
|
+
### v0.7.0 (2021-05-27)
|
18
|
+
|
19
|
+
* Regenerated from discovery document revision 20210517
|
20
|
+
|
21
|
+
### v0.6.0 (2021-05-20)
|
22
|
+
|
23
|
+
* Unspecified changes
|
24
|
+
|
3
25
|
### v0.5.0 (2021-05-15)
|
4
26
|
|
5
27
|
* Regenerated from discovery document revision 20210508
|
@@ -59,48 +59,48 @@ module Google
|
|
59
59
|
# @return [String]
|
60
60
|
attr_accessor :scope
|
61
61
|
|
62
|
-
# Required. The input token. This token is
|
63
|
-
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
# following headers are required: - `kid`: The
|
68
|
-
# securing the JWT. - `alg`: The cryptographic
|
69
|
-
# be `RS256` or `ES256`. The following payload
|
70
|
-
# information, see [RFC 7523, Section 3](https://
|
71
|
-
# section-3): - `iss`: The issuer of the token. The
|
72
|
-
# discovery document at the URL `/.well-known/openid-
|
73
|
-
# the value of this field. The document must be
|
74
|
-
# 2 of the [OIDC 1.0 Discovery specification](
|
75
|
-
# connect-discovery-1_0.html#
|
76
|
-
# time, in seconds, since the
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
83
|
-
# specified. See https://cloud.
|
84
|
-
# locations.workloadIdentityPools.
|
85
|
-
# RS256", "kid": "us-east-11" ` ```
|
86
|
-
# accounts.google.com", "iat": 1517963104,
|
87
|
-
# googleapis.com/projects/1234567890123/
|
88
|
-
# my-pool/providers/my-provider", "sub": "
|
89
|
-
# "additional_claim": "value" ` ` ``` If `
|
90
|
-
# a serialized `GetCallerIdentity` token.
|
91
|
-
# information as a request to the AWS [`
|
92
|
-
# amazon.com/STS/latest/APIReference/
|
93
|
-
# the AWS [signature](https://docs.aws.
|
94
|
-
# signing_aws_api_requests.html) for the request
|
95
|
-
# Version 4. Format the request as URL-encoded JSON,
|
96
|
-
# subject_token_type` parameter to `urn:ietf:params:aws:token-type:
|
97
|
-
# The following parameters are required: - `url`: The URL of the
|
98
|
-
# endpoint for `GetCallerIdentity()`, such as `https://sts.amazonaws.com?
|
99
|
-
# GetCallerIdentity&Version=2011-06-15`. Regional endpoints are also
|
100
|
-
# `method`: The HTTP request method: `POST`. - `headers`: The HTTP
|
101
|
-
# headers, which must include: - `Authorization`: The request signature.
|
102
|
-
# amz-date`: The time you will send the request, formatted as an [ISO8601
|
103
|
-
# https://docs.aws.amazon.com/general/latest/gr/sigv4_elements.html#
|
62
|
+
# Required. The input token. This token is either an external credential issued
|
63
|
+
# by a workload identity pool provider, or a short-lived access token issued by
|
64
|
+
# Google. If the token is an OIDC JWT, it must use the JWT format defined in [
|
65
|
+
# RFC 7523](https://tools.ietf.org/html/rfc7523), and the `subject_token_type`
|
66
|
+
# must be either `urn:ietf:params:oauth:token-type:jwt` or `urn:ietf:params:
|
67
|
+
# oauth:token-type:id_token`. The following headers are required: - `kid`: The
|
68
|
+
# identifier of the signing key securing the JWT. - `alg`: The cryptographic
|
69
|
+
# algorithm securing the JWT. Must be `RS256` or `ES256`. The following payload
|
70
|
+
# fields are required. For more information, see [RFC 7523, Section 3](https://
|
71
|
+
# tools.ietf.org/html/rfc7523#section-3): - `iss`: The issuer of the token. The
|
72
|
+
# issuer must provide a discovery document at the URL `/.well-known/openid-
|
73
|
+
# configuration`, where `` is the value of this field. The document must be
|
74
|
+
# formatted according to section 4.2 of the [OIDC 1.0 Discovery specification](
|
75
|
+
# https://openid.net/specs/openid-connect-discovery-1_0.html#
|
76
|
+
# ProviderConfigurationResponse). - `iat`: The issue time, in seconds, since the
|
77
|
+
# Unix epoch. Must be in the past. - `exp`: The expiration time, in seconds,
|
78
|
+
# since the Unix epoch. Must be less than 48 hours after `iat`. Shorter
|
79
|
+
# expiration times are more secure. If possible, we recommend setting an
|
80
|
+
# expiration time less than 6 hours. - `sub`: The identity asserted in the JWT. -
|
81
|
+
# `aud`: For workload identity pools, this must be a value specified in the
|
82
|
+
# allowed audiences for the workload identity pool provider, or one of the
|
83
|
+
# audiences allowed by default if no audiences were specified. See https://cloud.
|
84
|
+
# google.com/iam/docs/reference/rest/v1/projects.locations.workloadIdentityPools.
|
85
|
+
# providers#oidc Example header: ``` ` "alg": "RS256", "kid": "us-east-11" ` ```
|
86
|
+
# Example payload: ``` ` "iss": "https://accounts.google.com", "iat": 1517963104,
|
87
|
+
# "exp": 1517966704, "aud": "//iam.googleapis.com/projects/1234567890123/
|
88
|
+
# locations/global/workloadIdentityPools/my-pool/providers/my-provider", "sub": "
|
89
|
+
# 113475438248934895348", "my_claims": ` "additional_claim": "value" ` ` ``` If `
|
90
|
+
# subject_token` is for AWS, it must be a serialized `GetCallerIdentity` token.
|
91
|
+
# This token contains the same information as a request to the AWS [`
|
92
|
+
# GetCallerIdentity()`](https://docs.aws.amazon.com/STS/latest/APIReference/
|
93
|
+
# API_GetCallerIdentity) method, as well as the AWS [signature](https://docs.aws.
|
94
|
+
# amazon.com/general/latest/gr/signing_aws_api_requests.html) for the request
|
95
|
+
# information. Use Signature Version 4. Format the request as URL-encoded JSON,
|
96
|
+
# and set the `subject_token_type` parameter to `urn:ietf:params:aws:token-type:
|
97
|
+
# aws4_request`. The following parameters are required: - `url`: The URL of the
|
98
|
+
# AWS STS endpoint for `GetCallerIdentity()`, such as `https://sts.amazonaws.com?
|
99
|
+
# Action=GetCallerIdentity&Version=2011-06-15`. Regional endpoints are also
|
100
|
+
# supported. - `method`: The HTTP request method: `POST`. - `headers`: The HTTP
|
101
|
+
# request headers, which must include: - `Authorization`: The request signature.
|
102
|
+
# - `x-amz-date`: The time you will send the request, formatted as an [ISO8601
|
103
|
+
# Basic](https://docs.aws.amazon.com/general/latest/gr/sigv4_elements.html#
|
104
104
|
# sigv4_elements_date) string. This value is typically set to the current time
|
105
105
|
# and is used to help prevent replay attacks. - `host`: The hostname of the `url`
|
106
106
|
# field; for example, `sts.amazonaws.com`. - `x-goog-cloud-target-resource`:
|
@@ -130,8 +130,8 @@ module Google
|
|
130
130
|
|
131
131
|
# Required. An identifier that indicates the type of the security token in the `
|
132
132
|
# subject_token` parameter. Supported values are `urn:ietf:params:oauth:token-
|
133
|
-
# type:jwt`, `urn:ietf:params:
|
134
|
-
# oauth:token-type:access_token`.
|
133
|
+
# type:jwt`, `urn:ietf:params:oauth:token-type:id_token`, `urn:ietf:params:aws:
|
134
|
+
# token-type:aws4_request`, and `urn:ietf:params:oauth:token-type:access_token`.
|
135
135
|
# Corresponds to the JSON property `subjectTokenType`
|
136
136
|
# @return [String]
|
137
137
|
attr_accessor :subject_token_type
|
@@ -196,6 +196,105 @@ module Google
|
|
196
196
|
@token_type = args[:token_type] if args.key?(:token_type)
|
197
197
|
end
|
198
198
|
end
|
199
|
+
|
200
|
+
# Request message for IntrospectToken.
|
201
|
+
class GoogleIdentityStsV1IntrospectTokenRequest
|
202
|
+
include Google::Apis::Core::Hashable
|
203
|
+
|
204
|
+
# Required. The OAuth 2.0 security token issued by the Security Token Service
|
205
|
+
# API.
|
206
|
+
# Corresponds to the JSON property `token`
|
207
|
+
# @return [String]
|
208
|
+
attr_accessor :token
|
209
|
+
|
210
|
+
# Optional. The type of the given token. Supported values are `urn:ietf:params:
|
211
|
+
# oauth:token-type:access_token` and `access_token`.
|
212
|
+
# Corresponds to the JSON property `tokenTypeHint`
|
213
|
+
# @return [String]
|
214
|
+
attr_accessor :token_type_hint
|
215
|
+
|
216
|
+
def initialize(**args)
|
217
|
+
update!(**args)
|
218
|
+
end
|
219
|
+
|
220
|
+
# Update properties of this object
|
221
|
+
def update!(**args)
|
222
|
+
@token = args[:token] if args.key?(:token)
|
223
|
+
@token_type_hint = args[:token_type_hint] if args.key?(:token_type_hint)
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
# Response message for IntrospectToken.
|
228
|
+
class GoogleIdentityStsV1IntrospectTokenResponse
|
229
|
+
include Google::Apis::Core::Hashable
|
230
|
+
|
231
|
+
# A boolean value that indicates whether the provided access token is currently
|
232
|
+
# active.
|
233
|
+
# Corresponds to the JSON property `active`
|
234
|
+
# @return [Boolean]
|
235
|
+
attr_accessor :active
|
236
|
+
alias_method :active?, :active
|
237
|
+
|
238
|
+
# The client identifier for the OAuth 2.0 client that requested the provided
|
239
|
+
# token.
|
240
|
+
# Corresponds to the JSON property `client_id`
|
241
|
+
# @return [String]
|
242
|
+
attr_accessor :client_id
|
243
|
+
|
244
|
+
# The expiration timestamp, measured in the number of seconds since January 1
|
245
|
+
# 1970 UTC, indicating when this token will expire.
|
246
|
+
# Corresponds to the JSON property `exp`
|
247
|
+
# @return [Fixnum]
|
248
|
+
attr_accessor :exp
|
249
|
+
|
250
|
+
# The issued timestamp, measured in the number of seconds since January 1 1970
|
251
|
+
# UTC, indicating when this token was originally issued.
|
252
|
+
# Corresponds to the JSON property `iat`
|
253
|
+
# @return [Fixnum]
|
254
|
+
attr_accessor :iat
|
255
|
+
|
256
|
+
# The issuer of the provided token.
|
257
|
+
# Corresponds to the JSON property `iss`
|
258
|
+
# @return [String]
|
259
|
+
attr_accessor :iss
|
260
|
+
|
261
|
+
# A list of scopes associated with the provided token.
|
262
|
+
# Corresponds to the JSON property `scope`
|
263
|
+
# @return [String]
|
264
|
+
attr_accessor :scope
|
265
|
+
|
266
|
+
# The unique user ID associated with the provided token. For Google Accounts,
|
267
|
+
# this value is based on the Google Account's user ID. For federated identities,
|
268
|
+
# this value is based on the identity pool ID and the value of the mapped `
|
269
|
+
# google.subject` attribute.
|
270
|
+
# Corresponds to the JSON property `sub`
|
271
|
+
# @return [String]
|
272
|
+
attr_accessor :sub
|
273
|
+
|
274
|
+
# The human-readable identifier for the token principal subject. For example, if
|
275
|
+
# the provided token is associated with a workload identity pool, this field
|
276
|
+
# contains a value in the following format: `principal://iam.googleapis.com/
|
277
|
+
# projects//locations//workloadIdentityPools//subject/`
|
278
|
+
# Corresponds to the JSON property `username`
|
279
|
+
# @return [String]
|
280
|
+
attr_accessor :username
|
281
|
+
|
282
|
+
def initialize(**args)
|
283
|
+
update!(**args)
|
284
|
+
end
|
285
|
+
|
286
|
+
# Update properties of this object
|
287
|
+
def update!(**args)
|
288
|
+
@active = args[:active] if args.key?(:active)
|
289
|
+
@client_id = args[:client_id] if args.key?(:client_id)
|
290
|
+
@exp = args[:exp] if args.key?(:exp)
|
291
|
+
@iat = args[:iat] if args.key?(:iat)
|
292
|
+
@iss = args[:iss] if args.key?(:iss)
|
293
|
+
@scope = args[:scope] if args.key?(:scope)
|
294
|
+
@sub = args[:sub] if args.key?(:sub)
|
295
|
+
@username = args[:username] if args.key?(:username)
|
296
|
+
end
|
297
|
+
end
|
199
298
|
end
|
200
299
|
end
|
201
300
|
end
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module StsV1
|
18
18
|
# Version of the google-apis-sts_v1 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.10.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.
|
22
|
+
GENERATOR_VERSION = "0.4.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20210625"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -34,6 +34,18 @@ module Google
|
|
34
34
|
include Google::Apis::Core::JsonObjectSupport
|
35
35
|
end
|
36
36
|
|
37
|
+
class GoogleIdentityStsV1IntrospectTokenRequest
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class GoogleIdentityStsV1IntrospectTokenResponse
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
37
49
|
class GoogleIdentityStsV1ExchangeTokenRequest
|
38
50
|
# @private
|
39
51
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -56,6 +68,28 @@ module Google
|
|
56
68
|
property :token_type, as: 'token_type'
|
57
69
|
end
|
58
70
|
end
|
71
|
+
|
72
|
+
class GoogleIdentityStsV1IntrospectTokenRequest
|
73
|
+
# @private
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
75
|
+
property :token, as: 'token'
|
76
|
+
property :token_type_hint, as: 'tokenTypeHint'
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
class GoogleIdentityStsV1IntrospectTokenResponse
|
81
|
+
# @private
|
82
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
83
|
+
property :active, as: 'active'
|
84
|
+
property :client_id, as: 'client_id'
|
85
|
+
property :exp, :numeric_string => true, as: 'exp'
|
86
|
+
property :iat, :numeric_string => true, as: 'iat'
|
87
|
+
property :iss, as: 'iss'
|
88
|
+
property :scope, as: 'scope'
|
89
|
+
property :sub, as: 'sub'
|
90
|
+
property :username, as: 'username'
|
91
|
+
end
|
92
|
+
end
|
59
93
|
end
|
60
94
|
end
|
61
95
|
end
|
@@ -50,6 +50,38 @@ module Google
|
|
50
50
|
@batch_path = 'batch'
|
51
51
|
end
|
52
52
|
|
53
|
+
# Gets information about a Google OAuth 2.0 access token issued by the Google
|
54
|
+
# Cloud [Security Token Service API](https://cloud.google.com/iam/docs/reference/
|
55
|
+
# sts/rest).
|
56
|
+
# @param [Google::Apis::StsV1::GoogleIdentityStsV1IntrospectTokenRequest] google_identity_sts_v1_introspect_token_request_object
|
57
|
+
# @param [String] fields
|
58
|
+
# Selector specifying which fields to include in a partial response.
|
59
|
+
# @param [String] quota_user
|
60
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
61
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
62
|
+
# @param [Google::Apis::RequestOptions] options
|
63
|
+
# Request-specific options
|
64
|
+
#
|
65
|
+
# @yield [result, err] Result & error if block supplied
|
66
|
+
# @yieldparam result [Google::Apis::StsV1::GoogleIdentityStsV1IntrospectTokenResponse] parsed result object
|
67
|
+
# @yieldparam err [StandardError] error object if request failed
|
68
|
+
#
|
69
|
+
# @return [Google::Apis::StsV1::GoogleIdentityStsV1IntrospectTokenResponse]
|
70
|
+
#
|
71
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
72
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
73
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
74
|
+
def introspect(google_identity_sts_v1_introspect_token_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
75
|
+
command = make_simple_command(:post, 'v1/introspect', options)
|
76
|
+
command.request_representation = Google::Apis::StsV1::GoogleIdentityStsV1IntrospectTokenRequest::Representation
|
77
|
+
command.request_object = google_identity_sts_v1_introspect_token_request_object
|
78
|
+
command.response_representation = Google::Apis::StsV1::GoogleIdentityStsV1IntrospectTokenResponse::Representation
|
79
|
+
command.response_class = Google::Apis::StsV1::GoogleIdentityStsV1IntrospectTokenResponse
|
80
|
+
command.query['fields'] = fields unless fields.nil?
|
81
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
82
|
+
execute_or_queue_command(command, &block)
|
83
|
+
end
|
84
|
+
|
53
85
|
# Exchanges a credential for a Google OAuth 2.0 access token. The token asserts
|
54
86
|
# an external identity within a workload identity pool, or it applies a
|
55
87
|
# Credential Access Boundary to a Google access token. When you call this method,
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-sts_v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05
|
11
|
+
date: 2021-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.4'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.a
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.4'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: 2.a
|
27
33
|
description: This is the simple REST client for Security Token Service API V1. Simple
|
28
34
|
REST clients are Ruby client libraries that provide access to Google services via
|
29
35
|
their HTTP REST API endpoints. These libraries are generated and updated automatically
|
@@ -52,7 +58,7 @@ licenses:
|
|
52
58
|
metadata:
|
53
59
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
54
60
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-sts_v1/CHANGELOG.md
|
55
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-sts_v1/v0.
|
61
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-sts_v1/v0.10.0
|
56
62
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-sts_v1
|
57
63
|
post_install_message:
|
58
64
|
rdoc_options: []
|