Skip to content

[opsgenie] Adjust permission schema and add support for incident actions #248

@ricoberger

Description

@ricoberger

Is your feature request related to a problem? Please describe

The actions like closing or snoozing an alert can be enabled / disabled via the Opsgenie configuration, but they can not be controlled on a per user / team level.

In #219 we implemented a permission schema for plugins, which is already used for the Azure plugin. We should adopt this schema for the Opsgenie plugin, so that the actions can be enabled for each user / team seperatly.

Besides the adjustment of the permissions schema, we should also add actions for incidents similar to the ones for alerts. With these new actions users should be able to resolve and close alerts.

Describe the solution you'd like

The permission scheme for the Opsgenie plugin can look as follows:

---
apiVersion: kobs.io/v1beta1
kind: Team
metadata:
  name: team1
spec:
  id: team1@kobs.io
  permissions:
    plugins:
      - name: opsgenie
        permissions:
          - closeAlert
          - snoozeAlert
          - acknowledgeAlert
          - resolveIncident
          - closeIncident

In the above example all users which are part of team1 can close, snooze and acknowledge alerts and they can resolve and close incidents.

The permissions property of a plugin contains a list of actions, which are allowed for a user / team. This way we can simply merge the actions list, when the plugin permissions are defined for multiple teams or on the user and team level.

Additional context

With the new permission handling in the Opsgenie plugin, we can unify the permission handling in plugins, which makes the permission handling easier for users.

One thing we have to consider is, that when we are using this permission model, we would remove the options to control the allowed actions, for users which are using kobs with out the auth middleware.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions