Skip to content

feat: add AdditionalGrantsRevoked annotation for revoke responses#922

Open
mstanbCO wants to merge 1 commit into
mainfrom
mstanbCO/additional-grants-revoked-annotation
Open

feat: add AdditionalGrantsRevoked annotation for revoke responses#922
mstanbCO wants to merge 1 commit into
mainfrom
mstanbCO/additional-grants-revoked-annotation

Conversation

@mstanbCO

@mstanbCO mstanbCO commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new AdditionalGrantsRevoked annotation (proto/c1/connector/v2/annotation_additional_grants_revoked.proto) that a connector can attach to a GrantManagerServiceRevokeResponse.
  • It carries a repeated list of revoked_grant_ids — additional grants the connector had to revoke in order to service a single Revoke request (e.g. flipping a "has access" flag before removing a principal's last role).
  • ConductorOne can use this to mark those grants revoked without dispatching redundant Revoke RPCs.
  • Includes generated pb code and Go helpers grant.NewAdditionalGrantsRevoked(...) / grant.AppendAdditionalGrantsRevoked(...), mirroring the existing GrantReplaced pattern.

Usage

annos := annotations.Annotations{}
annos.Append(grant.NewAdditionalGrantsRevoked(hasAccessGrant.GetId()))
return annos, nil

Test plan

  • buf generate produces the pb files
  • go build ./...
  • go test ./pkg/types/grant/ passes (new helper tests included)

Made with Cursor

Adds an annotation a connector can attach to a Revoke response when
servicing a single Revoke required revoking one or more additional grants
on the same principal (e.g. flipping a "has access" flag before removing a
principal's last role). ConductorOne can then mark those grants revoked
without dispatching redundant Revoke RPCs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mstanbCO
mstanbCO requested a review from a team June 4, 2026 17:22
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

General PR Review: feat: add AdditionalGrantsRevoked annotation for revoke responses

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Review mode: full
View review run

Review Summary

This PR adds a new AdditionalGrantsRevoked protobuf annotation and corresponding Go helper functions (NewAdditionalGrantsRevoked, AppendAdditionalGrantsRevoked) for connectors to signal that extra grants were revoked as a side effect of a single Revoke RPC. The implementation cleanly mirrors the existing GrantReplaced pattern in structure, naming, and test coverage. No issues found.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

@mstanbCO
mstanbCO requested a review from ggreer June 4, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant