Comments (5)
I've fixed the identified bug in v0.5.5
. Please let me know if I identified the bug you were expecting @joshkaplinsky and if the fix is to your expectations.
Thank you again for reporting this issue 🎉
from jwkset.
Thanks for the fast turnaround! Yes, this addresses my issue. Much appreciated!
from jwkset.
This is due to the updated JWK Set package being used. Are you able to provide the JWK Set you are working with? Ensure there is no private key material in it before passing it along.
from jwkset.
Thank you for making this issue.
I think this feature branch commit will likely solve the problem. I'll make a test, then confirm that it matches your original problem. Could get a release out tonight.
from jwkset.
I think this program would reproduce the error experienced. The upcoming changes should fix that.
package main
import (
"encoding/json"
"log/slog"
"os"
"github.com/MicahParks/jwkset"
)
const (
logErr = "error"
)
func main() {
l := slog.Default()
const rawJWKSet = `{"keys":[{"kty":"OKP","alg":"EdDSA","kid":"my-key-id","x5c":["MIIB8TCCAaOgAwIBAgIUa/7hf5yVjhXwYLaT38DE5+y06PkwBQYDK2VwMG4xCzAJBgNVBAYTAlVTMREwDwYDVQQIDAhWaXJnaW5pYTERMA8GA1UEBwwIUmljaG1vbmQxFDASBgNVBAoMC01pY2FoIFBhcmtzMQ0wCwYDVQQLDARTZWxmMRQwEgYDVQQDDAtleGFtcGxlLmNvbTAeFw0yNDAxMDQwMDE2MDVaFw0yNDAyMDMwMDE2MDVaMG4xCzAJBgNVBAYTAlVTMREwDwYDVQQIDAhWaXJnaW5pYTERMA8GA1UEBwwIUmljaG1vbmQxFDASBgNVBAoMC01pY2FoIFBhcmtzMQ0wCwYDVQQLDARTZWxmMRQwEgYDVQQDDAtleGFtcGxlLmNvbTAqMAUGAytlcAMhAKD0un1323TTlTlFUs5VWb+JvlToR5hMAWPfqLi4Wybpo1MwUTAdBgNVHQ4EFgQUOcvkrHIL2s+C+jq+y2V04rn1D3swHwYDVR0jBBgwFoAUOcvkrHIL2s+C+jq+y2V04rn1D3swDwYDVR0TAQH/BAUwAwEB/zAFBgMrZXADQQAHgsrxSTTK/K4hOeEldhsXooONdLR49kM/TtBqJEScxskFo51MEBRzydjwkiI7isPRgyy838Mvv9VS+nij1EAI"],"x5t":"RTwmBuuqX7XB6UlVXVck9scuJSM","x5t#S256":"bRkXmcs_Kvo6nQrYE7ZWpvDtyoI5Hj_82ASr4eauTV8","crv":"Ed25519","x":"oPS6fXfbdNOVOUVSzlVZv4m-VOhHmEwBY9-ouLhbJuk"}]}`
var marshal jwkset.JWKSMarshal
err := json.Unmarshal([]byte(rawJWKSet), &marshal)
if err != nil {
l.Error("Failed to unmarshal JWK set.",
logErr, err,
)
os.Exit(1)
}
marshal.Keys[0].X5TS256 = ""
jwk, err := jwkset.NewJWKFromMarshal(marshal.Keys[0], jwkset.JWKMarshalOptions{}, jwkset.JWKValidateOptions{})
if err != nil {
l.Error("Failed to create JWK.",
logErr, err,
)
os.Exit(1)
}
println(jwk.Marshal().KID)
}
from jwkset.
Related Issues (11)
- Correct behavior for RSA multi-prime unmarshaling HOT 1
- stdout and stderr HOT 3
- Release binaries and container image HOT 2
- Issue with JWK Validation: Leading Zero in Coordinates HOT 12
- Change how JWK validation works HOT 10
- Investigate if this project is in full RFC compliance for JWK parameters using `Base64urlUInt` vs `Base64url Encoding` HOT 1
- Handle extra padding for RSA "n" JWK parameter HOT 4
- Using expired token from long ago blocks at parsing the token (hits JWKS rate limit since KID is unknown) HOT 4
- Question about the JWKS Refresh Rate Limiting HOT 2
- X5TS256 in marshal does not match X5TS256 in marshalled HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jwkset.