You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When responding to the Oauth callback (that is, when a user first authenticates and initiates a session), the proxy requires any of its validators be satisfied before proceeding:
I might be reading things wrong, but I have produced this with a live instance, and it seems like strange behavior to me.
The consequence of this is a user who satisfies email domain validation but fails group validation will be able to authenticate and briefly see the service, until the refresh period expires (or validation period, for that matter), where they'll be logged out.
To Reproduce
upstream_configs.yml
Create a group named [email protected] with 0 people (or as close to it as the provider allows). Register a backend that uses this group in the allowed_groups field:
- service: my-servicedefault:
from: my-service.int.corp.comto: http://my-service.corp-internal.comoptions:
allowed_groups:
# an empty google group
- [email protected]
run the service, ensuring that DEFAULT_ALLOWED_EMAIL_DOMAINS=corp.com. Then, as a user not in [email protected], attempt to access my-service.int.corp.com. You will succeed, but be logged out as soon as the session refreshes.
Expected behavior
The user should not be logged out when the session is refreshed.
The text was updated successfully, but these errors were encountered:
Describe the bug
This proxy supports a variety of mechanisms to authorize access to a host:
sso/internal/proxy/proxy.go
Lines 48 to 59 in 290f27e
When responding to the Oauth callback (that is, when a user first authenticates and initiates a session), the proxy requires any of its validators be satisfied before proceeding:
sso/internal/proxy/oauthproxy.go
Lines 481 to 482 in 290f27e
However, when the proxy is refreshing a session sometime later, it requires that a user satisfy "groups" validation, exclusively:
sso/internal/proxy/oauthproxy.go
Lines 660 to 663 in 290f27e
sso/internal/proxy/providers/sso.go
Lines 274 to 289 in 290f27e
sso/internal/proxy/providers/sso.go
Lines 188 to 201 in 290f27e
I might be reading things wrong, but I have produced this with a live instance, and it seems like strange behavior to me.
The consequence of this is a user who satisfies email domain validation but fails group validation will be able to authenticate and briefly see the service, until the refresh period expires (or validation period, for that matter), where they'll be logged out.
To Reproduce
upstream_configs.yml
Create a group named
[email protected]
with 0 people (or as close to it as the provider allows). Register a backend that uses this group in theallowed_groups
field:run the service, ensuring that
DEFAULT_ALLOWED_EMAIL_DOMAINS=corp.com
. Then, as a user not in[email protected]
, attempt to accessmy-service.int.corp.com
. You will succeed, but be logged out as soon as the session refreshes.Expected behavior
The user should not be logged out when the session is refreshed.
The text was updated successfully, but these errors were encountered: