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

Header authorization method return 401 #9865

Open
Andrew1988123123 opened this issue Jan 18, 2025 · 0 comments
Open

Header authorization method return 401 #9865

Andrew1988123123 opened this issue Jan 18, 2025 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Andrew1988123123
Copy link

What happened?

Using header authorization method I get 401. The token is correct because in the last step I enter the token manually and it allows me to log in.

What did you expect to happen?

I will not get 401 error code and I will log in using header authorization method https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/README.md#authorization-header)](https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/README.md#authorization-header

How can we reproduce it (as minimally and precisely as possible)?

Install the following components and generate a token for any role.

helm install kubernetes-dashboard k8s-dashboard/kubernetes-dashboard --version 7.10.1
helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx --version 4.11.4 --set controller.allowSnippetAnnotations=true
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: dashboard
  namespace: default
  annotations:
    nginx.ingress.kubernetes.io/backend-protocol: HTTPS
    nginx.ingress.kubernetes.io/configuration-snippet: |
      more_set_headers "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6Il...";
spec:
  ingressClassName: nginx
  rules:
    - host: localhost
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: kubernetes-dashboard-kong-proxy
                port:
                  number: 443
20250118-1224-00.9984211.mp4

Anything else we need to know?

No response

What browsers are you seeing the problem on?

No response

Kubernetes Dashboard version

7.10.1

Kubernetes version

k3d v1.31.0+k3s1

Dev environment

No response

@Andrew1988123123 Andrew1988123123 added the kind/bug Categorizes issue or PR as related to a bug. label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

1 participant