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

Commit

Permalink
feat: Add support for Password Check through the private_password_lea…
Browse files Browse the repository at this point in the history
…k_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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored May 19, 2022
1 parent 77b0dee commit 38c7a96
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
2 changes: 2 additions & 0 deletions google/cloud/recaptchaenterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
ListRelatedAccountGroupsResponse,
Metrics,
MigrateKeyRequest,
PrivatePasswordLeakVerification,
RelatedAccountGroup,
RelatedAccountGroupMembership,
RiskAnalysis,
Expand Down Expand Up @@ -82,6 +83,7 @@
"ListRelatedAccountGroupsResponse",
"Metrics",
"MigrateKeyRequest",
"PrivatePasswordLeakVerification",
"RelatedAccountGroup",
"RelatedAccountGroupMembership",
"RiskAnalysis",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/recaptchaenterprise_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
ListRelatedAccountGroupsResponse,
Metrics,
MigrateKeyRequest,
PrivatePasswordLeakVerification,
RelatedAccountGroup,
RelatedAccountGroupMembership,
RiskAnalysis,
Expand Down Expand Up @@ -79,6 +80,7 @@
"ListRelatedAccountGroupsResponse",
"Metrics",
"MigrateKeyRequest",
"PrivatePasswordLeakVerification",
"RecaptchaEnterpriseServiceClient",
"RelatedAccountGroup",
"RelatedAccountGroupMembership",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/recaptchaenterprise_v1/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
ListRelatedAccountGroupsResponse,
Metrics,
MigrateKeyRequest,
PrivatePasswordLeakVerification,
RelatedAccountGroup,
RelatedAccountGroupMembership,
RiskAnalysis,
Expand Down Expand Up @@ -73,6 +74,7 @@
"ListRelatedAccountGroupsResponse",
"Metrics",
"MigrateKeyRequest",
"PrivatePasswordLeakVerification",
"RelatedAccountGroup",
"RelatedAccountGroupMembership",
"RiskAnalysis",
Expand Down
51 changes: 51 additions & 0 deletions google/cloud/recaptchaenterprise_v1/types/recaptchaenterprise.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"RiskAnalysis",
"TokenProperties",
"AccountDefenderAssessment",
"PrivatePasswordLeakVerification",
"CreateKeyRequest",
"ListKeysRequest",
"ListKeysResponse",
Expand Down Expand Up @@ -173,6 +174,8 @@ class Assessment(proto.Message):
account_defender_assessment (google.cloud.recaptchaenterprise_v1.types.AccountDefenderAssessment):
Assessment returned by Account Defender when a
hashed_account_id is provided.
private_password_leak_verification (google.cloud.recaptchaenterprise_v1.types.PrivatePasswordLeakVerification):
Password leak verification info.
"""

name = proto.Field(
Expand All @@ -199,6 +202,11 @@ class Assessment(proto.Message):
number=6,
message="AccountDefenderAssessment",
)
private_password_leak_verification = proto.Field(
proto.MESSAGE,
number=7,
message="PrivatePasswordLeakVerification",
)


class Event(proto.Message):
Expand Down Expand Up @@ -373,6 +381,49 @@ class AccountDefenderLabel(proto.Enum):
)


class PrivatePasswordLeakVerification(proto.Message):
r"""Private password leak verification info.
Attributes:
lookup_hash_prefix (bytes):
Exactly 26-bit prefix of the SHA-256 hash of
the canonicalized username. It is used to look
up password leaks associated with that hash
prefix.
encrypted_user_credentials_hash (bytes):
Encrypted Scrypt hash of the canonicalized
username+password. It is re-encrypted by the server and
returned through ``reencrypted_user_credentials_hash``.
encrypted_leak_match_prefixes (Sequence[bytes]):
List of prefixes of the encrypted potential password leaks
that matched the given parameters. They should be compared
with the client-side decryption prefix of
``reencrypted_user_credentials_hash``
reencrypted_user_credentials_hash (bytes):
Corresponds to the re-encryption of the
``encrypted_user_credentials_hash`` field. Used to match
potential password leaks within
``encrypted_leak_match_prefixes``.
"""

lookup_hash_prefix = proto.Field(
proto.BYTES,
number=1,
)
encrypted_user_credentials_hash = proto.Field(
proto.BYTES,
number=2,
)
encrypted_leak_match_prefixes = proto.RepeatedField(
proto.BYTES,
number=3,
)
reencrypted_user_credentials_hash = proto.Field(
proto.BYTES,
number=4,
)


class CreateKeyRequest(proto.Message):
r"""The create key request message.
Expand Down

0 comments on commit 38c7a96

Please sign in to comment.