Default URL login with SENTRY_SINGLE_ORGANIZATION


#1

Hi,
we’ve been working on a On Premise setup since a while and started on a multiple organization environment (SENTRY_SINGLE_ORGANIZATION=False) but now we decided to lock creation of new Organizations (SENTRY_SINGLE_ORGANIZATION=True).

After locking up environment, when accessing main URL “sentry.corp.org”, login page always redirect (HTTP 302) to a landing URL of a specific Organization, i.e. “foo”, so complete URL is “sentry.corp.org/auth/login/foo” but we want to avoid redirect or redirect to another default URL, i.e. “bar”, so complete URL will be “sentry.corp.org/auth/login/bar” or just “sentry.corp.org/auth/login”.

Is there a Sentry configuration that does it or it can’t be configured at all?

Thanks.


#2

There is no way to configure this. It forwards you to the default organization’s specific login page, which is how SSO functions within Sentry.


#3

Thanks zeeg.

Do you mean ‘default organization’ defined in AUTH_LDAP_DEFAULT_SENTRY_ORGANIZATION?

We are using LDAP integration but we didn’t defined a default one (AUTH_LDAP_DEFAULT_SENTRY_ORGANIZATION = u’NOCOMPANY’).

Thanks.


#4

Well, I defined a Default Organization but no practical effect.

I defined ‘bar’ as a Default Organization but it keeps me redirecting to ‘foo’ login page.


#5

I dont know what the LDAP settings you’re referring to are (they’re not part of Sentry’s codebase). Sentry picks the default organization and as far as I remember we dont allow you to control it. It generally picks the “first” organization in the database.


#6

So, Default Organization is defined somewhere or based on some logic and/or attribute, right?

You said “first organization in the database”, so I think it could be obtained by a SQL query… Could you please show it or point to where it should be found?

Thanks!