Opaque 2.0 requires different setup for it to run.
This adds support generating the secrets and adding the
ServerSetup object to the configuration.
Details
cd services/identity cargo run -- keygen cargo run -- keygen # should skip writting files cargo run -- server
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
services/identity/src/config.rs | ||
---|---|---|
4 ↗ | (On Diff #24600) | should we just remove path::Path here and inline path::Path where we currently write Path? |
40 ↗ | (On Diff #24600) | should we do this above on line 31 as well instead of calling env::current_dir? figure we should be consistent |
64 ↗ | (On Diff #24600) | why are we removing derive_more::Error? |
88 ↗ | (On Diff #24600) | |
services/identity/src/constants.rs | ||
6 ↗ | (On Diff #24600) | i know that PathBuf will infer that txt is the extension but i think it's better to be explicit like we are above. what do you think? |
services/identity/src/keygen.rs | ||
13 ↗ | (On Diff #24600) | same q as above, can we use PathBuf::new here? |
30 ↗ | (On Diff #24600) | i think we can call path.pop() instead of shadowing path with a new value here |
32–35 ↗ | (On Diff #24600) | haven't we already checked this above on line 15? |
37–42 ↗ | (On Diff #24600) | we should invert the if condition so we can return early if the path already exists |
services/identity/src/config.rs | ||
---|---|---|
4 ↗ | (On Diff #24600) | sure |
40 ↗ | (On Diff #24600) | we shouldn't call current_dir, as the directory could be an absolute path. |
64 ↗ | (On Diff #24600) | ProtocolError doesn't implement it https://docs.rs/opaque-ke/latest/src/opaque_ke/errors.rs.html#167 |
services/identity/src/constants.rs | ||
6 ↗ | (On Diff #24600) | I've never seen a service configure an extension, they aren't required in unix. |
services/identity/src/keygen.rs | ||
13 ↗ | (On Diff #24600) | yea |
30 ↗ | (On Diff #24600) | If the secrets directory is something like foo/bar, then pop() will just go to the parent. |
32–35 ↗ | (On Diff #24600) | Since the original code assumes a relative path, these could be different if the path were changed to an absolute value. We should probably just remove the env_dir logic from the existing code. |