-
Notifications
You must be signed in to change notification settings - Fork 1
Revoke Grant Events #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Revoke Grant Events #131
Conversation
WalkthroughA new event filter named Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
pkg/connector/event_filters.go (1)
88-133: LGTM! Revoke filter correctly mirrors the grant filter.The
CreateRevokeFilterimplementation is correct and appropriately handles group membership removal events. The logic properly validates targets, constructs resources and principals, attaches user trait annotations, and emits the revoke event.The code is nearly identical to
CreateGrantFilter(lines 42-87). If additional grant/revoke filters are added in the future, consider extracting the shared logic into a helper function to reduce duplication. For now, the duplication is acceptable and keeps the filters self-contained and clear.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
pkg/connector/event_filters.go(1 hunks)pkg/connector/event_log.go(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
pkg/connector/event_log.go (1)
pkg/connector/event_filters.go (1)
CreateRevokeFilter(88-133)
pkg/connector/event_filters.go (1)
pkg/connector/event_filter.go (1)
EventFilter(16-26)
🔇 Additional comments (1)
pkg/connector/event_log.go (1)
51-51: LGTM! Filter correctly registered.The
CreateRevokeFilteris properly added to the active filters list and will participate in event processing as expected.
| return fmt.Errorf("okta-connectorv2: error creating resource: %w", err) | ||
| } | ||
|
|
||
| userTrait, err := sdkResource.NewUserTrait(sdkResource.WithEmail(user.AlternateId, true)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AlternateId is the email?
Creates the new revoke grant event types in the event feed.
Summary by CodeRabbit