google-cloud-resource_manager 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +18 -2
- data/lib/google/cloud/resource_manager/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f14a035a15057ae83cb218c1591891b5ddae89147c00f4ac8bb92906bec9ff5f
|
|
4
|
+
data.tar.gz: 46b909f749689867ac6cd443eee663559658013707ac7999efaa1c372a870112
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16b0c6b1c7aef44e24a482ec95218f2ec7ffea858ce6fa033d61625c5536df4c8c407d25ccfb31899241fedea7fda3fdd9f22a0e35d11e03cafb0f4b9e3e13a2
|
|
7
|
+
data.tar.gz: 484a1a0c44dacbb68fccee363cd3826e096c448ce333c00fd3864a1ddec716806d5e410778fabb1b8eac07a32dbf862bb75ede3fe932d5037671904b0f3b3518
|
data/AUTHENTICATION.md
CHANGED
|
@@ -33,6 +33,12 @@ credentials, there are several methods available to you.
|
|
|
33
33
|
|
|
34
34
|
Credentials are accepted in the following ways, in the following order or precedence:
|
|
35
35
|
|
|
36
|
+
> [!WARNING]
|
|
37
|
+
> If you accept a credential configuration (JSON file or Hash) from an
|
|
38
|
+
> external source for authentication to Google Cloud, you must validate it before
|
|
39
|
+
> providing it to a Google API client library. Providing an unvalidated credential
|
|
40
|
+
> configuration to Google APIs can compromise the security of your systems and data.
|
|
41
|
+
|
|
36
42
|
1. Credentials specified in method arguments
|
|
37
43
|
2. Credentials specified in configuration
|
|
38
44
|
3. Credentials pointed to or included in environment variables
|
|
@@ -54,20 +60,30 @@ whenever possible.
|
|
|
54
60
|
To configure a credentials file for an individual client initialization:
|
|
55
61
|
|
|
56
62
|
```ruby
|
|
63
|
+
require "googleauth"
|
|
57
64
|
require "google/cloud/resource_manager"
|
|
58
65
|
|
|
66
|
+
credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
67
|
+
json_key_io: ::File.open("/path/to/keyfile.json")
|
|
68
|
+
)
|
|
69
|
+
|
|
59
70
|
client = Google::Cloud::ResourceManager.folders do |config|
|
|
60
|
-
config.credentials =
|
|
71
|
+
config.credentials = credentials
|
|
61
72
|
end
|
|
62
73
|
```
|
|
63
74
|
|
|
64
75
|
To configure a credentials file globally for all clients:
|
|
65
76
|
|
|
66
77
|
```ruby
|
|
78
|
+
require "googleauth"
|
|
67
79
|
require "google/cloud/resource_manager"
|
|
68
80
|
|
|
81
|
+
credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
82
|
+
json_key_io: ::File.open("/path/to/keyfile.json")
|
|
83
|
+
)
|
|
84
|
+
|
|
69
85
|
Google::Cloud::ResourceManager.configure do |config|
|
|
70
|
-
config.credentials =
|
|
86
|
+
config.credentials = credentials
|
|
71
87
|
end
|
|
72
88
|
|
|
73
89
|
client = Google::Cloud::ResourceManager.folders
|