Skip to content
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

[Feature] Add JSON Web Token (JWT) token generation and validation support #599

Closed
zerosnacks opened this issue Apr 22, 2024 · 2 comments · Fixed by #612
Closed

[Feature] Add JSON Web Token (JWT) token generation and validation support #599

zerosnacks opened this issue Apr 22, 2024 · 2 comments · Fixed by #612
Labels
enhancement New feature or request

Comments

@zerosnacks
Copy link
Member

zerosnacks commented Apr 22, 2024

Component

transports

Describe the feature you would like

To add JWT claims generation and validation support

Besides having use in Foundry it is a common method of authentication between execution client / consensus client

For reference:

Both implementations use: https://github.com/Keats/jsonwebtoken

Additional context

It is possibly preferred that this is added to a separate new repo in the alloy org

@mattsse indicated that this is also useful for Reth

I should be able to implement it and propose a PR if that is desired

@mattsse
Copy link
Member

mattsse commented Apr 22, 2024

we should probably put this in the engine types crate

don't think it's worth it to add a new crate for this

here's the reth code

https://github.com/paradigmxyz/reth/blob/9a1d6ea9ca7d6522b7610b65871eb562ff080e67/crates/rpc/rpc/src/layers/jwt_secret.rs#L15-L15

https://github.com/paradigmxyz/reth/blob/9a1d6ea9ca7d6522b7610b65871eb562ff080e67/crates/rpc/rpc/src/layers/jwt_validator.rs#L11-L11

@prestwich
Copy link
Member

we should probably put this in the engine types crate

makes sense to me

@zerosnacks zerosnacks changed the title [Feature] Add JSON Web Token (JWT) claims generation and validation support [Feature] Add JSON Web Token (JWT) token generation and validation support Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants