From 81c3271ed43e3ec0bfe1fa49e3ba05f3e5fb4965 Mon Sep 17 00:00:00 2001 From: aman Date: Fri, 13 Mar 2026 12:29:57 +0530 Subject: [PATCH 1/2] feat: add proto for listing and retrieving current user PATs --- raystack/frontier/v1beta1/frontier.proto | 24 ++++++++++++++++++++++++ raystack/frontier/v1beta1/models.proto | 3 +++ 2 files changed, 27 insertions(+) diff --git a/raystack/frontier/v1beta1/frontier.proto b/raystack/frontier/v1beta1/frontier.proto index 5f12ca1e..b78483c4 100644 --- a/raystack/frontier/v1beta1/frontier.proto +++ b/raystack/frontier/v1beta1/frontier.proto @@ -540,6 +540,8 @@ service FrontierService { // Personal Access Token rpc CreateCurrentUserPAT(CreateCurrentUserPATRequest) returns (CreateCurrentUserPATResponse) {} + rpc ListCurrentUserPATs(ListCurrentUserPATsRequest) returns (ListCurrentUserPATsResponse) {} + rpc GetCurrentUserPAT(GetCurrentUserPATRequest) returns (GetCurrentUserPATResponse) {} } // Billing @@ -2860,3 +2862,25 @@ message CreateCurrentUserPATRequest { message CreateCurrentUserPATResponse { PAT pat = 1; } + +message ListCurrentUserPATsRequest { + string org_id = 1 [ + (validate.rules).string.uuid = true, + (google.api.field_behavior) = REQUIRED + ]; +} + +message ListCurrentUserPATsResponse { + repeated PAT pats = 1; +} + +message GetCurrentUserPATRequest { + string id = 1 [ + (validate.rules).string.uuid = true, + (google.api.field_behavior) = REQUIRED + ]; +} + +message GetCurrentUserPATResponse { + PAT pat = 1; +} diff --git a/raystack/frontier/v1beta1/models.proto b/raystack/frontier/v1beta1/models.proto index 78f35bb6..d2954965 100644 --- a/raystack/frontier/v1beta1/models.proto +++ b/raystack/frontier/v1beta1/models.proto @@ -280,6 +280,9 @@ message PAT { // this value is never persisted in the system so if lost, can't be recovered string token = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated string role_ids = 6; + repeated string project_ids = 7; + google.protobuf.Timestamp expires_at = 10; google.protobuf.Timestamp last_used_at = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; google.protobuf.Timestamp created_at = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; From 241685584afc362ce445309926b6dbe845899444 Mon Sep 17 00:00:00 2001 From: aman Date: Fri, 13 Mar 2026 15:25:36 +0530 Subject: [PATCH 2/2] feat: add pagination support for listing current user PATs --- raystack/frontier/v1beta1/frontier.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/raystack/frontier/v1beta1/frontier.proto b/raystack/frontier/v1beta1/frontier.proto index b78483c4..596914e7 100644 --- a/raystack/frontier/v1beta1/frontier.proto +++ b/raystack/frontier/v1beta1/frontier.proto @@ -2868,10 +2868,12 @@ message ListCurrentUserPATsRequest { (validate.rules).string.uuid = true, (google.api.field_behavior) = REQUIRED ]; + RQLRequest query = 2; } message ListCurrentUserPATsResponse { repeated PAT pats = 1; + RQLQueryPaginationResponse pagination = 2; } message GetCurrentUserPATRequest {