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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf8a0e4ff25d3f889e09c47441f675d69e77bc4b3a99e3d38c5b54bcf429f073
4
- data.tar.gz: 67002686aa0e9fc9f9b8ef563dd231c31fb653acddea67918687239c87ddfea7
3
+ metadata.gz: f14a035a15057ae83cb218c1591891b5ddae89147c00f4ac8bb92906bec9ff5f
4
+ data.tar.gz: 46b909f749689867ac6cd443eee663559658013707ac7999efaa1c372a870112
5
5
  SHA512:
6
- metadata.gz: d976bdff0e97a718eb4ab8f46fd2a254320ace9de84a36c24c1fdb9be1bff3be87a002f282e096f9027ff8e8ddd06f4b7bed2ad9b14046192306b5d6f85c33ef
7
- data.tar.gz: acab3b6d78bd29e089f709be3662790574f98b612f4fed17c5de6a8f256c205be94bcd476b5467369fe99deabea80ff1db0eaf9d91e723ef2502f2ff45ddd554
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 = "path/to/credentialfile.json"
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 = "path/to/credentialfile.json"
86
+ config.credentials = credentials
71
87
  end
72
88
 
73
89
  client = Google::Cloud::ResourceManager.folders
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module ResourceManager
23
- VERSION = "1.0.3"
23
+ VERSION = "1.0.4"
24
24
  end
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-resource_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC