-
Notifications
You must be signed in to change notification settings - Fork 29
[WIP] JOSE support #89
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try one more time, but now don't run gradle build
The whole build of the project is slow.
If it's really needed, run: gradle build -Pckbuild.skipTestTasks=true -Pckbuild.skipLinkTasks=true
- but it will still take too much time (±15 minutes)
Note that the project is using Kotlin Multiplatform, so the tasks to run tests might be different. For this feature, you could use jvmTest
task to test the results if needed
Got it, I'll avoid running the full Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: whyoleg <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JOSE module should be under cryptography-serialization
, on the same level as ASN.1 and PEM serialization support.
Now also implement the JWT encode/decode possibility and use inline value classes for algorithms.
Additionally, recheck that all fields are using names according to kotlin code style, and if needed, use @SerialName
for JSON fields.
Feel free to also recheck all comments on the initial issue, so that the implementation will cover all use-cases
…de/decode with inline value classes Co-authored-by: whyoleg <[email protected]>
I've moved the JOSE module under ✅ Moved to See commit e38cf89 for the changes. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…ers and utility functions Co-authored-by: whyoleg <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try to make JsonWebKey
a sealed class/interface so that it will be possible to do simple type checks to understand the type of the key (rsa, ec, secret) and also the public/private. E.g., so that it will be possible to do something like key is RsaPublicJsonWebKey
or key is RsaJsonWebKey
Co-authored-by: whyoleg <[email protected]>
I've refactored
The hierarchy maintains full JSON Web Key specification compliance with a custom serializer that handles the Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now let's try to implement all specs: JWA, JWE, JWS, JWK, JWT reusing maximum abstractions/code
Additionally, add all examples from RFCs (from the original issue description) and specifically from https://datatracker.ietf.org/doc/html/rfc7520 to tests
… with RFC 7520 examples Co-authored-by: whyoleg <[email protected]>
I've implemented all JOSE specifications (JWA, JWE, JWS, JWK, JWT) with maximum code reuse and comprehensive RFC 7520 examples. The implementation includes: Complete JOSE Specs:
RFC 7520 Examples in Tests: See commit 13fa273. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like there is a lot of code and structure duplication - let's fix this
Co-authored-by: whyoleg <[email protected]>
I've refactored the JOSE implementation to eliminate code and structure duplication. The changes include: Major improvements:
The implementation now has a clean, modular structure with maximum code reuse while maintaining full RFC compliance. See commit 1c30bee. |
Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.
Original issue description:
Fixes #16.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.