@@ -9,13 +9,13 @@ can use. Please note that only Google Cloud Storage supports this feature.
9
9
For complete documentation, see https://cloud.google.com/iam/docs/downscoping-short-lived-credentials
10
10
11
11
To downscope permissions of a source credential, you need to define
12
- a Credential Access Boundary. Said Boundary specifies which resources
12
+ a Credential Access Boundary. Said Boundary specifies which resources
13
13
the newly created credential can access, an upper bound on the permissions
14
- it has over those resources, and optionally attribute-based conditional
15
- access to the aforementioned resources. For more information on IAM
14
+ it has over those resources, and optionally attribute-based conditional
15
+ access to the aforementioned resources. For more information on IAM
16
16
Conditions, see https://cloud.google.com/iam/docs/conditions-overview.
17
17
18
- This functionality would typically be used to provide a third party with
18
+ This functionality can be used to provide a third party with
19
19
limited access to and permissions on resources held by the owner of the root
20
20
credential or internally in conjunction with the principle of least privilege
21
21
to ensure that internal services only hold the minimum necessary privileges
@@ -24,13 +24,13 @@ for their function.
24
24
For example, a token broker can be set up on a server in a private network.
25
25
Various workloads (token consumers) in the same network will send authenticated
26
26
requests to that broker for downscoped tokens to access or modify specific google
27
- cloud storage buckets. See the NewTokenSource example for an example of how a
27
+ cloud storage buckets. See the NewTokenSource example for an example of how a
28
28
token broker would use this package.
29
29
30
30
The broker will use the functionality in this package to generate a downscoped
31
31
token with the requested configuration, and then pass it back to the token
32
- consumer. These downscoped access tokens can then be used to access Google
33
- Storage resources. For instance, you can create a NewClient from the
32
+ consumer. These downscoped access tokens can then be used to access Google
33
+ Storage resources. For instance, you can create a NewClient from the
34
34
"cloud.google.com/go/storage" package and pass in option.WithTokenSource(yourTokenSource))
35
35
*/
36
36
package downscope
@@ -81,7 +81,7 @@ type AccessBoundaryRule struct {
81
81
// An Condition restricts the availability of permissions
82
82
// to specific Cloud Storage objects. Optional.
83
83
//
84
- // A Condition can be used to make permissions available for specific objects,
84
+ // A Condition can be used to make permissions available for specific objects,
85
85
// rather than all objects in a Cloud Storage bucket.
86
86
Condition * AvailabilityCondition `json:"availabilityCondition,omitempty"`
87
87
}
@@ -183,9 +183,9 @@ func (dts downscopingTokenSource) Token() (*oauth2.Token, error) {
183
183
if resp .StatusCode != http .StatusOK {
184
184
b , err := ioutil .ReadAll (resp .Body )
185
185
if err != nil {
186
- return nil , fmt .Errorf ("downscope: unable to exchange token; %v. Failed to read response body: %v" , resp .StatusCode , err )
186
+ return nil , fmt .Errorf ("downscope: unable to exchange token; %v. Failed to read response body: %v" , resp .StatusCode , err )
187
187
}
188
- return nil , fmt .Errorf ("downscope: unable to exchange token; %v. Server responsed: %v" , resp .StatusCode , string (b ))
188
+ return nil , fmt .Errorf ("downscope: unable to exchange token; %v. Server responsed: %v" , resp .StatusCode , string (b ))
189
189
}
190
190
191
191
var tresp downscopedTokenResponse
0 commit comments