google-cloud-recaptcha_enterprise-v1beta1 0.4.4 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -41,12 +41,24 @@ module Google
41
41
  # "projects/\\{project_number}/assessments/\\{assessment_id}".
42
42
  # @!attribute [rw] annotation
43
43
  # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest::Annotation]
44
- # Required. The annotation that will be assigned to the Event.
44
+ # Optional. The annotation that will be assigned to the Event. This field can be left
45
+ # empty to provide reasons that apply to an event without concluding whether
46
+ # the event is legitimate or fraudulent.
47
+ # @!attribute [rw] reasons
48
+ # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest::Reason>]
49
+ # Optional. Optional reasons for the annotation that will be assigned to the Event.
50
+ # @!attribute [rw] hashed_account_id
51
+ # @return [::String]
52
+ # Optional. Optional unique stable hashed user identifier to apply to the assessment.
53
+ # This is an alternative to setting the hashed_account_id in
54
+ # CreateAssessment, for example when the account identifier is not yet known
55
+ # in the initial request. It is recommended that the identifier is hashed
56
+ # using hmac-sha256 with stable secret.
45
57
  class AnnotateAssessmentRequest
46
58
  include ::Google::Protobuf::MessageExts
47
59
  extend ::Google::Protobuf::MessageExts::ClassMethods
48
60
 
49
- # Enum that reprensents the types of annotations.
61
+ # Enum that represents the types of annotations.
50
62
  module Annotation
51
63
  # Default unspecified type.
52
64
  ANNOTATION_UNSPECIFIED = 0
@@ -56,6 +68,60 @@ module Google
56
68
 
57
69
  # Provides information that the event turned out to be fraudulent.
58
70
  FRAUDULENT = 2
71
+
72
+ # Provides information that the event was related to a login event in which
73
+ # the user typed the correct password. Deprecated, prefer indicating
74
+ # CORRECT_PASSWORD through the reasons field instead.
75
+ PASSWORD_CORRECT = 3
76
+
77
+ # Provides information that the event was related to a login event in which
78
+ # the user typed the incorrect password. Deprecated, prefer indicating
79
+ # INCORRECT_PASSWORD through the reasons field instead.
80
+ PASSWORD_INCORRECT = 4
81
+ end
82
+
83
+ # Enum that represents potential reasons for annotating an assessment.
84
+ module Reason
85
+ # Default unspecified reason.
86
+ REASON_UNSPECIFIED = 0
87
+
88
+ # Indicates a chargeback issued for the transaction with no other details.
89
+ # When possible, specify the type by using CHARGEBACK_FRAUD or
90
+ # CHARGEBACK_DISPUTE instead.
91
+ CHARGEBACK = 1
92
+
93
+ # Indicates a chargeback related to an alleged unauthorized transaction
94
+ # from the cardholder's perspective (for example, the card number was
95
+ # stolen).
96
+ CHARGEBACK_FRAUD = 8
97
+
98
+ # Indicates a chargeback related to the cardholder having provided their
99
+ # card details but allegedly not being satisfied with the purchase
100
+ # (for example, misrepresentation, attempted cancellation).
101
+ CHARGEBACK_DISPUTE = 9
102
+
103
+ # Indicates the transaction associated with the assessment is suspected of
104
+ # being fraudulent based on the payment method, billing details, shipping
105
+ # address or other transaction information.
106
+ PAYMENT_HEURISTICS = 2
107
+
108
+ # Indicates that the user was served a 2FA challenge. An old assessment
109
+ # with `ENUM_VALUES.INITIATED_TWO_FACTOR` reason that has not been
110
+ # overwritten with `PASSED_TWO_FACTOR` is treated as an abandoned 2FA flow.
111
+ # This is equivalent to `FAILED_TWO_FACTOR`.
112
+ INITIATED_TWO_FACTOR = 7
113
+
114
+ # Indicates that the user passed a 2FA challenge.
115
+ PASSED_TWO_FACTOR = 3
116
+
117
+ # Indicates that the user failed a 2FA challenge.
118
+ FAILED_TWO_FACTOR = 4
119
+
120
+ # Indicates the user provided the correct password.
121
+ CORRECT_PASSWORD = 5
122
+
123
+ # Indicates the user provided an incorrect password.
124
+ INCORRECT_PASSWORD = 6
59
125
  end
60
126
  end
61
127
 
@@ -65,6 +131,24 @@ module Google
65
131
  extend ::Google::Protobuf::MessageExts::ClassMethods
66
132
  end
67
133
 
134
+ # Password leak verification info.
135
+ # @!attribute [rw] hashed_user_credentials
136
+ # @return [::String]
137
+ # Optional. Scrypt hash of the username+password that the customer wants to verify
138
+ # against a known password leak.
139
+ # @!attribute [r] credentials_leaked
140
+ # @return [::Boolean]
141
+ # Output only. Whether or not the user's credentials are present in a known leak.
142
+ # @!attribute [rw] canonicalized_username
143
+ # @return [::String]
144
+ # Optional. The username part of the user credentials for which we want to trigger a
145
+ # leak check in canonicalized form. This is the same data used to create the
146
+ # hashed_user_credentials on the customer side.
147
+ class PasswordLeakVerification
148
+ include ::Google::Protobuf::MessageExts
149
+ extend ::Google::Protobuf::MessageExts::ClassMethods
150
+ end
151
+
68
152
  # A recaptcha assessment resource.
69
153
  # @!attribute [r] name
70
154
  # @return [::String]
@@ -84,11 +168,20 @@ module Google
84
168
  # @!attribute [r] reasons
85
169
  # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1beta1::Assessment::ClassificationReason>]
86
170
  # Output only. Reasons contributing to the risk analysis verdict.
171
+ # @!attribute [rw] password_leak_verification
172
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::PasswordLeakVerification]
173
+ # Information about the user's credentials used to check for leaks.
174
+ # This feature is part of the Early Access Program (EAP). Exercise caution,
175
+ # and do not deploy integrations based on this feature in a production
176
+ # environment.
177
+ # @!attribute [rw] account_defender_assessment
178
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::AccountDefenderAssessment]
179
+ # Assessment returned by Account Defender when a hashed_account_id is
180
+ # provided.
87
181
  class Assessment
88
182
  include ::Google::Protobuf::MessageExts
89
183
  extend ::Google::Protobuf::MessageExts::ClassMethods
90
184
 
91
- # LINT.IfChange(classification_reason)
92
185
  # Reasons contributing to the risk analysis verdict.
93
186
  module ClassificationReason
94
187
  # Default unspecified type.
@@ -133,6 +226,10 @@ module Google
133
226
  # Optional. The expected action for this type of event. This should be the same action
134
227
  # provided at token generation time on client-side platforms already
135
228
  # integrated with recaptcha enterprise.
229
+ # @!attribute [rw] hashed_account_id
230
+ # @return [::String]
231
+ # Optional. Optional unique stable hashed user identifier for the request. The
232
+ # identifier should ideally be hashed using sha256 with stable secret.
136
233
  class Event
137
234
  include ::Google::Protobuf::MessageExts
138
235
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -140,7 +237,11 @@ module Google
140
237
 
141
238
  # @!attribute [rw] valid
142
239
  # @return [::Boolean]
143
- # Whether the provided user response token is valid.
240
+ # Whether the provided user response token is valid. When valid = false, the
241
+ # reason could be specified in invalid_reason or it could also be due to
242
+ # a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey
243
+ # used to generate the token was different than the one specified in the
244
+ # assessment).
144
245
  # @!attribute [rw] invalid_reason
145
246
  # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::TokenProperties::InvalidReason]
146
247
  # Reason associated with the response when valid = false.
@@ -157,7 +258,6 @@ module Google
157
258
  include ::Google::Protobuf::MessageExts
158
259
  extend ::Google::Protobuf::MessageExts::ClassMethods
159
260
 
160
- # LINT.IfChange
161
261
  # Enum that represents the types of invalid token reasons.
162
262
  module InvalidReason
163
263
  # Default unspecified type.
@@ -183,190 +283,43 @@ module Google
183
283
 
184
284
  # The user verification token was not present. It is a required input.
185
285
  MISSING = 6
186
- end
187
- end
188
-
189
- # The create key request message.
190
- # @!attribute [rw] parent
191
- # @return [::String]
192
- # Required. The name of the project in which the key will be created, in the
193
- # format "projects/\\{project_number}".
194
- # @!attribute [rw] key
195
- # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
196
- # Required. Information to create a reCAPTCHA Enterprise key.
197
- class CreateKeyRequest
198
- include ::Google::Protobuf::MessageExts
199
- extend ::Google::Protobuf::MessageExts::ClassMethods
200
- end
201
286
 
202
- # The list keys request message.
203
- # @!attribute [rw] parent
204
- # @return [::String]
205
- # Required. The name of the project that contains the keys that will be
206
- # listed, in the format "projects/\\{project_number}".
207
- # @!attribute [rw] page_size
208
- # @return [::Integer]
209
- # Optional. The maximum number of keys to return. Default is 10. Max limit is
210
- # 1000.
211
- # @!attribute [rw] page_token
212
- # @return [::String]
213
- # Optional. The next_page_token value returned from a previous.
214
- # ListKeysRequest, if any.
215
- class ListKeysRequest
216
- include ::Google::Protobuf::MessageExts
217
- extend ::Google::Protobuf::MessageExts::ClassMethods
218
- end
219
-
220
- # Response to request to list keys in a project.
221
- # @!attribute [rw] keys
222
- # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1beta1::Key>]
223
- # Key details.
224
- # @!attribute [rw] next_page_token
225
- # @return [::String]
226
- # Token to retrieve the next page of results. It is set to empty if no keys
227
- # remain in results.
228
- class ListKeysResponse
229
- include ::Google::Protobuf::MessageExts
230
- extend ::Google::Protobuf::MessageExts::ClassMethods
231
- end
232
-
233
- # The get key request message.
234
- # @!attribute [rw] name
235
- # @return [::String]
236
- # Required. The name of the requested key, in the format
237
- # "projects/\\{project_number}/keys/\\{key_id}".
238
- class GetKeyRequest
239
- include ::Google::Protobuf::MessageExts
240
- extend ::Google::Protobuf::MessageExts::ClassMethods
241
- end
242
-
243
- # The update key request message.
244
- # @!attribute [rw] key
245
- # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
246
- # Required. The key to update.
247
- # @!attribute [rw] update_mask
248
- # @return [::Google::Protobuf::FieldMask]
249
- # Optional. The mask to control which field of the key get updated. If the mask is not
250
- # present, all fields will be updated.
251
- class UpdateKeyRequest
252
- include ::Google::Protobuf::MessageExts
253
- extend ::Google::Protobuf::MessageExts::ClassMethods
254
- end
255
-
256
- # The delete key request message.
257
- # @!attribute [rw] name
258
- # @return [::String]
259
- # Required. The name of the key to be deleted, in the format
260
- # "projects/\\{project_number}/keys/\\{key_id}".
261
- class DeleteKeyRequest
262
- include ::Google::Protobuf::MessageExts
263
- extend ::Google::Protobuf::MessageExts::ClassMethods
264
- end
265
-
266
- # A key used to identify and configure applications (web and/or mobile) that
267
- # use reCAPTCHA Enterprise.
268
- # @!attribute [rw] name
269
- # @return [::String]
270
- # The resource name for the Key in the format
271
- # "projects/\\{project_number}/keys/\\{key_id}".
272
- # @!attribute [rw] display_name
273
- # @return [::String]
274
- # Human-readable display name of this key. Modifiable by user.
275
- # @!attribute [rw] web_settings
276
- # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::WebKeySettings]
277
- # Settings for keys that can be used by websites.
278
- # @!attribute [rw] android_settings
279
- # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::AndroidKeySettings]
280
- # Settings for keys that can be used by Android apps.
281
- # @!attribute [rw] ios_settings
282
- # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::IOSKeySettings]
283
- # Settings for keys that can be used by iOS apps.
284
- class Key
285
- include ::Google::Protobuf::MessageExts
286
- extend ::Google::Protobuf::MessageExts::ClassMethods
287
+ # A retriable error (such as network failure) occurred on the browser.
288
+ # Could easily be simulated by an attacker.
289
+ BROWSER_ERROR = 7
290
+ end
287
291
  end
288
292
 
289
- # Settings specific to keys that can be used by websites.
290
- # @!attribute [rw] enforce_allowed_domains
291
- # @return [::Boolean]
292
- # Whether allowed_domains is enforced or not.
293
- # @!attribute [rw] allowed_domains
294
- # @return [::Array<::String>]
295
- # Domains or subdomains of websites allowed to use the key. All subdomains
296
- # of an allowed domain are automatically allowed. A valid domain requires a
297
- # host and must not include any path, port, query or fragment.
298
- # Examples: 'example.com' or 'subdomain.example.com'
299
- # @!attribute [rw] allow_amp_traffic
300
- # @return [::Boolean]
301
- # Whether this key can be used on AMP (Accelerated Mobile Pages) websites.
302
- # @!attribute [rw] integration_type
303
- # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::WebKeySettings::IntegrationType]
304
- # Required. Describes how this key is integrated with the website.
305
- # @!attribute [rw] challenge_security_preference
306
- # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::WebKeySettings::ChallengeSecurityPreference]
307
- # Settings for the frequency and difficulty at which this key triggers
308
- # captcha challenges. This should only be specified for IntegrationTypes
309
- # CHECKBOX_CHALLENGE and INVISIBLE_CHALLENGE.
310
- class WebKeySettings
293
+ # Account Defender risk assessment.
294
+ # @!attribute [rw] labels
295
+ # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1beta1::AccountDefenderAssessment::AccountDefenderLabel>]
296
+ # Labels for this request.
297
+ class AccountDefenderAssessment
311
298
  include ::Google::Protobuf::MessageExts
312
299
  extend ::Google::Protobuf::MessageExts::ClassMethods
313
300
 
314
- # Enum that represents the integration types for web keys.
315
- module IntegrationType
316
- # Default type that indicates this enum hasn't been specified. This is not
317
- # a valid IntegrationType, one of the other types must be specified
318
- # instead.
319
- INTEGRATION_TYPE_UNSPECIFIED = 0
320
-
321
- # Only used to produce scores. It doesn't display the "I'm not a robot"
322
- # checkbox and never shows captcha challenges.
323
- SCORE_ONLY = 1
324
-
325
- # Displays the "I'm not a robot" checkbox and may show captcha challenges
326
- # after it is checked.
327
- CHECKBOX_CHALLENGE = 2
328
-
329
- # Doesn't display the "I'm not a robot" checkbox, but may show captcha
330
- # challenges after risk analysis.
331
- INVISIBLE_CHALLENGE = 3
332
- end
301
+ # Labels returned by Account Defender for this request.
302
+ module AccountDefenderLabel
303
+ # Default unspecified type.
304
+ ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0
333
305
 
334
- # Enum that represents the possible challenge frequency and difficulty
335
- # configurations for a web key.
336
- module ChallengeSecurityPreference
337
- # Default type that indicates this enum hasn't been specified.
338
- CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0
306
+ # The request matches a known good profile for the user.
307
+ PROFILE_MATCH = 1
339
308
 
340
- # Key tends to show fewer and easier challenges.
341
- USABILITY = 1
309
+ # The request is potentially a suspicious login event and should be further
310
+ # verified either via multi-factor authentication or another system.
311
+ SUSPICIOUS_LOGIN_ACTIVITY = 2
342
312
 
343
- # Key tends to show balanced (in amount and difficulty) challenges.
344
- BALANCED = 2
313
+ # The request matched a profile that previously had suspicious account
314
+ # creation behavior. This could mean this is a fake account.
315
+ SUSPICIOUS_ACCOUNT_CREATION = 3
345
316
 
346
- # Key tends to show more and harder challenges.
347
- SECURITY = 3
317
+ # The account in the request has a high number of related accounts. It does
318
+ # not necessarily imply that the account is bad but could require
319
+ # investigating.
320
+ RELATED_ACCOUNTS_NUMBER_HIGH = 4
348
321
  end
349
322
  end
350
-
351
- # Settings specific to keys that can be used by Android apps.
352
- # @!attribute [rw] allowed_package_names
353
- # @return [::Array<::String>]
354
- # Android package names of apps allowed to use the key.
355
- # Example: 'com.companyname.appname'
356
- class AndroidKeySettings
357
- include ::Google::Protobuf::MessageExts
358
- extend ::Google::Protobuf::MessageExts::ClassMethods
359
- end
360
-
361
- # Settings specific to keys that can be used by iOS apps.
362
- # @!attribute [rw] allowed_bundle_ids
363
- # @return [::Array<::String>]
364
- # iOS bundle ids of apps allowed to use the key.
365
- # Example: 'com.companyname.productname.appname'
366
- class IOSKeySettings
367
- include ::Google::Protobuf::MessageExts
368
- extend ::Google::Protobuf::MessageExts::ClassMethods
369
- end
370
323
  end
371
324
  end
372
325
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-recaptcha_enterprise-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-08 00:00:00.000000000 Z
11
+ date: 2022-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: '0.10'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.7'
29
+ version: '0.10'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.25.1
53
+ version: 1.26.1
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.25.1
60
+ version: 1.26.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '5.14'
67
+ version: '5.16'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '5.14'
74
+ version: '5.16'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minitest-focus
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '12.0'
109
+ version: '13.0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: '12.0'
116
+ version: '13.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: redcarpet
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -182,8 +182,6 @@ files:
182
182
  - proto_docs/google/api/field_behavior.rb
183
183
  - proto_docs/google/api/resource.rb
184
184
  - proto_docs/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.rb
185
- - proto_docs/google/protobuf/empty.rb
186
- - proto_docs/google/protobuf/field_mask.rb
187
185
  - proto_docs/google/protobuf/timestamp.rb
188
186
  homepage: https://github.com/googleapis/google-cloud-ruby
189
187
  licenses:
@@ -197,14 +195,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
197
195
  requirements:
198
196
  - - ">="
199
197
  - !ruby/object:Gem::Version
200
- version: '2.5'
198
+ version: '2.6'
201
199
  required_rubygems_version: !ruby/object:Gem::Requirement
202
200
  requirements:
203
201
  - - ">="
204
202
  - !ruby/object:Gem::Version
205
203
  version: '0'
206
204
  requirements: []
207
- rubygems_version: 3.2.17
205
+ rubygems_version: 3.3.14
208
206
  signing_key:
209
207
  specification_version: 4
210
208
  summary: API Client library for the reCAPTCHA Enterprise V1beta1 API
@@ -1,36 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright 2020 Google LLC
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # https://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
-
19
-
20
- module Google
21
- module Protobuf
22
- # A generic empty message that you can re-use to avoid defining duplicated
23
- # empty messages in your APIs. A typical example is to use it as the request
24
- # or the response type of an API method. For instance:
25
- #
26
- # service Foo {
27
- # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
28
- # }
29
- #
30
- # The JSON representation for `Empty` is empty JSON object `{}`.
31
- class Empty
32
- include ::Google::Protobuf::MessageExts
33
- extend ::Google::Protobuf::MessageExts::ClassMethods
34
- end
35
- end
36
- end