
Sammy Verstappen (GPS N.V.) asked a question.
We have a webabl that uses oauth2 and jwt from google. After we have updated our development environment from Openedge 12.8.4 to 12.8.9 it doesn't work anymore.
The error it gives is: 'An error occurred while attempting to decode the Jwt: Failed to load JWS keys'
The settings we are using in oeablSecurity.properties:
client.login.model=oauth2
jwtToken.keystore.type=jwk
jwtToken.keystore.jwkurl=https://www.googleapis.com/oauth2/v3/certs
jwtToken.signatureAlg=RS256
oauth2.resSvc.audience=73xxxxxxxx.apps.googleusercontent.com
oauth2.resSvc.tokenServices=jwt
We have a 12.8.4 environment where it still works. And we have another webabl that works with microsoft authentication, that stills works in 12.8.4 and 12.8.9.
Any ideas about what is wrong?
Thanks
I have enabled extra logging based on this https://docs.progress.com/bundle/pas-for-openedge-management/page/Debug-logging-for-OAuth2.html
In the log I now found this:
c.p.a.s.security.jwk.OEJwkJwtDecoder - Decoding token with JWK: eyJh....
c.p.a.services.security.jwk.KeyCache - Requesting keys using URL 'https://www.googleapis.com/oauth2/v3/certs'
c.p.a.services.security.jwk.KeyCache - Call response '{'
If I read the token from the 'Decoding token with JWK'-line in c# it works. So that seems to be ok.
I think it's weird that the call response is only '{'. Maybe some Carriage Return and Line Feed issues?
With the microsoft authentication it's correct: Call response '{"keys":[{"kty":"RSA","use":....
Hello, I have the same issue with OpenEdge v12.8.9, a workaround I tried that works is to "flatten" the JSON body of the JWK to one line:
We've created a little proxy (fake) webservice that request the real (non flattened) keys URL each time the (fake, flattened) URL is hit by PAS (which shouldn't happen very often since PAS caches the keys).
This way, we also solve the issue of Google (Firebase) key rotation.