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

Implement default jwt-secret paths #5948

Open
MarekM25 opened this issue Jul 20, 2023 · 0 comments · May be fixed by #5979
Open

Implement default jwt-secret paths #5948

MarekM25 opened this issue Jul 20, 2023 · 0 comments · May be fixed by #5979

Comments

@MarekM25
Copy link
Contributor

MarekM25 commented Jul 20, 2023

Relevant improvement in UX for Ethereum users: ethereum/execution-apis#297

Current behavior:
Nethermind is loading JwtSecret based on this config:
https://github.com/NethermindEth/nethermind/blob/master/src/Nethermind/Nethermind.JsonRpc/JsonRpcConfig.cs#L40
If the file is not found Nethermind will generate JwtSecret
Logic of loading is here: https://github.com/NethermindEth/nethermind/blob/master/src/Nethermind/Nethermind.Core/Authentication/JwtAuthentication.cs#L42
The current default value is: keystore/jwt-secret

Behavior after the change:
If JsonRpc.JwtSecretFile is not set to the default value - no change in behavior. Try to load and generate if not found from the given path.

If JsonRpc.JwtSecretFile is not specified

  1. Try to load from the path specified in the proposal
For Linux:
- $XDG_DATA_DIR/ethereum/engine/jwt.hex
- $HOME/.local/share/ethereum/engine/jwt.hex

For Mac:
- $HOME/Library/Application Support/Ethereum/Engine/jwt.hex

For Windows:
- {FOLDERID_RoamingAppData}/Ethereum/Engine/jwt.hex
  1. If we haven't found jwt file in the default path for OS. Try to load from the old Nethermind default.
  2. If we haven't found jwt in 1. and 2. generate jwt secret file with paths specified in point 1.
@Zexuz Zexuz linked a pull request Aug 1, 2023 that will close this issue
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant