google-apis-sts_v1 0.7.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f700bd301750dcd980d291a558f5fc8daa7c3c7943ae74d4799608c45c8d7994
4
- data.tar.gz: 817f5bfa83addd48afcaeb49e0a9cb6ee384359cfa596e08864af107309a81aa
3
+ metadata.gz: 4ec378c3f28e48d4d14908b20bd73da1b7143686f9e9bac0d033cc64f84ae83a
4
+ data.tar.gz: f0b43011036af601ec975bc7850591a60a616d0c4d4565ee15a4dd73a498574e
5
5
  SHA512:
6
- metadata.gz: 1276f68c158b1d755438ff73a204c35e053af2ee3e35b71c1f12f13ff5483d25528fbb49ee01b74a7acab5d4673966069a10333680314557bac87fe64ddb48a9
7
- data.tar.gz: 0ffd3a004ad9b95141a39ed5211375b6edccf458670f10bf838a225548404153ce4757bc0c1ed895b56370c7a5f42d69f43c525ac248bff2cb1633d5094df9c7
6
+ metadata.gz: 110bec876f174f7f85a9e3288a4a60f2cf3557b9ed4df505a041c0c8bde2ccd46e87fe5787fd7f8cbb569c2f0241e4cc8d3b8b25371dabb0cda328c2cd96b18a
7
+ data.tar.gz: c29b6d2ec46fe33ab4bfc22d71cc0d0160b31c8368e69ed4c64c54d02b63f481c36720456ad422ba72ec0e62be6e96cf4169cc922ae424eaa235dfc6c30b5747
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Release history for google-apis-sts_v1
2
2
 
3
+ ### v0.11.0 (2021-07-31)
4
+
5
+ * Regenerated from discovery document revision 20210723
6
+
7
+ ### v0.10.0 (2021-07-03)
8
+
9
+ * Regenerated from discovery document revision 20210625
10
+ * Regenerated using generator version 0.4.0
11
+
12
+ ### v0.9.0 (2021-06-24)
13
+
14
+ * Unspecified changes
15
+
16
+ ### v0.8.0 (2021-06-19)
17
+
18
+ * Regenerated from discovery document revision 20210613
19
+ * Regenerated using generator version 0.3.0
20
+
3
21
  ### v0.7.0 (2021-05-27)
4
22
 
5
23
  * Regenerated from discovery document revision 20210517
@@ -27,8 +27,8 @@ module Google
27
27
  include Google::Apis::Core::Hashable
28
28
 
29
29
  # The full resource name of the identity provider; for example: `//iam.
30
- # googleapis.com/projects//workloadIdentityPools//providers/`. Required when
31
- # exchanging an external credential for a Google access token.
30
+ # googleapis.com/projects//locations/global/workloadIdentityPools//providers/`.
31
+ # Required when exchanging an external credential for a Google access token.
32
32
  # Corresponds to the JSON property `audience`
33
33
  # @return [String]
34
34
  attr_accessor :audience
@@ -63,15 +63,16 @@ module Google
63
63
  # by a workload identity pool provider, or a short-lived access token issued by
64
64
  # Google. If the token is an OIDC JWT, it must use the JWT format defined in [
65
65
  # RFC 7523](https://tools.ietf.org/html/rfc7523), and the `subject_token_type`
66
- # must be `urn:ietf:params:oauth:token-type:jwt`. The following headers are
67
- # required: - `kid`: The identifier of the signing key securing the JWT. - `alg`:
68
- # The cryptographic algorithm securing the JWT. Must be `RS256` or `ES256`. The
69
- # following payload fields are required. For more information, see [RFC 7523,
70
- # Section 3](https://tools.ietf.org/html/rfc7523#section-3): - `iss`: The issuer
71
- # of the token. The issuer must provide a discovery document at the URL `/.well-
72
- # known/openid-configuration`, where `` is the value of this field. The document
73
- # must be formatted according to section 4.2 of the [OIDC 1.0 Discovery
74
- # specification](https://openid.net/specs/openid-connect-discovery-1_0.html#
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#
75
76
  # ProviderConfigurationResponse). - `iat`: The issue time, in seconds, since the
76
77
  # Unix epoch. Must be in the past. - `exp`: The expiration time, in seconds,
77
78
  # since the Unix epoch. Must be less than 48 hours after `iat`. Shorter
@@ -106,8 +107,8 @@ module Google
106
107
  # The full, canonical resource name of the workload identity pool provider, with
107
108
  # or without an `https:` prefix. To help ensure data integrity, we recommend
108
109
  # including this header in the `SignedHeaders` field of the signed request. For
109
- # example: //iam.googleapis.com/projects//locations//workloadIdentityPools//
110
- # providers/ https://iam.googleapis.com/projects//locations//
110
+ # example: //iam.googleapis.com/projects//locations/global/workloadIdentityPools/
111
+ # /providers/ https://iam.googleapis.com/projects//locations/global/
111
112
  # workloadIdentityPools//providers/ If you are using temporary security
112
113
  # credentials provided by AWS, you must also include the header `x-amz-security-
113
114
  # token`, with the value set to the session token. The following example shows a
@@ -115,8 +116,8 @@ module Google
115
116
  # 20200815T015049Z"`, `"key": "Authorization", "value": "AWS4-HMAC-SHA256+
116
117
  # Credential=$credential,+SignedHeaders=host;x-amz-date;x-goog-cloud-target-
117
118
  # resource,+Signature=$signature"`, `"key": "x-goog-cloud-target-resource", "
118
- # value": "//iam.googleapis.com/projects//locations//workloadIdentityPools//
119
- # providers/"`, `"key": "host", "value": "sts.amazonaws.com"` . ], "method": "
119
+ # value": "//iam.googleapis.com/projects//locations/global/workloadIdentityPools/
120
+ # /providers/"`, `"key": "host", "value": "sts.amazonaws.com"` . ], "method": "
120
121
  # POST", "url": "https://sts.amazonaws.com?Action=GetCallerIdentity&Version=2011-
121
122
  # 06-15" ` ``` You can also use a Google-issued OAuth 2.0 access token with this
122
123
  # field to obtain an access token with new security attributes applied, such as
@@ -129,8 +130,8 @@ module Google
129
130
 
130
131
  # Required. An identifier that indicates the type of the security token in the `
131
132
  # subject_token` parameter. Supported values are `urn:ietf:params:oauth:token-
132
- # type:jwt`, `urn:ietf:params:aws:token-type:aws4_request`, and `urn:ietf:params:
133
- # 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`.
134
135
  # Corresponds to the JSON property `subjectTokenType`
135
136
  # @return [String]
136
137
  attr_accessor :subject_token_type
@@ -195,6 +196,105 @@ module Google
195
196
  @token_type = args[:token_type] if args.key?(:token_type)
196
197
  end
197
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/global/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
198
298
  end
199
299
  end
200
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.7.0"
19
+ GEM_VERSION = "0.11.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.2.0"
22
+ GENERATOR_VERSION = "0.4.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20210517"
25
+ REVISION = "20210723"
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.7.0
4
+ version: 0.11.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-31 00:00:00.000000000 Z
11
+ date: 2021-08-02 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.1'
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: '0.1'
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.7.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-sts_v1/v0.11.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: []