question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support XML DSIG alg values

See original GitHub issue

Some libraries use XML DSIG alg values in the jwt header (mostly .net standard library) instead of the standard JWS alg. meaning that instead of using "alg": "RS256" they’re using "alg": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256". Because of that I can’t use this library to parse and validate tokens generated by these libraries. It’s a pretty small fix to add this value table (located here https://datatracker.ietf.org/doc/html/rfc7518#appendix-A.1) to the enum to add support for it.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:29 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
lhazlewoodcommented, Aug 10, 2021

@ronzeidman #493 is actually already implemented in the jwe branch, and I’m working hard to finish that as soon as I’m able. It has taken a year of on/off work, but I’ve dedicated a lot of time in the last three weeks to it, so I hope to have it finished within a month. The tricky part of all of this is that JWE requires encoded keys in the JWK format, and that was a whole 'nuther (fairly large) specification that had to be implemented just for JWE to be spec-compliant. It was a ton of work.

As to modifying the enum, that wouldn’t really work - because the interface-based approach is the only solution that allows plugging in of custom algorithms (with XML DSIG ID’s or otherwise), the enum has already been deprecated in the jwe branch. We don’t want to modify/add to the enum because we explicitly want to discourage its further use.

I very much appreciate you asking here first before working on a PR! We’re very grateful for PRs, but really hate having to decline them because the requestor wasn’t aware of current changes or codebase design issues (like the jwe work for example).

You might want to fork the latest JJWT release and add those changes locally for yourself until the jwe branch is merged if you need it before the jwe work is done - could be a month or so before we can merge it.

0reactions
stale[bot]commented, Apr 27, 2022

Closed due to inactivity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

XML Signature Syntax and Processing Version 1.1 - W3C
The SignatureValue element contains the actual value of the digital signature; it is always encoded using base64 [ RFC2045 ]. Schema Definition:
Read more >
b_c / jose4j / issues / #174 - Support XML DSIG identifiers
The "alg" value is a case-sensitive ASCII string containing a StringOrURI value. FWIW, I agree that using the XML DSIG identifiers is weird,...
Read more >
DSig Part 3: XML DSig vs. JSON Web Signature - Medium
While researching this blog post, I searched for “xml digital signature vs json web signature” on Google. Most of the results were about...
Read more >
12 XML Digital Signature API Overview and Tutorial
The Java XML Digital Signature API is a standard Java API for generating and validating XML Signatures. This API was defined under the...
Read more >
XML Digital Signature Service - IBM
The most common problem encountered is that certificates used for signing are not created with a storepass value and a keypass value of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found