Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use oauth2-proxy in web-version for teams #384

Open
stepanselyuk opened this issue Feb 28, 2024 · 2 comments
Open

Use oauth2-proxy in web-version for teams #384

stepanselyuk opened this issue Feb 28, 2024 · 2 comments

Comments

@stepanselyuk
Copy link

stepanselyuk commented Feb 28, 2024

Hello,

how to use oauth2-proxy in front of Kubernetic? In general it's working as usually, but I cannot make "users" work, so all users just going to use admin local default account.

I added a few specific arguments to oauth2-proxy, so it should pass headers to kubernetic, like X-Auth-Request-User, X-Auth-Request-Groups, X-Auth-Request-Email and X-Auth-Request-Preferred-Username

https://oauth2-proxy.github.io/oauth2-proxy/configuration/overview/

- '--pass-user-headers=true'
- '--set-authorization-header=true'
- '--set-xauthrequest=true'
- '--pass-access-token=true'

but I'm unsure if the headers passed to Kubernetic, and if Kubernetic should react on those.

@stepanselyuk
Copy link
Author

In the Kubernetic ingress I used these annotations:

annotations:
  nginx.ingress.kubernetes.io/auth-signin: 'https://$host/oauth2/start?rd=$escaped_request_uri'
  nginx.ingress.kubernetes.io/auth-url: 'https://$host/oauth2/auth'
  nginx.ingress.kubernetes.io/auth-response-headers: "x-auth-request-user, x-auth-request-groups, x-auth-request-email"

@stepanselyuk
Copy link
Author

stepanselyuk commented Feb 28, 2024

I confirmed with tcpdump and wireshark that Kubernetic receives these headers (populated):

x-auth-request-user: 11146279033.....\r\n
x-auth-request-email: stepan@[REDACTED]\r\n
x-auth-request-access-token: [REDACTED]\r\n

The user with the specified email I also added in Kubernetic. And also added the user mentioned in the x-auth-request-user header. Nothing works.

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

No branches or pull requests

1 participant