@@ -115,6 +115,31 @@ service RecaptchaEnterpriseService {
115
115
};
116
116
option (google.api.method_signature ) = "name" ;
117
117
}
118
+
119
+ // List groups of related accounts.
120
+ rpc ListRelatedAccountGroups (ListRelatedAccountGroupsRequest ) returns (ListRelatedAccountGroupsResponse ) {
121
+ option (google.api.http ) = {
122
+ get : "/v1/{parent=projects/*}/relatedaccountgroups"
123
+ };
124
+ option (google.api.method_signature ) = "parent" ;
125
+ }
126
+
127
+ // Get the memberships in a group of related accounts.
128
+ rpc ListRelatedAccountGroupMemberships (ListRelatedAccountGroupMembershipsRequest ) returns (ListRelatedAccountGroupMembershipsResponse ) {
129
+ option (google.api.http ) = {
130
+ get : "/v1/{parent=projects/*/relatedaccountgroups/*}/memberships"
131
+ };
132
+ option (google.api.method_signature ) = "parent" ;
133
+ }
134
+
135
+ // Search group memberships related to a given account.
136
+ rpc SearchRelatedAccountGroupMemberships (SearchRelatedAccountGroupMembershipsRequest ) returns (SearchRelatedAccountGroupMembershipsResponse ) {
137
+ option (google.api.http ) = {
138
+ post : "/v1/{parent=projects/*}/relatedaccountgroupmemberships:search"
139
+ body : "*"
140
+ };
141
+ option (google.api.method_signature ) = "parent,hashed_account_id" ;
142
+ }
118
143
}
119
144
120
145
// The create assessment request message.
@@ -205,6 +230,13 @@ message AnnotateAssessmentRequest {
205
230
206
231
// Optional. Optional reasons for the annotation that will be assigned to the Event.
207
232
repeated Reason reasons = 3 [(google.api.field_behavior ) = OPTIONAL ];
233
+
234
+ // Optional. Optional unique stable hashed user identifier to apply to the assessment.
235
+ // This is an alternative to setting the hashed_account_id in
236
+ // CreateAssessment, for example when the account identifier is not yet known
237
+ // in the initial request. It is recommended that the identifier is hashed
238
+ // using hmac-sha256 with stable secret.
239
+ bytes hashed_account_id = 4 [(google.api.field_behavior ) = OPTIONAL ];
208
240
}
209
241
210
242
// Empty response for AnnotateAssessment.
@@ -231,6 +263,10 @@ message Assessment {
231
263
232
264
// Output only. Properties of the provided event token.
233
265
TokenProperties token_properties = 4 [(google.api.field_behavior ) = OUTPUT_ONLY ];
266
+
267
+ // Assessment returned by Account Defender when a hashed_account_id is
268
+ // provided.
269
+ AccountDefenderAssessment account_defender_assessment = 6 ;
234
270
}
235
271
236
272
message Event {
@@ -253,6 +289,10 @@ message Event {
253
289
// provided at token generation time on client-side platforms already
254
290
// integrated with recaptcha enterprise.
255
291
string expected_action = 5 [(google.api.field_behavior ) = OPTIONAL ];
292
+
293
+ // Optional. Optional unique stable hashed user identifier for the request. The
294
+ // identifier should ideally be hashed using sha256 with stable secret.
295
+ bytes hashed_account_id = 6 [(google.api.field_behavior ) = OPTIONAL ];
256
296
}
257
297
258
298
// Risk analysis result for an event.
@@ -335,6 +375,34 @@ message TokenProperties {
335
375
string action = 5 ;
336
376
}
337
377
378
+ // Account Defender risk assessment.
379
+ message AccountDefenderAssessment {
380
+ // Labels returned by Account Defender for this request.
381
+ enum AccountDefenderLabel {
382
+ // Default unspecified type.
383
+ ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0 ;
384
+
385
+ // The request matches a known good profile for the user.
386
+ PROFILE_MATCH = 1 ;
387
+
388
+ // The request is potentially a suspicious login event and should be further
389
+ // verified either via multi-factor authentication or another system.
390
+ SUSPICIOUS_LOGIN_ACTIVITY = 2 ;
391
+
392
+ // The request matched a profile that previously had suspicious account
393
+ // creation behavior. This could mean this is a fake account.
394
+ SUSPICIOUS_ACCOUNT_CREATION = 3 ;
395
+
396
+ // The account in the request has a high number of related accounts. It does
397
+ // not necessarily imply that the account is bad but could require
398
+ // investigating.
399
+ RELATED_ACCOUNTS_NUMBER_HIGH = 4 ;
400
+ }
401
+
402
+ // Labels for this request.
403
+ repeated AccountDefenderLabel labels = 1 ;
404
+ }
405
+
338
406
// The create key request message.
339
407
message CreateKeyRequest {
340
408
// Required. The name of the project in which the key will be created, in the
@@ -510,11 +578,11 @@ message TestingOptions {
510
578
// challenge depending on risk and trust factors.
511
579
TESTING_CHALLENGE_UNSPECIFIED = 0 ;
512
580
513
- // Challenge requests for this key will always return a nocaptcha, which
581
+ // Challenge requests for this key always return a nocaptcha, which
514
582
// does not require a solution.
515
583
NOCAPTCHA = 1 ;
516
584
517
- // Challenge requests for this key will always return an unsolvable
585
+ // Challenge requests for this key always return an unsolvable
518
586
// challenge.
519
587
UNSOLVABLE_CHALLENGE = 2 ;
520
588
}
@@ -576,9 +644,9 @@ message WebKeySettings {
576
644
// Examples: 'example.com' or 'subdomain.example.com'
577
645
repeated string allowed_domains = 1 ;
578
646
579
- // Required. Whether this key can be used on AMP (Accelerated Mobile Pages) websites.
580
- // This can only be set for the SCORE integration type.
581
- bool allow_amp_traffic = 2 [ (google.api .field_behavior ) = REQUIRED ] ;
647
+ // If set to true, the key can be used on AMP (Accelerated Mobile Pages)
648
+ // websites. This is supported only for the SCORE integration type.
649
+ bool allow_amp_traffic = 2 ;
582
650
583
651
// Required. Describes how this key is integrated with the website.
584
652
IntegrationType integration_type = 4 [(google.api.field_behavior ) = REQUIRED ];
@@ -591,7 +659,7 @@ message WebKeySettings {
591
659
592
660
// Settings specific to keys that can be used by Android apps.
593
661
message AndroidKeySettings {
594
- // If set to true, it means allowed_package_names will not be enforced.
662
+ // If set to true, allowed_package_names are not enforced.
595
663
bool allow_all_package_names = 2 ;
596
664
597
665
// Android package names of apps allowed to use the key.
@@ -601,7 +669,7 @@ message AndroidKeySettings {
601
669
602
670
// Settings specific to keys that can be used by iOS apps.
603
671
message IOSKeySettings {
604
- // If set to true, it means allowed_bundle_ids will not be enforced.
672
+ // If set to true, allowed_bundle_ids are not enforced.
605
673
bool allow_all_bundle_ids = 2 ;
606
674
607
675
// iOS bundle ids of apps allowed to use the key.
@@ -646,3 +714,156 @@ message ChallengeMetrics {
646
714
// verification.
647
715
int64 passed_count = 4 ;
648
716
}
717
+
718
+ // The request message to list memberships in a related account group.
719
+ message ListRelatedAccountGroupMembershipsRequest {
720
+ // Required. The resource name for the related account group in the format
721
+ // `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`.
722
+ string parent = 1 [
723
+ (google.api.field_behavior ) = REQUIRED ,
724
+ (google.api.resource_reference ) = {
725
+ child_type : "recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership"
726
+ }
727
+ ];
728
+
729
+ // Optional. The maximum number of accounts to return. The service may return fewer than
730
+ // this value.
731
+ // If unspecified, at most 50 accounts will be returned.
732
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
733
+ int32 page_size = 2 [(google.api.field_behavior ) = OPTIONAL ];
734
+
735
+ // Optional. A page token, received from a previous `ListRelatedAccountGroupMemberships`
736
+ // call.
737
+ //
738
+ // When paginating, all other parameters provided to
739
+ // `ListRelatedAccountGroupMemberships` must match the call that provided the
740
+ // page token.
741
+ string page_token = 3 [(google.api.field_behavior ) = OPTIONAL ];
742
+ }
743
+
744
+ // The response to a `ListRelatedAccountGroupMemberships` call.
745
+ message ListRelatedAccountGroupMembershipsResponse {
746
+ // The memberships listed by the query.
747
+ repeated RelatedAccountGroupMembership related_account_group_memberships = 1 ;
748
+
749
+ // A token, which can be sent as `page_token` to retrieve the next page.
750
+ // If this field is omitted, there are no subsequent pages.
751
+ string next_page_token = 2 ;
752
+ }
753
+
754
+ // The request message to list related account groups.
755
+ message ListRelatedAccountGroupsRequest {
756
+ // Required. The name of the project to list related account groups from, in the format
757
+ // "projects/{project}".
758
+ string parent = 1 [
759
+ (google.api.field_behavior ) = REQUIRED ,
760
+ (google.api.resource_reference ) = {
761
+ child_type : "recaptchaenterprise.googleapis.com/RelatedAccountGroup"
762
+ }
763
+ ];
764
+
765
+ // Optional. The maximum number of groups to return. The service may return fewer than
766
+ // this value.
767
+ // If unspecified, at most 50 groups will be returned.
768
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
769
+ int32 page_size = 2 [(google.api.field_behavior ) = OPTIONAL ];
770
+
771
+ // Optional. A page token, received from a previous `ListRelatedAccountGroups` call.
772
+ // Provide this to retrieve the subsequent page.
773
+ //
774
+ // When paginating, all other parameters provided to
775
+ // `ListRelatedAccountGroups` must match the call that provided the page
776
+ // token.
777
+ string page_token = 3 [(google.api.field_behavior ) = OPTIONAL ];
778
+ }
779
+
780
+ // The response to a `ListRelatedAccountGroups` call.
781
+ message ListRelatedAccountGroupsResponse {
782
+ // The groups of related accounts listed by the query.
783
+ repeated RelatedAccountGroup related_account_groups = 1 ;
784
+
785
+ // A token, which can be sent as `page_token` to retrieve the next page.
786
+ // If this field is omitted, there are no subsequent pages.
787
+ string next_page_token = 2 ;
788
+ }
789
+
790
+ // The request message to search related account group memberships.
791
+ message SearchRelatedAccountGroupMembershipsRequest {
792
+ // Required. The name of the project to search related account group memberships from,
793
+ // in the format "projects/{project}".
794
+ string parent = 1 [
795
+ (google.api.field_behavior ) = REQUIRED ,
796
+ (google.api.resource_reference ) = {
797
+ child_type : "recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership"
798
+ }
799
+ ];
800
+
801
+ // Optional. The unique stable hashed user identifier we should search connections to.
802
+ // The identifier should correspond to a `hashed_account_id` provided in a
803
+ // previous CreateAssessment or AnnotateAssessment call.
804
+ bytes hashed_account_id = 2 [(google.api.field_behavior ) = OPTIONAL ];
805
+
806
+ // Optional. The maximum number of groups to return. The service may return fewer than
807
+ // this value.
808
+ // If unspecified, at most 50 groups will be returned.
809
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
810
+ int32 page_size = 3 [(google.api.field_behavior ) = OPTIONAL ];
811
+
812
+ // Optional. A page token, received from a previous
813
+ // `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the
814
+ // subsequent page.
815
+ //
816
+ // When paginating, all other parameters provided to
817
+ // `SearchRelatedAccountGroupMemberships` must match the call that provided
818
+ // the page token.
819
+ string page_token = 4 [(google.api.field_behavior ) = OPTIONAL ];
820
+ }
821
+
822
+ // The response to a `SearchRelatedAccountGroupMemberships` call.
823
+ message SearchRelatedAccountGroupMembershipsResponse {
824
+ // The queried memberships.
825
+ repeated RelatedAccountGroupMembership related_account_group_memberships = 1 ;
826
+
827
+ // A token, which can be sent as `page_token` to retrieve the next page.
828
+ // If this field is omitted, there are no subsequent pages.
829
+ string next_page_token = 2 ;
830
+ }
831
+
832
+ // A membership in a group of related accounts.
833
+ message RelatedAccountGroupMembership {
834
+ option (google.api.resource ) = {
835
+ type : "recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership"
836
+ pattern : "projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}"
837
+ };
838
+
839
+ // Required. The resource name for this membership in the format
840
+ // `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`.
841
+ string name = 1 [
842
+ (google.api.field_behavior ) = REQUIRED ,
843
+ (google.api.resource_reference ) = {
844
+ type : "recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership"
845
+ }
846
+ ];
847
+
848
+ // The unique stable hashed user identifier of the member. The identifier
849
+ // corresponds to a `hashed_account_id` provided in a previous
850
+ // CreateAssessment or AnnotateAssessment call.
851
+ bytes hashed_account_id = 2 ;
852
+ }
853
+
854
+ // A group of related accounts.
855
+ message RelatedAccountGroup {
856
+ option (google.api.resource ) = {
857
+ type : "recaptchaenterprise.googleapis.com/RelatedAccountGroup"
858
+ pattern : "projects/{project}/relatedaccountgroups/{relatedaccountgroup}"
859
+ };
860
+
861
+ // Required. The resource name for the related account group in the format
862
+ // `projects/{project}/relatedaccountgroups/{related_account_group}`.
863
+ string name = 1 [
864
+ (google.api.field_behavior ) = REQUIRED ,
865
+ (google.api.resource_reference ) = {
866
+ type : "recaptchaenterprise.googleapis.com/RelatedAccountGroup"
867
+ }
868
+ ];
869
+ }
0 commit comments