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

500 errors when JWT is nil #97

Open
jgrevich opened this issue Jul 8, 2021 · 0 comments
Open

500 errors when JWT is nil #97

jgrevich opened this issue Jul 8, 2021 · 0 comments

Comments

@jgrevich
Copy link
Member

jgrevich commented Jul 8, 2021

I noticed this while debugging 18F/identity-loadtest#40

App 17118 output: 2021-07-08 23:29:15 - JWT::DecodeError - Nil JSON web token:
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/jwt-2.1.0/lib/jwt.rb:26:in `decode'
App 17118 output: 	/srv/sp-oidc-sinatra/releases/20210707225430/app.rb:209:in `userinfo'
App 17118 output: 	/srv/sp-oidc-sinatra/releases/20210707225430/app.rb:80:in `block in <class:OpenidConnectRelyingParty>'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1636:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1636:in `block in compile!'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:987:in `block (3 levels) in route!'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1006:in `route_eval'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:987:in `block (2 levels) in route!'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1035:in `block in process_route'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1033:in `catch'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1033:in `process_route'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:985:in `block in route!'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:984:in `each'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:984:in `route!'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1098:in `block in dispatch!'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1072:in `block in invoke'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1072:in `catch'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1072:in `invoke'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1095:in `dispatch!'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:919:in `block in call!'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1072:in `block in invoke'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1072:in `catch'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1072:in `invoke'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:919:in `call!'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:908:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/rack-protection-2.0.8.1/lib/rack/protection/xss_header.rb:18:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/rack-protection-2.0.8.1/lib/rack/protection/base.rb:50:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/rack-protection-2.0.8.1/lib/rack/protection/base.rb:50:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/rack-protection-2.0.8.1/lib/rack/protection/path_traversal.rb:16:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/rack-protection-2.0.8.1/lib/rack/protection/json_csrf.rb:26:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/rack-protection-2.0.8.1/lib/rack/protection/base.rb:50:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/rack-protection-2.0.8.1/lib/rack/protection/base.rb:50:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/rack-protection-2.0.8.1/lib/rack/protection/frame_options.rb:31:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/null_logger.rb:11:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:194:in `call'
App 17118 output: 	/srv/sp-oidc-sinatra/shared/bundle/ruby/2.6.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1951:in `call'
App 17118 output: 	/opt/ruby_build/versions/2.6.7/lib/ruby/gems/2.6.0/gems/passenger-6.0.9/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb:107:in `process_request'
App 17118 output: 	/opt/ruby_build/versions/2.6.7/lib/ruby/gems/2.6.0/gems/passenger-6.0.9/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:149:in `accept_and_process_next_request'
App 17118 output: 	/opt/ruby_build/versions/2.6.7/lib/ruby/gems/2.6.0/gems/passenger-6.0.9/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
App 17118 output: 	/opt/ruby_build/versions/2.6.7/lib/ruby/gems/2.6.0/gems/passenger-6.0.9/src/ruby_supportlib/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads'
App 17118 output: 	/opt/ruby_build/versions/2.6.7/lib/ruby/gems/2.6.0/gems/passenger-6.0.9/src/ruby_supportlib/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'

% curl -v 'https://sp-oidc-sinatra.pt.identitysandbox.gov/auth/result?code=4e76bddb-fa18-467b-acd1-4c1e83e3071c&state=b4c2ae2c5061ef55d498d78a36f25b66'
...
< HTTP/2 500 
< date: Thu, 08 Jul 2021 23:31:03 GMT
< content-type: text/html;charset=utf-8
< content-length: 30
< status: 500 Internal Server Error
...
<h1>Internal Server Error</h1>* Closing connection 0
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

1 participant