-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Admin UI seems to be protected by a new ACL. #1071
Comments
If it matters, our ACL default policy is also allow: |
We ended up going back to 0.5.2 proper and all of the problems with the webui went away. |
@darron hmm, this is interesting, the service discovery ACL's shouldn't affect this, and I couldn't reproduce this locally. Did you ever figure out what was going on? If you have a config I can reproduce with, then I'll definitely get this fixed before a new release. |
It was very odd - we had additional ACL issues that we couldn't work around - which was why we reverted and backed down. Will wait to test with the next release. |
I think I've actually seen this before now that I look at it closer. If you aren't using a token while browsing around the UI, the javascript code still tries to send the @darron can you share any of the other ACL issues? Consul 0.6 is going to have a number of ACL enhancements, so if we can catch any bugs early on that would be great! |
Hmm - not sure if that was it - I definitely didn't have a query string on my urls and I could always see the services and nodes pages. The other ACL issue was just that we were getting an Once your team gets closer to an RC we'll take another look. I'm not sure it wasn't where we built our binary from - I wasn't around for that - maybe we missed an important patch or something. |
Figured this out (pasted from this post):
There's an interesting last question on there. If passed a token that doesn't exist should we log an error and attempt using the anonymous token as a default, instead of returning an error? Or maybe if the token is not found we should return a better message and surface it in the UI that the token is invalid. |
Also now that the default experience in the web UI can 403, we might want to make that better if it happens to better explain what's going on. |
Yeah - it's a bit of a tough call. I know you scan scope cookies by directory - that way the key for: http://localhost:8500/ui/#/us-east-1-staging/ Could be different - but I think the Regardless - you're using LocalStorage Maybe you could query local storage by dc name? That way you could have multiple keys that wouldn't collide. May not be worth it though - just some thoughts. |
I believe that we're experiencing this issue currently after upgrading our Consul cluster from 0.5.2 to 0.6.0. All other features of 0.6.0 appear to be working, but our UI fails to load due to the "undefined" token Javascript is passing. Here are our relevant snippets of configuration: "datacenter": "myDC And our relevant ACL: When visiting the UI, one of the requests throws a 403 forbidden here: :8500/v1/internal/ui/nodes?dc=myDC&token=undefined I believe DC is getting properly picked up from the default.json config, but the token is not. Viewing :8500/v1/internal/ui/nodes in the browser properly returns an expected json payload, visiting ::8500/v1/internal/ui/nodes?dc=myDC returns a proper json payload, as does :8500/v1/internal/ui/nodes?dc=myDC&token=myToken. Curling these endpoints also all result in the expected json payloads. I see under Chrome Developer Tools that there is a token key in my local storage with no value. Changing this value to myToken has not helped. In the browser, I've tried passing dc and token like such with no success either: :8500/ui/?dc=myDC&token=myToken Please let me know what other information I can pass along to assist in reproducing the issue. |
Yeah - I'm having this problem again on my upgraded 0.6 cluster as well - On Wed, Dec 16, 2015 at 12:25 PM pauzed notifications@github.com wrote:
|
I manually hacked in the change above on my systems and the UI started loading again. As stated in the PR, there may be further issues beyond this, but I haven't run across anything else yet. |
Add the token to /v1/internal/ui/nodes. (issue #1071)
@oswell thanks for finding that - I merged it and I think you got them all (the service discovery ACL was added to that internal endpoint in 0.6). |
@oswell @darron @slackpad I can confirm that this worked for me. I updated my application.min.js locally on a single node (both under /var/lib/consul/ui/application.min.js and /var/lib/consul/ui/static/application.min.js), restarted consul on that node, and able to see the UI as expected. Updating my token key in my local session data from empty, to an invalid token properly gives me a 403, and setting a correct token under this key provides me with the access I expect from my acl. |
Thanks @pauzed! |
Monkey patch for upstream bug hashicorp/consul#1071
Is the only workaround for this to manual edit the application.min.js file? When will a UI release be published to contain this fix? |
Hi @Split3 we are working on a release that should go out this week and contain the fix. You can get the latest Consul master and run the build process to generate the UI files without any manual edits. |
Since this issue is still open I'm assuming this didn't make it out into the |
@Split3 this made it into the released web_ui files for 0.6.1+ (https://releases.hashicorp.com/consul/0.6.3/consul_0.6.3_web_ui.zip). If you use Unfortunately, right after the 0.6.3 release we discovered that the internal |
I just upgraded one of our clusters to |
@Split3 can you share the patch you are applying? |
The patch I used was the one mentioned in this thread above. |
Let me verify that our configuration infrastructure is pulling down the correct artifacts. As I just verified in the zip that indeed the patch is in there, so it must be something with our configuration system. |
Ok, I verified it is a bug in our configuration system. Fix looks good, thanks! |
@Split3 awesome - thanks for the update! |
Compiled from master - we're testing a new sink for go-metrics:
I'm getting this error trying to view the web ui:
2015/06/30 20:28:47 [ERR] http: Request /v1/internal/ui/nodes?dc=us-east-1-staging&token=<hidden>, error: ACL not found
Based on what I read here: #1024 - I've updated some of the ACLs:
Any idea what I'm missing?
The text was updated successfully, but these errors were encountered: