google-cloud-dns 1.1.0 → 1.1.1

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: 14f2f103cb1b66001955e1c225fa01d0f8fa018fa6cf32fc083166536daa6a5b
4
- data.tar.gz: 625d8b7176056f6177a72e813f95b9ed504f8f9252940ba5f28e086efe847514
3
+ metadata.gz: 936fa34292aead803fe952d5a57fcf1db0cd8545892757cacbee33265030932e
4
+ data.tar.gz: f80081a6a021af3f4d1d5719bdeb2948a70f97a4af0ff50ee5433245fc7e64ba
5
5
  SHA512:
6
- metadata.gz: 2a8dd4a599a4b9ceee4cc755f095adbd01ab254a4a1397f59b5f6796280bccd5db0d34f545ca89ee4f3fb8782d3cf473bd0c667be10ea5cd12e34cb12e7d5e0d
7
- data.tar.gz: f9e68eae822a5f4ca5520f242542282bc4e13de36664456048ef6b440a9c2cd7ef25457523a3760255918c161c4671c6cb40fc2d633bc376826391863947e623
6
+ metadata.gz: aa85f2dc53a45236c9e214b2ef63d278e4db25d3a2a3df7786a21882aceb2e8c9edf26606f7aa343b8bef2a6f542fba8e1b1076882424efa2e749d69d27a772f
7
+ data.tar.gz: 0be74c9658ee4e1329174f1b16f99d5df0dd62ae1bf7bc19ea1732afce23beba0f952958a0fc4521955b9972266eeeec4b67a3c747669c20df50ba3c6011cd3d
data/AUTHENTICATION.md CHANGED
@@ -28,6 +28,12 @@ providing **Project ID** and **Service Account Credentials** directly in code.
28
28
 
29
29
  **Credentials** are discovered in the following order:
30
30
 
31
+ > [!WARNING]
32
+ > If you accept a credential configuration (JSON file or Hash) from an
33
+ > external source for authentication to Google Cloud, you must validate it before
34
+ > providing it to a Google API client library. Providing an unvalidated credential
35
+ > configuration to Google APIs can compromise the security of your systems and data.
36
+
31
37
  1. Specify credentials in method arguments
32
38
  2. Specify credentials in configuration
33
39
  3. Discover credentials path in environment variables
@@ -82,11 +88,16 @@ The **Project ID** and **Credentials JSON** can be configured instead of placing
82
88
  them in environment variables or providing them as arguments.
83
89
 
84
90
  ```ruby
91
+ require "googleauth"
85
92
  require "google/cloud/dns"
86
93
 
94
+ credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
95
+ json_key_io: ::File.open("/path/to/keyfile.json")
96
+ )
97
+
87
98
  Google::Cloud::Dns.configure do |config|
88
99
  config.project_id = "my-project-id"
89
- config.credentials = "path/to/keyfile.json"
100
+ config.credentials = credentials
90
101
  end
91
102
 
92
103
  dns = Google::Cloud::Dns.new
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 1.1.1 (2025-10-31)
4
+
5
+ #### Documentation
6
+
7
+ * add warning about loading unvalidated credentials ([#32121](https://github.com/googleapis/google-cloud-ruby/issues/32121))
8
+
3
9
  ### 1.1.0 (2025-03-04)
4
10
 
5
11
  #### Features
data/OVERVIEW.md CHANGED
@@ -4,8 +4,8 @@ Google Cloud DNS is a high-performance, resilient, global DNS service that
4
4
  provides a cost-effective way to make your applications and services
5
5
  available to your users. This programmable, authoritative DNS service can
6
6
  be used to easily publish and manage DNS records using the same
7
- infrastructure relied upon by Google. To learn more, read [What is Google
8
- Cloud DNS?](https://cloud.google.com/dns/what-is-cloud-dns).
7
+ infrastructure relied upon by Google. To learn more, read [Cloud DNS
8
+ Overview](https://cloud.google.com/dns/docs/overview).
9
9
 
10
10
  The goal of google-cloud is to provide an API that is comfortable to Rubyists.
11
11
  Your authentication credentials are detected automatically in Google Cloud
@@ -52,7 +52,7 @@ module Google
52
52
 
53
53
  ##
54
54
  # The identifier of a [supported record type
55
- # ](https://cloud.google.com/dns/what-is-cloud-dns#supported_record_types).
55
+ # ](https://cloud.google.com/dns/docs/records-overview).
56
56
  # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
57
57
  #
58
58
  # @return [String]
@@ -83,7 +83,7 @@ module Google
83
83
  # @param [String] name The owner of the record. For example:
84
84
  # `example.com.`.
85
85
  # @param [String] type The identifier of a [supported record
86
- # type](https://cloud.google.com/dns/what-is-cloud-dns).
86
+ # type](https://cloud.google.com/dns/docs/records-overview).
87
87
  # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
88
88
  # @param [Integer] ttl The number of seconds that the record can be
89
89
  # cached by resolvers.
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Dns
19
- VERSION = "1.1.0".freeze
19
+ VERSION = "1.1.1".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -57,7 +57,7 @@ module Google
57
57
  # @param [String] name The owner of the record. For example:
58
58
  # `example.com.`.
59
59
  # @param [String] type The identifier of a [supported record
60
- # type](https://cloud.google.com/dns/what-is-cloud-dns).
60
+ # type](https://cloud.google.com/dns/docs/records-overview).
61
61
  # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
62
62
  # @param [Integer] ttl The number of seconds that the record can be
63
63
  # cached by resolvers.
@@ -88,7 +88,7 @@ module Google
88
88
  # @param [String] name The owner of the record. For example:
89
89
  # `example.com.`.
90
90
  # @param [String] type The identifier of a [supported record
91
- # type](https://cloud.google.com/dns/what-is-cloud-dns).
91
+ # type](https://cloud.google.com/dns/docs/records-overview).
92
92
  # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
93
93
  #
94
94
  # @example
@@ -111,7 +111,7 @@ module Google
111
111
  # @param [String] name The owner of the record. For example:
112
112
  # `example.com.`.
113
113
  # @param [String] type The identifier of a [supported record
114
- # type](https://cloud.google.com/dns/what-is-cloud-dns).
114
+ # type](https://cloud.google.com/dns/docs/records-overview).
115
115
  # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
116
116
  # @param [Integer] ttl The number of seconds that the record can be
117
117
  # cached by resolvers.
@@ -146,7 +146,7 @@ module Google
146
146
  # @param [String] name The owner of the record. For example:
147
147
  # `example.com.`.
148
148
  # @param [String] type The identifier of a [supported record
149
- # type](https://cloud.google.com/dns/what-is-cloud-dns).
149
+ # type](https://cloud.google.com/dns/docs/records-overview).
150
150
  # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
151
151
  # @yield [record] a block yielding each matching record
152
152
  # @yieldparam [Record] record the record to be modified
@@ -256,7 +256,7 @@ module Google
256
256
  # @param [String] name Return only records with this domain or subdomain
257
257
  # name.
258
258
  # @param [String] type Return only records with this [record
259
- # type](https://cloud.google.com/dns/what-is-cloud-dns). If present,
259
+ # type](https://cloud.google.com/dns/docs/records-overview). If present,
260
260
  # the `name` parameter must also be present.
261
261
  # @param [String] token A previously-returned page token representing
262
262
  # part of the larger set of results to view.
@@ -505,7 +505,7 @@ module Google
505
505
  # @param [String] name The owner of the record. For example:
506
506
  # `example.com.`.
507
507
  # @param [String] type The identifier of a [supported record
508
- # type](https://cloud.google.com/dns/what-is-cloud-dns).
508
+ # type](https://cloud.google.com/dns/docs/records-overview).
509
509
  # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
510
510
  # @param [Integer] ttl The number of seconds that the record can be
511
511
  # cached by resolvers.
@@ -547,7 +547,7 @@ module Google
547
547
  # @param [String] name The owner of the record. For example:
548
548
  # `example.com.`.
549
549
  # @param [String] type The identifier of a [supported record
550
- # type](https://cloud.google.com/dns/what-is-cloud-dns).
550
+ # type](https://cloud.google.com/dns/docs/records-overview).
551
551
  # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
552
552
  # @param [Boolean] skip_soa Do not automatically update the SOA record
553
553
  # serial number. See {#update} for details.
@@ -581,7 +581,7 @@ module Google
581
581
  # @param [String] name The owner of the record. For example:
582
582
  # `example.com.`.
583
583
  # @param [String] type The identifier of a [supported record
584
- # type](https://cloud.google.com/dns/what-is-cloud-dns).
584
+ # type](https://cloud.google.com/dns/docs/records-overview).
585
585
  # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
586
586
  # @param [Integer] ttl The number of seconds that the record can be
587
587
  # cached by resolvers.
@@ -627,7 +627,7 @@ module Google
627
627
  # @param [String] name The owner of the record. For example:
628
628
  # `example.com.`.
629
629
  # @param [String] type The identifier of a [supported record
630
- # type](https://cloud.google.com/dns/what-is-cloud-dns).
630
+ # type](https://cloud.google.com/dns/docs/records-overview).
631
631
  # For example: `A`, `AAAA`, `CNAME`, `MX`, or `TXT`.
632
632
  # @param [Boolean] skip_soa Do not automatically update the SOA record
633
633
  # serial number. See {#update} for details.
@@ -27,8 +27,8 @@ module Google
27
27
  # provides a cost-effective way to make your applications and services
28
28
  # available to your users. This programmable, authoritative DNS service can
29
29
  # be used to easily publish and manage DNS records using the same
30
- # infrastructure relied upon by Google. To learn more, read [What is Google
31
- # Cloud DNS?](https://cloud.google.com/dns/what-is-cloud-dns).
30
+ # infrastructure relied upon by Google. To learn more, read [Cloud
31
+ # DNS Overview](https://cloud.google.com/dns/docs/overview).
32
32
  #
33
33
  # See {file:OVERVIEW.md Google Cloud DNS Overview}.
34
34
  #
@@ -42,9 +42,27 @@ module Google
42
42
  #
43
43
  # @param [String] project_id Identifier for a DNS project. If not present,
44
44
  # the default project for the credentials is used.
45
- # @param [String, Hash, Google::Auth::Credentials] credentials The path to
46
- # the keyfile as a String, the contents of the keyfile as a Hash, or a
47
- # Google::Auth::Credentials object. (See {Dns::Credentials})
45
+ # @param [Google::Auth::Credentials] credentials A Google::Auth::Credentials
46
+ # object. (See {Dns::Credentials})
47
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
48
+ # is deprecated. Providing an unvalidated credential configuration to
49
+ # Google APIs can compromise the security of your systems and data.
50
+ #
51
+ # @example
52
+ #
53
+ # # The recommended way to provide credentials is to use the `make_creds` method
54
+ # # on the appropriate credentials class for your environment.
55
+ #
56
+ # require "googleauth"
57
+ #
58
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
59
+ # json_key_io: ::File.open("/path/to/keyfile.json")
60
+ # )
61
+ #
62
+ # dns = Google::Cloud::Dns.new(
63
+ # project_id: "my-project-id",
64
+ # credentials: credentials
65
+ # )
48
66
  # @param [String, Array<String>] scope The OAuth 2.0 scopes controlling
49
67
  # the set of resources and operations that the connection can access.
50
68
  # See [Using OAuth 2.0 to Access Google
@@ -80,9 +80,25 @@ module Google
80
80
  #
81
81
  # @param [String] project_id Identifier for a DNS project. If not present,
82
82
  # the default project for the credentials is used.
83
- # @param [String, Hash, Google::Auth::Credentials] credentials The path to
84
- # the keyfile as a String, the contents of the keyfile as a Hash, or a
85
- # Google::Auth::Credentials object. (See {Dns::Credentials})
83
+ # @param [Google::Auth::Credentials] credentials A Google::Auth::Credentials
84
+ # object. (See {Dns::Credentials})
85
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
86
+ # is deprecated. Providing an unvalidated credential configuration to
87
+ # Google APIs can compromise the security of your systems and data.
88
+ #
89
+ # @example
90
+ #
91
+ # # The recommended way to provide credentials is to use the `make_creds` method
92
+ # # on the appropriate credentials class for your environment.
93
+ #
94
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
95
+ # json_key_io: ::File.open("/path/to/keyfile.json")
96
+ # )
97
+ #
98
+ # dns = Google::Cloud::Dns.new(
99
+ # project_id: "my-project-id",
100
+ # credentials: credentials
101
+ # )
86
102
  # @param [String, Array<String>] scope The OAuth 2.0 scopes controlling the
87
103
  # set of resources and operations that the connection can access. See
88
104
  # [Using OAuth 2.0 to Access Google
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dns
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
8
8
  - Chris Smith
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-04 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  requirements: []
118
- rubygems_version: 3.6.5
118
+ rubygems_version: 3.6.9
119
119
  specification_version: 4
120
120
  summary: API Client library for Google Cloud DNS
121
121
  test_files: []