Skip to content
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

[FEAT] Use the Notifications System in Backstage to notify when there is an issue with OPA #219

Open
Parsifal-M opened this issue Aug 2, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request feature-request New cool features Stale

Comments

@Parsifal-M
Copy link
Owner

Is your feature request related to a problem? Please describe.
Something that came to mind when looking into #218 is that if you fall back to say a deny/allow/fail you probably want to be notified that there could be an issue with OPA.

You could set a config value under here once we add policyFallback we could add another value maybe notifyGroup or/and notifyUser and have them receive notifications that there is an issue.

Describe the solution you'd like
Using the notifications framework and based on advice by @drodil we could do something like:

  1. You can do it pretty easily to OPA plugin directly, you just need probably a config value that contains notification receivers in case of error and add notificationService as optional dependency to the plugin. For this you also probably need a scheduled task to check the status periodically.

  2. If it makes sense to use the existing devtools plugin, that would require first a scheduled task to check for the endpoints (+ i would add support for caching as it's possible to generate quite a lot of requests to external systems with this) and secondly support for notifications

Describe alternatives you've considered
I think we can always go for Option 1 initially then also look at adding option 2 later on if we can.

Additional context
N/A

@Parsifal-M Parsifal-M added enhancement New feature or request feature-request New cool features labels Aug 2, 2024
@Parsifal-M Parsifal-M self-assigned this Aug 2, 2024
@drodil
Copy link

drodil commented Aug 2, 2024

Just throwing my two cents here; instead single user or group, you might want to add the config as an array. And also it's not only users or groups that notifications support - it can be any entity which the notifications backend will resolve to actual users receiving the notification (users as users, groups by their memberOf relation and other entities by their owner).

But anyways it's good idea to have it here. Possibly for people using the devtools, there could be a config value to disable notifications from OPA plugin, WDYT?

Also pinging @awanlin here.

@github-actions github-actions bot added the Stale label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature-request New cool features Stale
Projects
None yet
Development

No branches or pull requests

2 participants