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

Discovery broken when the Provider returns a set of JWKs #56

Open
hotgazpacho opened this issue Jun 24, 2016 · 0 comments
Open

Discovery broken when the Provider returns a set of JWKs #56

hotgazpacho opened this issue Jun 24, 2016 · 0 comments

Comments

@hotgazpacho
Copy link

When using discovery, and the response from the Provider is a JSON::JWK::Set, a JSON::JWK::Set::KidNotFound error is raised. Looking through the locals at the point of the error, it seems that the kid is not being passed down at all. It therefor can't find the key in the set to verify the token.

>>  key
=> [{"kid"=>"bkj-VXvyRclrNmDLT7FS8_-8pc6baq5cmLpu7Usv2G8", "kty"=>"RSA", "alg"=>"RS256", "use"=>"sig", "n"=>"kAqMplKg8U_szOGaaHtob9PvuqOpT5P0iRiN_UyecOEslQyT0B2zHoVFojeLp5zQ4qb-jhAspXedUh1y4RSSPyjIDKx4x7GQvceGb2ewJIQXV_My2FVlNeyyPpYM1JlMlDbgKTVy2CiTi75MKd3CF95bFnnskUi48uS78XjNSZhvonMmzVO3_mFw5m3KxoQDhdMKPjZ2kM6x9H9WJ-J06x_lQA3STDnYADdAQA9fk6985AMpjpGakn1RMgVXSTcr3KBLaliWNGa1L0CQRv7B_0euIj78j1gLSZonpXYNVkVFwUy3GTFTtjrobhc-39isjqGadQeAQmj7547WtHaOVQ", "e"=>"AQAB"}]
>>  key.class
=> JSON::JWK::Set
>>  kid
=> nil

Relevant stack trace:

json-jwt (1.6.1) lib/json/jws.rb:116:in `with_jwk_support'
json-jwt (1.6.1) lib/json/jws.rb:88:in `valid?'
json-jwt (1.6.1) lib/json/jws.rb:25:in `verify!'
json-jwt (1.6.1) lib/json/jws.rb:162:in `decode_compact_serialized'
json-jwt (1.6.1) lib/json/jwt.rb:77:in `decode_compact_serialized'
json-jwt (1.6.1) lib/json/jose.rb:39:in `decode'
openid_connect (0.9.2) lib/openid_connect/response_object/id_token.rb:60:in `decode'
omniauth-openid-connect (0.2.3) lib/omniauth/strategies/openid_connect.rb:173:in `decode_id_token'
omniauth-openid-connect (0.2.3) lib/omniauth/strategies/openid_connect.rb:162:in `block in access_token'
omniauth-openid-connect (0.2.3) lib/omniauth/strategies/openid_connect.rb:169:in `access_token'
omniauth-openid-connect (0.2.3) lib/omniauth/strategies/openid_connect.rb:102:in `callback_phase'
omniauth (1.3.1) lib/omniauth/strategy.rb:227:in `callback_call'
omniauth (1.3.1) lib/omniauth/strategy.rb:184:in `call!'
omniauth (1.3.1) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.3.1) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.3.1) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.3.1) lib/omniauth/builder.rb:63:in `call'
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