-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Getting "RBAC: access denied" when connecting with CLI to endpoint that is available in browser #10371
Comments
Does login work via port-forwarding and running |
No, this doesn't work at all when Here are the errors. Initial port-forwarding succeeds: $ kubectl port-forward svc/argocd-server -n argocd 8888:80
W0818 19:56:08.389740 103506 azure.go:92] WARNING: the azure auth plugin is deprecated in v1.22+, unavailable in v1.25+; use https://github.com/Azure/kubelogin instead.
To learn more, consult https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins
Forwarding from 127.0.0.1:8888 -> 8080
Forwarding from [::1]:8888 -> 8080
Handling connection for 8888
Handling connection for 8888 Thereafter, whether attempting to connect via the browser or via the CLI, the following output is printed in the console logs and the port-forwarding is broken: E0818 19:56:12.735346 103506 portforward.go:406] an error occurred forwarding 8888 -> 8080: error forwarding port 8080 to pod 922c222aa17d861ed872caf98729cf0a18303b5a08ca6e49b3dd161abcdfcd55, uid : failed to execute portforward in network namespace "/var/run/netns/cni-d0ff4986-3c2b-3485-77f5-5c7e9cea95a4": read tcp4 127.0.0.1:38170->127.0.0.1:8080: read: connection reset by peer
E0818 19:56:12.735531 103506 portforward.go:234] lost connection to pod
Handling connection for 8888
E0818 19:56:12.735711 103506 portforward.go:346] error creating error stream for port 8888 -> 8080: EOF The CLI itself just prints "connection refused": $ argocd login localhost:8888
FATA[0002] dial tcp 127.0.0.1:8888: connect: connection refused EDIT: this particular issue looks like it is related to #8613 |
This gives the exact same error: This does work: ...which is good to know in the situation where I can piggy-back off the kubernetes API, but what I want to is have |
With only
virtual-service.yaml
|
Checklist:
argocd version
.Describe the bug
I am serving the ArgoCD Server on argocd.mydomain.com using the following Istio setup:
and:
I can log into the server via my browser at
argocd.mydomain.com
. However, if I tried to log in via the CLI, I am hit with anRBAC: access denied
, which means that Istio is blocking traffic that hasn't been allowed for via the setup above. The only thing that I can think of is that the CLI might be attempting to use a different port.$ argocd login argocd.mydomain.com --username admin --password pwdfoo123 --insecure #using --insecure because the TLS certs are non-valid staging certs) FATA[0000] rpc error: code = PermissionDenied desc = RBAC: access denied
I also attempted to use the suggestions in #2784 (comment):
Expected behavior
Since the server is correctly serving to argocd.mydomain.com and can be connect to there via the browser, I would expect the CLI to be able to connect on that endpoint.
Version
The text was updated successfully, but these errors were encountered: