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

Keycloak-x: How to block console (/auth) access on default ingress? #788

Open
skripted-io opened this issue Aug 2, 2024 · 2 comments
Open
Labels

Comments

@skripted-io
Copy link

The Keycloak-x helm chart provides two ingress resources where the first one is default and the second is for console access only.

See https://github.com/codecentric/helm-charts/blob/master/charts/keycloakx/README.md

However, enabling the second ingress still leaves the /auth path exposed on the default ingress resource.

How can the admin console be disabled on the default ingress?

I read about people adding WAF to the default ingress, but I rather just remove the path entirely.

(Using Keycloak hind an AWS ALB)

Thanks.

@darioef
Copy link

darioef commented Aug 2, 2024

/auth needs to be exposed because almost all the application is under that endpoint but you can explicity tell the public ingress to expose only needed endpoints.

This is an example of my configuration, just add this rules to ingress.rules in your values:

ingress:
    rules:
      - host: auth.mydomain.com
        paths:
          - path: "/auth/realms/(?!master).*"
            pathType: Prefix
      - host: auth.mydomain.com
        paths:
          - path: "/auth/js/"
            pathType: Prefix
      - host: auth.mydomain.com
        paths:
          - path: "/auth/resources/"
            pathType: Prefix
      - host: auth.mydomain.com
        paths:
          - path: "/auth/robots.txt"
            pathType: Prefix

In my first rule I also exclude the "master" realm. Don't want it to be public.

Here's a list of exposed paths recommendations by Keycloak: https://www.keycloak.org/server/reverseproxy (under Exposed path recommendations).

Hope it helps.

Copy link

github-actions bot commented Oct 2, 2024

This issue has been marked as stale because it has been open for 30 days with no activity. It will be automatically closed in 10 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants