seqeralabs / nf-tower

Nextflow Tower system
https://tower.nf
Mozilla Public License 2.0
146 stars 52 forks source link

Changing the secret in application.yml causes error 500 #152

Closed Z-Zen closed 5 years ago

Z-Zen commented 5 years ago

Bug report

Expected behavior and actual behavior

Replacing the following line causes an internal 500 error when I click my email login token image

And the following error is this one

image

Steps to reproduce the problem

Change to any password, build the tower and run the code. Register for an email and then click the authentication code received in your email.

Environment

Additional context

Here's the output from the moment I arrive at the login page:

frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:39:57 +0000] "POST /api/gate/access HTTP/1.1" 200 26 "http://localhost:8000/login" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
backend_1   | 15:39:57.722 [Mail spooler] DEBUG io.seqera.mail.MailSpoolerImpl - Pending mail to send: 1
backend_1   | 15:39:57.729 [Mail spooler] DEBUG io.seqera.mail.Mailer - Connecting to host=somesmtp port=someport user=null password=null
backend_1   | 15:39:57.872 [Mail spooler] DEBUG io.seqera.mail.MailSpoolerImpl - Mail sent to=ab-test@gmail.com subject=Nextflow Tower Sign in
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:49 +0000] "GET /auth?email=ab-test%40gmail.com&authToken=94f73aac182ceee2761186259052ae903cb375e9 HTTP/1.1" 200 651 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:49 +0000] "GET /runtime.465c2333d355155ec5f3.js HTTP/1.1" 304 0 "http://localhost:8000/auth?email=ab-test%40gmail.com&authToken=94f73aac182ceee2761186259052ae903cb375e9" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:49 +0000] "GET /polyfills.c53f45809f78efe47efe.js HTTP/1.1" 304 0 "http://localhost:8000/auth?email=ab-test%40gmail.com&authToken=94f73aac182ceee2761186259052ae903cb375e9" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:49 +0000] "GET /scripts.4e4b8563923eba58f713.js HTTP/1.1" 304 0 "http://localhost:8000/auth?email=ab-test%40gmail.com&authToken=94f73aac182ceee2761186259052ae903cb375e9" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:49 +0000] "GET /main.91dac0f40ac8ef5c62d1.js HTTP/1.1" 304 0 "http://localhost:8000/auth?email=ab-test%40gmail.com&authToken=94f73aac182ceee2761186259052ae903cb375e9" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
backend_1   | 15:40:49.634 [nioEventLoopGroup-1-7] DEBUG i.s.t.s.a.AuthenticationByApiToken - Not a valid access token identity=ab-test@gmail.com
backend_1   | 15:40:49.971 [nioEventLoopGroup-1-7] INFO  i.s.tower.events.ApplicationListener - Login event | user=user=ab-test@gmail.com; roles=[ROLE_USER]
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:49 +0000] "POST /api/login HTTP/1.1" 500 5 "http://localhost:8000/auth?email=ab-test@gmail.com&authToken=94f73aac182ceee2761186259052ae903cb375e9" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/img/takeoff.png HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/img/nf-tower-purple.svg HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/img/illustrations/nextflow_logo.png HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/img/illustrations/illustration-3.png HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/img/screenshots/desktop/tower.jpg HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/img/photos/clinic.jpg HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/libs/jquery/dist/jquery.min.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/libs/bootstrap/dist/js/bootstrap.bundle.min.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/libs/flickity/dist/flickity.pkgd.min.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/libs/flickity-fade/flickity-fade.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/libs/aos/dist/aos.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/libs/smooth-scroll/dist/smooth-scroll.min.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/libs/jarallax/dist/jarallax.min.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/libs/jarallax/dist/jarallax-video.min.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/libs/typed.js/lib/typed.min.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/libs/countup.js/dist/countUp.min.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/libs/jarallax/dist/jarallax-element.min.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/libs/@fancyapps/fancybox/dist/jquery.fancybox.min.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/libs/highlightjs/highlight.pack.min.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/js/theme.min.js HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/index.html" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/fonts/Feather/fonts/Feather.ttf?sdxovp HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/assets/fonts/Feather/feather.css" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/fonts/HK%20Grotesk%20Pro/HKGroteskPro-Medium.woff2 HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/assets/css/theme.min.css" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
frontend_1  | xxx.xxx.xxx.xxx - - [23/Sep/2019:15:40:50 +0000] "GET /assets/landing/assets/fonts/HK%20Grotesk%20Pro/HKGroteskPro-Regular.woff2 HTTP/1.1" 304 0 "http://localhost:8000/assets/landing/assets/css/theme.min.css" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
pditommaso commented 5 years ago

I suspect this happens because the JWT secret used was too short.

pditommaso commented 5 years ago

I guess this is solved. If you are still experiencing this problem feel free to comment/reopen the issue.