Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 38c7a96

Browse files
feat: Add support for Password Check through the private_password_leak_verification field in Assessment (#233)
* feat: Add support for Password Check through the private_password_leak_verification field in the reCAPTCHA Assessment PiperOrigin-RevId: 449202953 Source-Link: googleapis/googleapis@e2ed48f Source-Link: https://github.com/googleapis/googleapis-gen/commit/82f55ea1435da6d69c8ceb0a33f863d1fd6a484e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODJmNTVlYTE0MzVkYTZkNjljOGNlYjBhMzNmODYzZDFmZDZhNDg0ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 77b0dee commit 38c7a96

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

google/cloud/recaptchaenterprise/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
ListRelatedAccountGroupsResponse,
4444
Metrics,
4545
MigrateKeyRequest,
46+
PrivatePasswordLeakVerification,
4647
RelatedAccountGroup,
4748
RelatedAccountGroupMembership,
4849
RiskAnalysis,
@@ -82,6 +83,7 @@
8283
"ListRelatedAccountGroupsResponse",
8384
"Metrics",
8485
"MigrateKeyRequest",
86+
"PrivatePasswordLeakVerification",
8587
"RelatedAccountGroup",
8688
"RelatedAccountGroupMembership",
8789
"RiskAnalysis",

google/cloud/recaptchaenterprise_v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
ListRelatedAccountGroupsResponse,
4242
Metrics,
4343
MigrateKeyRequest,
44+
PrivatePasswordLeakVerification,
4445
RelatedAccountGroup,
4546
RelatedAccountGroupMembership,
4647
RiskAnalysis,
@@ -79,6 +80,7 @@
7980
"ListRelatedAccountGroupsResponse",
8081
"Metrics",
8182
"MigrateKeyRequest",
83+
"PrivatePasswordLeakVerification",
8284
"RecaptchaEnterpriseServiceClient",
8385
"RelatedAccountGroup",
8486
"RelatedAccountGroupMembership",

google/cloud/recaptchaenterprise_v1/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
ListRelatedAccountGroupsResponse,
3737
Metrics,
3838
MigrateKeyRequest,
39+
PrivatePasswordLeakVerification,
3940
RelatedAccountGroup,
4041
RelatedAccountGroupMembership,
4142
RiskAnalysis,
@@ -73,6 +74,7 @@
7374
"ListRelatedAccountGroupsResponse",
7475
"Metrics",
7576
"MigrateKeyRequest",
77+
"PrivatePasswordLeakVerification",
7678
"RelatedAccountGroup",
7779
"RelatedAccountGroupMembership",
7880
"RiskAnalysis",

google/cloud/recaptchaenterprise_v1/types/recaptchaenterprise.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"RiskAnalysis",
2929
"TokenProperties",
3030
"AccountDefenderAssessment",
31+
"PrivatePasswordLeakVerification",
3132
"CreateKeyRequest",
3233
"ListKeysRequest",
3334
"ListKeysResponse",
@@ -173,6 +174,8 @@ class Assessment(proto.Message):
173174
account_defender_assessment (google.cloud.recaptchaenterprise_v1.types.AccountDefenderAssessment):
174175
Assessment returned by Account Defender when a
175176
hashed_account_id is provided.
177+
private_password_leak_verification (google.cloud.recaptchaenterprise_v1.types.PrivatePasswordLeakVerification):
178+
Password leak verification info.
176179
"""
177180

178181
name = proto.Field(
@@ -199,6 +202,11 @@ class Assessment(proto.Message):
199202
number=6,
200203
message="AccountDefenderAssessment",
201204
)
205+
private_password_leak_verification = proto.Field(
206+
proto.MESSAGE,
207+
number=7,
208+
message="PrivatePasswordLeakVerification",
209+
)
202210

203211

204212
class Event(proto.Message):
@@ -373,6 +381,49 @@ class AccountDefenderLabel(proto.Enum):
373381
)
374382

375383

384+
class PrivatePasswordLeakVerification(proto.Message):
385+
r"""Private password leak verification info.
386+
387+
Attributes:
388+
lookup_hash_prefix (bytes):
389+
Exactly 26-bit prefix of the SHA-256 hash of
390+
the canonicalized username. It is used to look
391+
up password leaks associated with that hash
392+
prefix.
393+
encrypted_user_credentials_hash (bytes):
394+
Encrypted Scrypt hash of the canonicalized
395+
username+password. It is re-encrypted by the server and
396+
returned through ``reencrypted_user_credentials_hash``.
397+
encrypted_leak_match_prefixes (Sequence[bytes]):
398+
List of prefixes of the encrypted potential password leaks
399+
that matched the given parameters. They should be compared
400+
with the client-side decryption prefix of
401+
``reencrypted_user_credentials_hash``
402+
reencrypted_user_credentials_hash (bytes):
403+
Corresponds to the re-encryption of the
404+
``encrypted_user_credentials_hash`` field. Used to match
405+
potential password leaks within
406+
``encrypted_leak_match_prefixes``.
407+
"""
408+
409+
lookup_hash_prefix = proto.Field(
410+
proto.BYTES,
411+
number=1,
412+
)
413+
encrypted_user_credentials_hash = proto.Field(
414+
proto.BYTES,
415+
number=2,
416+
)
417+
encrypted_leak_match_prefixes = proto.RepeatedField(
418+
proto.BYTES,
419+
number=3,
420+
)
421+
reencrypted_user_credentials_hash = proto.Field(
422+
proto.BYTES,
423+
number=4,
424+
)
425+
426+
376427
class CreateKeyRequest(proto.Message):
377428
r"""The create key request message.
378429

0 commit comments

Comments
 (0)