Skip to content
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

Unable to log in to SCOT - bad CSRF token #63

Open
loucdg opened this issue Mar 26, 2021 · 1 comment
Open

Unable to log in to SCOT - bad CSRF token #63

loucdg opened this issue Mar 26, 2021 · 1 comment

Comments

@loucdg
Copy link

loucdg commented Mar 26, 2021

I resolved a number of issues to get the containers up and SCOT listening, but I am now stumped with getting authenticated. I get the error "Failed to log in due to bad CSRF token. Please reload the page and then log in. Error: Failed CSRF check.

The logs show:
POST "/auth"
Template "bad_csrf.html.ep" not found
403 Forbidden (0.001077s, 928.505/s)

I've used admin/admin (building the demo site). That didn't work. I changed the password and set the hash in Mongo, that didn't work either.

Here's the SCOT startup log:

Routing to a callback
304 Not Modified (0.007052s, 141.804/s)
POST "/scotaq/amq"
Template "not_found.development.html.ep" not found
Template "not_found.html.ep" not found
Rendering template "mojo/debug.html.ep"
GET "/scot/api/v2/whoami"
GET "/scot/api/v2/status"
GET "/scot/api/v2/handler"
Template "mojo/menubar.html.ep" not found
Routing to controller "Scot::Controller::Auth" and action "check"
401 Unauthorized (0.040213s, 24.868/s)
404 Not Found (0.061014s, 16.390/s)

Thinking this is a problem with the mojo CSRF plugin, and/or missing code in the headers but I'm not sure where to modify those.

Help would be appreciated!

@toddbruner
Copy link
Contributor

toddbruner commented Mar 28, 2021

Sorry for the difficulties. Couple things could be going on.

First, the CSRF problem, I think this is a symptom of a problem in the install and will clear up once we get SCOT installed correctly. 9 times out of 10, its a problem in the config files. Would it be possible to share your scot.cfg.pl and you apache scot.conf with me? If you would prefer not do that on this forum, contact me on e-mail and we discuss alternate ways for me to see them. (scot-dev@sandia.gov).

So I gather you are using the Docker version. Things to check: are all the containers running and is the networking between them working. The log snippet above makes me think that ActiveMQ is not running or not able to be reached from the scot container.

It's sometimes frustrating getting SCOT up and running, but once you are over that hurdle, it will run with little maintenance from then on.

Thank you for reaching out for help. We will use this experience to improve the docs and the install in the future.

(Docker docs, in case you missed them: https://scot.readthedocs.io/en/latest/scotdocker.html)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants