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 | should we just remove path::Path here and inline path::Path where we currently write Path? | |
40 | should we do this above on line 31 as well instead of calling env::current_dir? figure we should be consistent | |
64 | why are we removing derive_more::Error? | |
88 | ||
services/identity/src/constants.rs | ||
6 | 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 | same q as above, can we use PathBuf::new here? | |
30 | i think we can call path.pop() instead of shadowing path with a new value here | |
32–35 | haven't we already checked this above on line 15? | |
37–42 | we should invert the if condition so we can return early if the path already exists |
services/identity/src/config.rs | ||
---|---|---|
4 | sure | |
40 | we shouldn't call current_dir, as the directory could be an absolute path. | |
64 | ProtocolError doesn't implement it https://docs.rs/opaque-ke/latest/src/opaque_ke/errors.rs.html#167 | |
services/identity/src/constants.rs | ||
6 | I've never seen a service configure an extension, they aren't required in unix. | |
services/identity/src/keygen.rs | ||
13 | yea | |
30 | If the secrets directory is something like foo/bar, then pop() will just go to the parent. | |
32–35 | 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. |