-
Notifications
You must be signed in to change notification settings - Fork 237
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
Replace basic auth with a custom authentication process #1182
Conversation
9a718c0
to
aa79aff
Compare
bdf8fee
to
66e5167
Compare
66e5167
to
11d9e71
Compare
9552d0e
to
c0fda25
Compare
sorry don't know what happened there, fixed now: |
discussed with Laurence - we could render the password page without redirecting, using res.render. This would mean the password page does not disrupt the browser history. Something to discuss with @natcarey |
updated with:
|
One other thought, we could salt the password. Currently two sites with the same password will have the same cookie value, not a massive issue but is slightly bad practice? Also, if we have a salt, that gives a way to revoke access without changing passwords, which may or may not be useful. Any thoughts on this @natcarey? |
72e0d0b
to
5aec50b
Compare
@lfdebrux I've just been scanning back through and seen the salt question. I think I brushed it aside before because there's no data store containing the password but actually we could include a salt either:
Would you see value in either of those? |
@natcarey the first thing was more what I was thinking, because it allows changing easily if necessary. If we don't think it is necessary though that is fine. |
I don't have a strong opinion on salt, @natcarey should lead on it. I think you'd need access to someone's cookies to know that both encrypted passwords are the same, so it doesn't feel like a likely scenario. Committing it to git would make it public in many cases no? |
2c7552e
to
7a97937
Compare
basic auth is not always supported
7a97937
to
68399e2
Compare
Browsers no longer always support basic auth so this PR replaces it with:
req.session.authentication
is the current encrypted passwordprototype-admin/password
pagepassword
POSTed from the page matches thePASSWORD
set in the environmentreq.session.authentication
to the current encrypted passwordto test this branch, run:
Screenshot: