RS256 JWT Format

(Ravikanth) #1


I am using the JWT with RSA public/private key. When I am using the public/private keys on the python side, I am able to encode and decode properly.

On ROR, i tried providing the signature_key in PEM format and also in regular public key format. in both cases, I am hitting the below.

What is the preferred format in which public needs to be specified in the JWT section.

Caused by: IOException: DerInputStream.getLength(): lengthTag=72, too big.
at ~[?:?]
at ~[?:1.8.0_172]
at tech.beshu.ror.acl.blocks.rules.impl.JwtAuthSyncRule.match( ~[?:?]
at tech.beshu.ror.acl.blocks.Block.lambda$checkAsyncRulesInSequence$4( ~[?:?]
at tech.beshu.ror.utils.FuturesSequencer.runInSeqUntilConditionIsUndone( ~[?:?]
at tech.beshu.ror.utils.FuturesSequencer.runInSeqUntilConditionIsUndone( ~[?:?]
at tech.beshu.ror.acl.blocks.Block.checkAsyncRulesInSequence( ~[?:?]
at tech.beshu.ror.acl.blocks.Block.checkAsyncRules( ~[?:?]
at tech.beshu.ror.acl.blocks.Block.check( ~[?:?]
at tech.beshu.ror.acl.ACL.lambda$doCheck$6( ~[?:?]
at tech.beshu.ror.utils.FuturesSequencer.runInSeqUntilConditionIsUndone( ~[?:?]
at tech.beshu.ror.utils.FuturesSequencer.lambda$runInSeqUntilConditionIsUndone$2( ~[?:?]
at java.util.concurrent.CompletableFuture.uniComposeStage( ~[?:1.8.0_172]
… 76 more

(Simone Scarduzio) #2

it should be in pem without the START/END banner, and all in one line.

(Simone Scarduzio) #3

Hi @ravjanga, did this solve your issue?

(Ravikanth) #4

Just tried the solution and it worked.