google-apis-sts_v1 0.1.0 → 0.6.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 +91 -11
- data/lib/google/apis/sts_v1/gem_version.rb +3 -3
- data/lib/google/apis/sts_v1/representations.rb +2 -0
- data/lib/google/apis/sts_v1/service.rb +6 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad83d8d7c878650c69654f899fd41ca7291c56ab4fd37225d56777daf805bffd
|
4
|
+
data.tar.gz: 372b9ea37cff48cf8c2d20d4b6ee48b3f5e9b37007be481da5496ea8b9dd95a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f1e72fe1f0dc5a65df53db3ecafbb48097947f6e92582628846246aec22bf3a9638ef62424bde82805904a0e24d7a3de787d63f17c1fb76f80179afb49a6bcd
|
7
|
+
data.tar.gz: 42884317e457d60fb8d9b9fde62ed8f43e853287c8dc30b54f6574962cdbb88430c644c850e6d1af644383232f39bbf7bd27fdc2897faa5ce3e61a4ae15c9129
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# Release history for google-apis-sts_v1
|
2
2
|
|
3
|
+
### v0.6.0 (2021-05-20)
|
4
|
+
|
5
|
+
* Unspecified changes
|
6
|
+
|
7
|
+
### v0.5.0 (2021-05-15)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20210508
|
10
|
+
* Regenerated using generator version 0.2.0
|
11
|
+
|
12
|
+
### v0.4.0 (2021-03-04)
|
13
|
+
|
14
|
+
* Unspecified changes
|
15
|
+
|
16
|
+
### v0.3.0 (2021-02-12)
|
17
|
+
|
18
|
+
* Regenerated from discovery document revision 20210206
|
19
|
+
|
20
|
+
### v0.2.0 (2021-02-05)
|
21
|
+
|
22
|
+
* Regenerated from discovery document revision 20210130
|
23
|
+
* Regenerated using generator version 0.1.2
|
24
|
+
|
3
25
|
### v0.1.0 (2021-01-07)
|
4
26
|
|
5
27
|
* Regenerated using generator version 0.1.1
|
@@ -26,6 +26,13 @@ module Google
|
|
26
26
|
class GoogleIdentityStsV1ExchangeTokenRequest
|
27
27
|
include Google::Apis::Core::Hashable
|
28
28
|
|
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.
|
32
|
+
# Corresponds to the JSON property `audience`
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :audience
|
35
|
+
|
29
36
|
# Required. The grant type. Must be `urn:ietf:params:oauth:grant-type:token-
|
30
37
|
# exchange`, which indicates a token exchange.
|
31
38
|
# Corresponds to the JSON property `grantType`
|
@@ -45,17 +52,86 @@ module Google
|
|
45
52
|
# @return [String]
|
46
53
|
attr_accessor :requested_token_type
|
47
54
|
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
55
|
+
# The OAuth 2.0 scopes to include on the resulting access token, formatted as a
|
56
|
+
# list of space-delimited, case-sensitive strings. Required when exchanging an
|
57
|
+
# external credential for a Google access token.
|
58
|
+
# Corresponds to the JSON property `scope`
|
59
|
+
# @return [String]
|
60
|
+
attr_accessor :scope
|
61
|
+
|
62
|
+
# Required. The input token. This token is a either an external credential
|
63
|
+
# issued by a workload identity pool provider, or a short-lived access token
|
64
|
+
# issued by Google. If the token is an OIDC JWT, it must use the JWT format
|
65
|
+
# defined in [RFC 7523](https://tools.ietf.org/html/rfc7523), and the `
|
66
|
+
# subject_token_type` must be `urn:ietf:params:oauth:token-type:jwt`. The
|
67
|
+
# following headers are required: - `kid`: The identifier of the signing key
|
68
|
+
# securing the JWT. - `alg`: The cryptographic algorithm securing the JWT. Must
|
69
|
+
# be `RS256` or `ES256`. The following payload fields are required. For more
|
70
|
+
# information, see [RFC 7523, Section 3](https://tools.ietf.org/html/rfc7523#
|
71
|
+
# section-3): - `iss`: The issuer of the token. The issuer must provide a
|
72
|
+
# discovery document at the URL `/.well-known/openid-configuration`, where `` is
|
73
|
+
# the value of this field. The document must be formatted according to section 4.
|
74
|
+
# 2 of the [OIDC 1.0 Discovery specification](https://openid.net/specs/openid-
|
75
|
+
# connect-discovery-1_0.html#ProviderConfigurationResponse). - `iat`: The issue
|
76
|
+
# time, in seconds, since the Unix epoch. Must be in the past. - `exp`: The
|
77
|
+
# expiration time, in seconds, since the Unix epoch. Must be less than 48 hours
|
78
|
+
# after `iat`. Shorter expiration times are more secure. If possible, we
|
79
|
+
# recommend setting an expiration time less than 6 hours. - `sub`: The identity
|
80
|
+
# asserted in the JWT. - `aud`: For workload identity pools, this must be a
|
81
|
+
# value specified in the allowed audiences for the workload identity pool
|
82
|
+
# provider, or one of the audiences allowed by default if no audiences were
|
83
|
+
# specified. See https://cloud.google.com/iam/docs/reference/rest/v1/projects.
|
84
|
+
# locations.workloadIdentityPools.providers#oidc Example header: ``` ` "alg": "
|
85
|
+
# RS256", "kid": "us-east-11" ` ``` Example payload: ``` ` "iss": "https://
|
86
|
+
# accounts.google.com", "iat": 1517963104, "exp": 1517966704, "aud": "//iam.
|
87
|
+
# googleapis.com/projects/1234567890123/locations/global/workloadIdentityPools/
|
88
|
+
# my-pool/providers/my-provider", "sub": "113475438248934895348", "my_claims": `
|
89
|
+
# "additional_claim": "value" ` ` ``` If `subject_token` is for AWS, it must be
|
90
|
+
# a serialized `GetCallerIdentity` token. This token contains the same
|
91
|
+
# information as a request to the AWS [`GetCallerIdentity()`](https://docs.aws.
|
92
|
+
# amazon.com/STS/latest/APIReference/API_GetCallerIdentity) method, as well as
|
93
|
+
# the AWS [signature](https://docs.aws.amazon.com/general/latest/gr/
|
94
|
+
# signing_aws_api_requests.html) for the request information. Use Signature
|
95
|
+
# Version 4. Format the request as URL-encoded JSON, and set the `
|
96
|
+
# subject_token_type` parameter to `urn:ietf:params:aws:token-type:aws4_request`.
|
97
|
+
# The following parameters are required: - `url`: The URL of the AWS STS
|
98
|
+
# endpoint for `GetCallerIdentity()`, such as `https://sts.amazonaws.com?Action=
|
99
|
+
# GetCallerIdentity&Version=2011-06-15`. Regional endpoints are also supported. -
|
100
|
+
# `method`: The HTTP request method: `POST`. - `headers`: The HTTP request
|
101
|
+
# headers, which must include: - `Authorization`: The request signature. - `x-
|
102
|
+
# amz-date`: The time you will send the request, formatted as an [ISO8601 Basic](
|
103
|
+
# https://docs.aws.amazon.com/general/latest/gr/sigv4_elements.html#
|
104
|
+
# sigv4_elements_date) string. This value is typically set to the current time
|
105
|
+
# and is used to help prevent replay attacks. - `host`: The hostname of the `url`
|
106
|
+
# field; for example, `sts.amazonaws.com`. - `x-goog-cloud-target-resource`:
|
107
|
+
# The full, canonical resource name of the workload identity pool provider, with
|
108
|
+
# or without an `https:` prefix. To help ensure data integrity, we recommend
|
109
|
+
# including this header in the `SignedHeaders` field of the signed request. For
|
110
|
+
# example: //iam.googleapis.com/projects//locations//workloadIdentityPools//
|
111
|
+
# providers/ https://iam.googleapis.com/projects//locations//
|
112
|
+
# workloadIdentityPools//providers/ If you are using temporary security
|
113
|
+
# credentials provided by AWS, you must also include the header `x-amz-security-
|
114
|
+
# token`, with the value set to the session token. The following example shows a
|
115
|
+
# `GetCallerIdentity` token: ``` ` "headers": [ `"key": "x-amz-date", "value": "
|
116
|
+
# 20200815T015049Z"`, `"key": "Authorization", "value": "AWS4-HMAC-SHA256+
|
117
|
+
# Credential=$credential,+SignedHeaders=host;x-amz-date;x-goog-cloud-target-
|
118
|
+
# resource,+Signature=$signature"`, `"key": "x-goog-cloud-target-resource", "
|
119
|
+
# value": "//iam.googleapis.com/projects//locations//workloadIdentityPools//
|
120
|
+
# providers/"`, `"key": "host", "value": "sts.amazonaws.com"` . ], "method": "
|
121
|
+
# POST", "url": "https://sts.amazonaws.com?Action=GetCallerIdentity&Version=2011-
|
122
|
+
# 06-15" ` ``` You can also use a Google-issued OAuth 2.0 access token with this
|
123
|
+
# field to obtain an access token with new security attributes applied, such as
|
124
|
+
# a Credential Access Boundary. In this case, set `subject_token_type` to `urn:
|
125
|
+
# ietf:params:oauth:token-type:access_token`. If an access token already
|
126
|
+
# contains security attributes, you cannot apply additional security attributes.
|
52
127
|
# Corresponds to the JSON property `subjectToken`
|
53
128
|
# @return [String]
|
54
129
|
attr_accessor :subject_token
|
55
130
|
|
56
131
|
# Required. An identifier that indicates the type of the security token in the `
|
57
|
-
# subject_token` parameter.
|
58
|
-
#
|
132
|
+
# subject_token` parameter. Supported values are `urn:ietf:params:oauth:token-
|
133
|
+
# type:jwt`, `urn:ietf:params:aws:token-type:aws4_request`, and `urn:ietf:params:
|
134
|
+
# oauth:token-type:access_token`.
|
59
135
|
# Corresponds to the JSON property `subjectTokenType`
|
60
136
|
# @return [String]
|
61
137
|
attr_accessor :subject_token_type
|
@@ -66,9 +142,11 @@ module Google
|
|
66
142
|
|
67
143
|
# Update properties of this object
|
68
144
|
def update!(**args)
|
145
|
+
@audience = args[:audience] if args.key?(:audience)
|
69
146
|
@grant_type = args[:grant_type] if args.key?(:grant_type)
|
70
147
|
@options = args[:options] if args.key?(:options)
|
71
148
|
@requested_token_type = args[:requested_token_type] if args.key?(:requested_token_type)
|
149
|
+
@scope = args[:scope] if args.key?(:scope)
|
72
150
|
@subject_token = args[:subject_token] if args.key?(:subject_token)
|
73
151
|
@subject_token_type = args[:subject_token_type] if args.key?(:subject_token_type)
|
74
152
|
end
|
@@ -79,15 +157,17 @@ module Google
|
|
79
157
|
include Google::Apis::Core::Hashable
|
80
158
|
|
81
159
|
# An OAuth 2.0 security token, issued by Google, in response to the token
|
82
|
-
# exchange request.
|
160
|
+
# exchange request. Tokens can vary in size, depending in part on the size of
|
161
|
+
# mapped claims, up to a maximum of 12288 bytes (12 KB). Google reserves the
|
162
|
+
# right to change the token size and the maximum length at any time.
|
83
163
|
# Corresponds to the JSON property `access_token`
|
84
164
|
# @return [String]
|
85
165
|
attr_accessor :access_token
|
86
166
|
|
87
|
-
# The amount of time, in seconds, between the time when the
|
88
|
-
# issued and the time when the
|
167
|
+
# The amount of time, in seconds, between the time when the access token was
|
168
|
+
# issued and the time when the access token will expire. This field is absent
|
89
169
|
# when the `subject_token` in the request is a Google-issued, short-lived access
|
90
|
-
# token. In this case, the
|
170
|
+
# token. In this case, the access token has the same expiration time as the `
|
91
171
|
# subject_token`.
|
92
172
|
# Corresponds to the JSON property `expires_in`
|
93
173
|
# @return [Fixnum]
|
@@ -99,7 +179,7 @@ module Google
|
|
99
179
|
# @return [String]
|
100
180
|
attr_accessor :issued_token_type
|
101
181
|
|
102
|
-
# The type of
|
182
|
+
# The type of access token. Always has the value `Bearer`.
|
103
183
|
# Corresponds to the JSON property `token_type`
|
104
184
|
# @return [String]
|
105
185
|
attr_accessor :token_type
|
@@ -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.6.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.
|
22
|
+
GENERATOR_VERSION = "0.2.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20210508"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -37,9 +37,11 @@ module Google
|
|
37
37
|
class GoogleIdentityStsV1ExchangeTokenRequest
|
38
38
|
# @private
|
39
39
|
class Representation < Google::Apis::Core::JsonRepresentation
|
40
|
+
property :audience, as: 'audience'
|
40
41
|
property :grant_type, as: 'grantType'
|
41
42
|
property :options, as: 'options'
|
42
43
|
property :requested_token_type, as: 'requestedTokenType'
|
44
|
+
property :scope, as: 'scope'
|
43
45
|
property :subject_token, as: 'subjectToken'
|
44
46
|
property :subject_token_type, as: 'subjectTokenType'
|
45
47
|
end
|
@@ -50,7 +50,12 @@ module Google
|
|
50
50
|
@batch_path = 'batch'
|
51
51
|
end
|
52
52
|
|
53
|
-
# Exchanges a credential for a Google OAuth 2.0 access token.
|
53
|
+
# Exchanges a credential for a Google OAuth 2.0 access token. The token asserts
|
54
|
+
# an external identity within a workload identity pool, or it applies a
|
55
|
+
# Credential Access Boundary to a Google access token. When you call this method,
|
56
|
+
# do not send the `Authorization` HTTP header in the request. This method does
|
57
|
+
# not require the `Authorization` header, and using the header can cause the
|
58
|
+
# request to fail.
|
54
59
|
# @param [Google::Apis::StsV1::GoogleIdentityStsV1ExchangeTokenRequest] google_identity_sts_v1_exchange_token_request_object
|
55
60
|
# @param [String] fields
|
56
61
|
# Selector specifying which fields to include in a partial response.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.6.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-
|
11
|
+
date: 2021-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
@@ -52,7 +52,7 @@ licenses:
|
|
52
52
|
metadata:
|
53
53
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
54
54
|
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.
|
55
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-sts_v1/v0.6.0
|
56
56
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-sts_v1
|
57
57
|
post_install_message:
|
58
58
|
rdoc_options: []
|
@@ -62,14 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
62
|
requirements:
|
63
63
|
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: '2.
|
65
|
+
version: '2.5'
|
66
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.
|
72
|
+
rubygems_version: 3.2.17
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Simple REST client for Security Token Service API V1
|