-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Summary
Sentry's SAML login lacks authorization, which makes it impossible to use with centralized sign-on solutions without compromising on security: Any user known to the directory could use Sentry, even though they should not have access to its data.
Motivation
Quick pitch: Our janitor Mike is awesome, and he's known to our SAML backend for timekeeping, but he's not really into finding bugs with Sentry (or any bugs whatsoever). His credentials really should not work with Sentry, but they do and there is no way to fix it!
Sentry allows adding SAML auth providers, but unfortunately offers only the bare minimum of functionality to sign the user in. If it did just a /little/ bit more with the data it already has, then it would become significantly more useful and secure.
The problem is that Sentry grants any user known to the SAML provider access to the organization. However, this is against the spirit of SAML: SAML merely provides authentication ("this is person X!"), not authorization ("person X can access Sentry"). Authorization is left to the application, and SAML does its best to provide enough context for the application to make an authorization decision ("person X has roles foo, bar, and baz, maybe you're configured to handle those").
I propose to add SAML role support to Sentry. This would essentially consist of just:
- One role string field in the SAML provider config
- One check to see whether the logged-in user in fact has the selected role.
- An error message explaining to the user that (2) failed and his account is not authorized for Sentry.
If such a role selection was added, then the pitched issue would be solved: We could have the SAML backend pass a role for engineers, and thus limit Sentry sign-in to authorized engineering users.
Additional Context
Here is a screenshot of the current SAML config UI that I am referring to:
Keycloak enables configuring arbitrary per-client rules, and assigning them using pretty much arbitrary conditions (e.g. LDAP group membership):
The config UI in the first screenshot would need an option to insert info about the "sentry-login" example role here. All the data is already passed to Sentry upon login, so it would just have to check it against the configured role if the admin set one.
Disclaimer: I am evaluating Sentry for deployment at my engineering team with various mobile apps. We love it so far and will probably go with the SaaS solution (plus on-prem for testing), but proper SAML authz support is really a must because pure authn is just not useful enough. This will probably not block a purchase decision, but certainly is the only "meeeh" point I found with Sentry so far.
┆Issue is synchronized with this Jira Improvement by Unito
Metadata
Metadata
Assignees
Labels
Projects
Status

