Skip to content

Conversation

ricoberger
Copy link
Member

This commit adds a new authentication middleware for the kobs API. This
middleware is used to get user information (e.g. the email address of an
user) from a HTTP header. The header can be set via the
"--api.auth-header" flag. If this header is present kobs will log all
requests including a user field.

We also added an example how this header can be passed to kobs, when
kobs is protected using the OAuth2 Proxy.

In the future we will use this feature to extend some plugins like the
Opsgenie plugin, where we can use this user for additional actions like
acknowledge or snooze alerts.

This commit adds a new authentication middleware for the kobs API. This
middleware is used to get user information (e.g. the email address of an
user) from a HTTP header. The header can be set via the
"--api.auth-header" flag. If this header is present kobs will log all
requests including a user field.

We also added an example how this header can be passed to kobs, when
kobs is protected using the OAuth2 Proxy.

In the future we will use this feature to extend some plugins like the
Opsgenie plugin, where we can use this user for additional actions like
acknowledge or snooze alerts.
@ricoberger ricoberger merged commit 61c7084 into main Aug 5, 2021
@ricoberger ricoberger deleted the add-option-to-get-user-from-request branch August 5, 2021 21:27
ricoberger added a commit that referenced this pull request Aug 6, 2021
With the new authentication logic, which was introduced in #103 it is
now possible to acknowledge, snooze and close Opsgenie alerts via kobs.
These action must be enabled via the configuration file for kobs. When
they are enabled they will be added as additional actions in the React
UI. If kobs is used with a setup like it was introduced in #103 we will
use the correct user for these action. If no user is set we use the
default user named "kobs.io".
@ricoberger ricoberger mentioned this pull request Aug 6, 2021
3 tasks
ricoberger added a commit that referenced this pull request Aug 6, 2021
With the new authentication logic, which was introduced in #103 it is
now possible to acknowledge, snooze and close Opsgenie alerts via kobs.
These action must be enabled via the configuration file for kobs. When
they are enabled they will be added as additional actions in the React
UI. If kobs is used with a setup like it was introduced in #103 we will
use the correct user for these action. If no user is set we use the
default user named "kobs.io".
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