google-cloud-bigtable 2.12.1 → 2.12.2
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 +12 -1
- data/CHANGELOG.md +6 -0
- data/lib/google/cloud/bigtable/version.rb +1 -1
- data/lib/google/cloud/bigtable.rb +3 -4
- data/lib/google-cloud-bigtable.rb +31 -16
- 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: 95305d13ed4a835f5f0568999568f9b7ffb0034776d9fd626bf9df8dc00ae241
|
|
4
|
+
data.tar.gz: 97be595610413344edd7b183dc30d79e08139d785578a6aa643a8a27c9078b29
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d7e0b410f8cc24923495e7b6fdf754f353139228fbd79b121ba5f92da514b10388c9debe69b82aea68a2572612a5ad3a3bb8627dbb873e8176ab681de3e98fc2
|
|
7
|
+
data.tar.gz: 5f5cbc2a3e60ae44725321079ae07028c1932ca8847b19b0715429adf8158c3f294cf0236d94bcac7629c70ed36ab06508d48ce3963f0bad674f5d845251ae43
|
data/AUTHENTICATION.md
CHANGED
|
@@ -46,6 +46,12 @@ code.
|
|
|
46
46
|
|
|
47
47
|
**Credentials** are discovered in the following order:
|
|
48
48
|
|
|
49
|
+
> [!WARNING]
|
|
50
|
+
> If you accept a credential configuration (JSON file or Hash) from an
|
|
51
|
+
> external source for authentication to Google Cloud, you must validate it before
|
|
52
|
+
> providing it to a Google API client library. Providing an unvalidated credential
|
|
53
|
+
> configuration to Google APIs can compromise the security of your systems and data.
|
|
54
|
+
|
|
49
55
|
1. Specify credentials in method arguments
|
|
50
56
|
2. Specify credentials in configuration
|
|
51
57
|
3. Discover credentials path in environment variables
|
|
@@ -99,11 +105,16 @@ The **Project ID** and the path to the **Credentials JSON** file can be configur
|
|
|
99
105
|
instead of placing them in environment variables or providing them as arguments.
|
|
100
106
|
|
|
101
107
|
```ruby
|
|
108
|
+
require "googleauth"
|
|
102
109
|
require "google/cloud/bigtable"
|
|
103
110
|
|
|
111
|
+
credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
112
|
+
json_key_io: ::File.open("/path/to/keyfile.json")
|
|
113
|
+
)
|
|
114
|
+
|
|
104
115
|
Google::Cloud::Bigtable.configure do |config|
|
|
105
116
|
config.project_id = "my-project-id"
|
|
106
|
-
config.credentials =
|
|
117
|
+
config.credentials = credentials
|
|
107
118
|
end
|
|
108
119
|
|
|
109
120
|
client = Google::Cloud::Bigtable.new
|
data/CHANGELOG.md
CHANGED
|
@@ -43,15 +43,14 @@ module Google
|
|
|
43
43
|
# be one of the following types:
|
|
44
44
|
# `Google::Auth::Credentials` uses the properties of its represented keyfile for
|
|
45
45
|
# authenticating requests made by this client.
|
|
46
|
-
# `String` will be treated as the path to the keyfile to use to construct
|
|
47
|
-
# credentials for this client.
|
|
48
|
-
# `Hash` will be treated as the contents of a keyfile to use to construct
|
|
49
|
-
# credentials for this client.
|
|
50
46
|
# `GRPC::Core::Channel` will be used to make calls through.
|
|
51
47
|
# `GRPC::Core::ChannelCredentials` for the setting up the gRPC client. The channel credentials
|
|
52
48
|
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
|
53
49
|
# `Proc` will be used as an updater_proc for the gRPC channel. The proc transforms the
|
|
54
50
|
# metadata for requests, generally, to give OAuth credentials.
|
|
51
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
52
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
53
|
+
# Google APIs can compromise the security of your systems and data.
|
|
55
54
|
# @param universe_domain [String] Override of the universe domain. Optional.
|
|
56
55
|
# @param endpoint [String] Override of the endpoint host name. Optional.
|
|
57
56
|
# If the param is nil, uses the default endpoint.
|
|
@@ -40,29 +40,33 @@ module Google
|
|
|
40
40
|
# updater_proc is supplied.
|
|
41
41
|
# @param timeout [Integer]
|
|
42
42
|
# The default timeout, in seconds, for calls made through this client.
|
|
43
|
-
# @param credentials [Google::Auth::Credentials,
|
|
43
|
+
# @param credentials [Google::Auth::Credentials, GRPC::Core::Channel,
|
|
44
44
|
# GRPC::Core::ChannelCredentials, Proc]
|
|
45
|
-
#
|
|
45
|
+
# The means for authenticating requests made by the client. This parameter can
|
|
46
46
|
# be one of the following types.
|
|
47
47
|
# `Google::Auth::Credentials` uses the properties of its represented keyfile for
|
|
48
48
|
# authenticating requests made by this client.
|
|
49
|
-
# `String` will be treated as the path to the keyfile to use to construct
|
|
50
|
-
# credentials for this client.
|
|
51
|
-
# `Hash` will be treated as the contents of a keyfile to use to construct
|
|
52
|
-
# credentials for this client.
|
|
53
49
|
# `GRPC::Core::Channel` will be used to make calls through.
|
|
54
50
|
# `GRPC::Core::ChannelCredentials` will be used to set up the gRPC client. The channel credentials
|
|
55
51
|
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
|
56
52
|
# `Proc` will be used as an updater_proc for the gRPC channel. The proc transforms the
|
|
57
53
|
# metadata for requests, generally, to give OAuth credentials.
|
|
58
|
-
#
|
|
54
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
55
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
56
|
+
# Google APIs can compromise the security of your systems and data.
|
|
59
57
|
#
|
|
60
|
-
#
|
|
61
|
-
#
|
|
58
|
+
# @example
|
|
59
|
+
#
|
|
60
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
61
|
+
# # on the appropriate credentials class for your environment.
|
|
62
|
+
#
|
|
63
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
64
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
65
|
+
# )
|
|
62
66
|
#
|
|
63
|
-
#
|
|
67
|
+
# gcloud = Google::Cloud.new
|
|
64
68
|
#
|
|
65
|
-
#
|
|
69
|
+
# bigtable = gcloud.bigtable credentials: credentials
|
|
66
70
|
#
|
|
67
71
|
def bigtable scope: nil, timeout: nil, credentials: nil
|
|
68
72
|
credentials ||= @keyfile
|
|
@@ -83,21 +87,32 @@ module Google
|
|
|
83
87
|
# Project identifier for the Bigtable service you
|
|
84
88
|
# are connecting to. If not present, the default project for the
|
|
85
89
|
# credentials is used.
|
|
86
|
-
# @param credentials [Google::Auth::Credentials,
|
|
90
|
+
# @param credentials [Google::Auth::Credentials, GRPC::Core::Channel,
|
|
87
91
|
# GRPC::Core::ChannelCredentials, Proc]
|
|
88
92
|
# The means for authenticating requests made by the client. This parameter can
|
|
89
93
|
# be one of the following types.
|
|
90
94
|
# `Google::Auth::Credentials` uses the properties of its represented keyfile for
|
|
91
95
|
# authenticating requests made by this client.
|
|
92
|
-
# `String` will be treated as the path to the keyfile to use to construct
|
|
93
|
-
# credentials for this client.
|
|
94
|
-
# `Hash` will be treated as the contents of a keyfile to use to construct
|
|
95
|
-
# credentials for this client.
|
|
96
96
|
# `GRPC::Core::Channel` will be used to make calls through.
|
|
97
97
|
# `GRPC::Core::ChannelCredentials` will be used to set up the gRPC client. The channel credentials
|
|
98
98
|
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
|
99
99
|
# `Proc` will be used as an updater_proc for the gRPC channel. The proc transforms the
|
|
100
100
|
# metadata for requests, generally, to give OAuth credentials.
|
|
101
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
102
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
103
|
+
# Google APIs can compromise the security of your systems and data.
|
|
104
|
+
#
|
|
105
|
+
# @example
|
|
106
|
+
#
|
|
107
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
108
|
+
# # on the appropriate credentials class for your environment.
|
|
109
|
+
#
|
|
110
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
111
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
112
|
+
# )
|
|
113
|
+
#
|
|
114
|
+
# client = Google::Cloud.bigtable credentials: credentials
|
|
115
|
+
#
|
|
101
116
|
# @param scope [Array<String>]
|
|
102
117
|
# The OAuth 2.0 scopes controlling the set of resources and operations
|
|
103
118
|
# that the connection can access. See [Using OAuth 2.0 to Access Google
|