-
Notifications
You must be signed in to change notification settings - Fork 11
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
Don't add username and password in deployed HTML #46
Comments
I have a couple of ideas about this. Have a look at https://github.com/zerovm/zwift-ui/blob/master/js/Swift.js. You can grab various bits of information from global vars. Have a look at |
When you We don't use the That way is currently by hard-coding them. An alternative would be to render a HTML form where the user can supply the username and password. When we have the credentials, the rest is already handled: the tiny client in |
Hard-coding is not ideal. If someone makes their index.html publicly readable, anyone can see their complete credentials in plain text! Is there no way we can get what we need from cookies or session information? |
@mgeisler so, we probably can just disable all the auth in html/js |
We can and we do exactly that. You need to use |
@pkit We support v1 and v2 auth. I originally tested this on my devstack installation where the JS would auth with keystone first. Now I've mostly tested it with Zebra (i.e., without any JS authentication). |
@mgeisler Dunno, v1 and v2 are keystone terms. In Swift terms there is no such thing, and authorization strings can be different even in various v1 (keystone vs. tempauth, as an example). |
It omits the username/password, yes, but I don't think that completely solves the problem. If I want to then run my app from the index.html, where does it get my credentials? Now that I'm really looking at (I don't use the UI often), if I try to run even a simple "hello world" zapp (like in the Zebra tutorial) from the web UI, I get errors like this in my console:
This happens with |
Okay, so it does work without the credentials rendered to the index.html. The question is, how? I don't understand what's going on there. |
He-he, it's simple: cookies. Cookies are sent along with your request, no matter what you request. |
How can I see what those cookies look like? I'm looking in my console (Chrome) and I see Resources -> Cookies. I can also see |
Ah, wait. There's the authtoken in session. I guess that's it. |
Yep, that's it. |
Okay, so in that case, I think we should remove the |
It would be hard to test without devstack-ing liteauth into equation, but it could be a great thing. :) |
Lars Butler [email protected] writes:
I think making it the default would be a good idea. |
For ease of testing,
zpm deploy
inserts the Swift username and password into the generatedindex.html
file. This is so that the JS code we run can authenticate before executing the job.We need to figure out a better way of handling this.
The text was updated successfully, but these errors were encountered: