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
{{ message }}
Repository navigation
console 403: no RBAC policy matched for system:anonymous #411
What is the JSON output? Things have been exciting since #330 landed, there are many things that could be going wrong ;).
Also, we have a nice issue template... ;). Even if you push your issues with hub or whatever instead of going through GitHub's web UI, those are the sort of things we're looking for in bug reports.
changed the title [-]Cannot connect to console with libvirt instructions[/-][+]libvirt console 403: no RBAC policy matched for system:anonymous[/+]on Oct 3, 2018
This is the old console that is being removed. The new console is behind a route. You're seeing this because the master console proxy is removed (since it's no longer needed).
I believe @deads2k was going to add a redirect to the new console from the old URL, but I'm not sure if that's in place.
For new 4.0 installs, it is https://console-openshift-console.<default-routing-suffix>
@spadgett I'm not entirely sure what you mean by default-routing-suffix. There does not seem to be anything at the following location:
# curl https://console.openshift-console.${OPENSHIFT_INSTALL_BASE_DOMAIN}
curl: (6) Could not resolve host: console.openshift-console.tt.testing
edit: this is calling it from the KVM host, not KVM guest
# oc get route -n openshift-console
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
console console-openshift-console.router.default.svc.cluster.local console https reencrypt/Redirect None
Curling this just gives me Could not resolve hots:. I wonder which service is used to add this to the KVM host machine DNS? I am using the dnsmasq with NetworkManager solution from the guide. For the record, the following works just fine with it:
# host $OPENSHIFT_INSTALL_CLUSTER_NAME-bootstrap.$OPENSHIFT_INSTALL_BASE_DOMAIN
test1-bootstrap.tt.testing has address 192.168.126.10
changed the title [-]libvirt console 403: no RBAC policy matched for system:anonymous[/-][+]console 403: no RBAC policy matched for system:anonymous[/+]on Nov 20, 2018
There is now a 'special user' who goes by the name kubeadmin configured. (12/5/18 this was enabled)
To access the web-console (aws):
install with latest installer
after install completes export kubeconfig, wait a few minutes (or keep obsessively trying to oc login -u kubeadmin -p 5char-5char-5char-5char until it works
the password is logged at end of install, also it is written to ${INSTALL_DIR}/auth/kubeadmin-password
grab the route from -n openshift-console, you might get an error at first when you try to access it, https://console-openshift-console.apps.clustername.devcluster.openshift.com, if you do oc delete pod/openshift-console-blahblah -n openshift-console then wait a minute and try again
enter username kubeadmin and password 5char-5char-5char-5char to login to console
(you can now also view prometheus/grafana console)
@spadgett confirmed don't need the delete pod hack today (although even after logging in to the console, going to prometheus and using Login with OpenShift gives me a login screen).
Since this is working out of the box now for AWS and the incorrect instructions were removed from the README, closing the issue.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
@s-urbaniak Since most of the folks are using you suggested way #411 (comment) to get the console and recently svc name is changed from router-default to router-internal-default , can you update that this comment with?
Just a quick note, and I haven't had time to dig into the background of the use case, but it's unsafe to rely on resource names like router-internal-default. We make no guarantees about that service name, or even the existence of the service — it should be considered an implementation detail. Of course when it comes to libvirt right now a working hack is probably going to proliferate anyway, but I noticed this and wanted to drop a disclaimer 😁
Activity
wking commentedon Oct 3, 2018
What is the JSON output? Things have been exciting since #330 landed, there are many things that could be going wrong ;).
Also, we have a nice issue template... ;). Even if you push your issues with
hubor whatever instead of going through GitHub's web UI, those are the sort of things we're looking for in bug reports.michaelgugino commentedon Oct 3, 2018
{ "kind": "Status", "apiVersion": "v1", "metadata": { }, "status": "Failure", "message": "forbidden: User \"system:anonymous\" cannot get path \"/console\": no RBAC policy matched", "reason": "Forbidden", "details": { }, "code": 403 }Yeah, it wasn't working last week either, not sure if the output was the same, but never got a console.
wking commentedon Oct 3, 2018
We think this is openshift/origin#20983.
[-]Cannot connect to console with libvirt instructions[/-][+]libvirt console 403: no RBAC policy matched for system:anonymous[/+]mtnbikenc commentedon Oct 9, 2018
Ran into the same problem.
Platform: libvirt
Accessing: https://test1-api.tt.testing:6443/console
Response:
{ "kind": "Status", "apiVersion": "v1", "metadata": { }, "status": "Failure", "message": "forbidden: User \"system:anonymous\" cannot get path \"/console\": no RBAC policy matched", "reason": "Forbidden", "details": { }, "code": 403 }Was the web-console replaced by something?
imranrazakhan commentedon Oct 18, 2018
I was getting same json issue and just run below command
Now i am able to access it
praveenkumar commentedon Oct 18, 2018
Same error I am getting today.
== web console output
{ "kind": "Status", "apiVersion": "v1", "metadata": { }, "status": "Failure", "message": "forbidden: User \"system:anonymous\" cannot get path \"/console/\": no RBAC policy matched", "reason": "Forbidden", "details": { }, "code": 403 }@imranrazakhan where did you run that oc command to login?
imranrazakhan commentedon Oct 18, 2018
@praveenkumar i just run this command on shell of VM where i installed 3.11
[root@c1-ocp ~]# oc login -u system:admin
spadgett commentedon Oct 22, 2018
This is the old console that is being removed. The new console is behind a route. You're seeing this because the master console proxy is removed (since it's no longer needed).
I believe @deads2k was going to add a redirect to the new console from the old URL, but I'm not sure if that's in place.
spadgett commentedon Oct 22, 2018
It's a different cause.
wking commentedon Oct 22, 2018
Do you know the new URL? A redirect would be nice, but we may be able to help a bunch of people by updating our docs.
spadgett commentedon Oct 22, 2018
For new 4.0 installs, it is
https://console-openshift-console.<default-routing-suffix>cc @benjaminapetersen
stlaz commentedon Oct 25, 2018
@spadgett I'm not entirely sure what you mean by
default-routing-suffix. There does not seem to be anything at the following location:edit: this is calling it from the KVM host, not KVM guest
spadgett commentedon Oct 25, 2018
@stlaz Look at the route in the openshift-console namespace. You can see the hostname there. By default, console uses a generated hostname.
stlaz commentedon Oct 25, 2018
Thanks. Here's what I did:
Curling this just gives me
Could not resolve hots:. I wonder which service is used to add this to the KVM host machine DNS? I am using the dnsmasq with NetworkManager solution from the guide. For the record, the following works just fine with it:4 remaining items
benjaminapetersen commentedon Nov 20, 2018
See this comment: https://gist.github.com/ironcladlou/784e4bd5cdd7e270ae0bea444809cbfd#gistcomment-2764321
ATM, libvert seems to be the trickiest option. There are workarounds for AWS & GCE around.
[-]libvirt console 403: no RBAC policy matched for system:anonymous[/-][+]console 403: no RBAC policy matched for system:anonymous[/+]sallyom commentedon Dec 5, 2018
There is now a 'special user' who goes by the name
kubeadminconfigured. (12/5/18 this was enabled)To access the web-console (aws):
oc login -u kubeadmin -p 5char-5char-5char-5charuntil it works${INSTALL_DIR}/auth/kubeadmin-passwordhttps://console-openshift-console.apps.clustername.devcluster.openshift.com, if you dooc delete pod/openshift-console-blahblah -n openshift-consolethen wait a minute and try againkubeadminand password5char-5char-5char-5charto login to console(you can now also view prometheus/grafana console)
spadgett commentedon Dec 6, 2018
This problem is fixed, so you shouldn't need to delete the pod anymore. Console should just work now on AWS. (We just need to log the URL, #782)
praveenkumar commentedon Dec 6, 2018
@sallyom So #411 (comment) will only for AWS side, from libvirt there is still no way to get the console?
RobertKrawitz commentedon Dec 6, 2018
@spadgett confirmed don't need the delete pod hack today (although even after logging in to the console, going to prometheus and using Login with OpenShift gives me a login screen).
s-urbaniak commentedon Dec 7, 2018
To access the console from libvirt, execute the following steps:
Allow
kubectlto bind to privileged ports:Note: If you omit the above, you have to start kubectl using
sudo. Next, port-forward therouter-defaultservice:Get the routes and add bind them to
127.0.0.1in/etc/hosts:Use the credentials as described in #411 (comment)
Open i.e. https://grafana-openshift-monitoring.apps.test1.tt.testing or https://console-openshift-console.apps.test1.tt.testing.
praveenkumar commentedon Dec 7, 2018
I just tried @s-urbaniak suggestion and it works as said. Thanks for this quick workaround 👍
spadgett commentedon Jan 8, 2019
Since this is working out of the box now for AWS and the incorrect instructions were removed from the README, closing the issue.
/close
openshift-ci-robot commentedon Jan 8, 2019
@spadgett: Closing this issue.
Details
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
praveenkumar commentedon Feb 23, 2019
@s-urbaniak Since most of the folks are using you suggested way #411 (comment) to get the console and recently
svcname is changed fromrouter-defaulttorouter-internal-default, can you update that this comment with?ironcladlou commentedon Feb 23, 2019
Just a quick note, and I haven't had time to dig into the background of the use case, but it's unsafe to rely on resource names like
router-internal-default. We make no guarantees about that service name, or even the existence of the service — it should be considered an implementation detail. Of course when it comes to libvirt right now a working hack is probably going to proliferate anyway, but I noticed this and wanted to drop a disclaimer 😁nileshalhat commentedon Jun 11, 2019
DONE..! Thank You,,!