Page MenuHomePhabricator

[services][identity] update Config struct to hold keypair instead of just private key
ClosedPublic

Authored by varun on Jun 27 2022, 1:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 24, 8:35 AM
Unknown Object (File)
Sun, Oct 20, 8:50 PM
Unknown Object (File)
Fri, Oct 18, 6:09 PM
Unknown Object (File)
Thu, Oct 10, 8:36 PM
Unknown Object (File)
Thu, Oct 10, 4:05 PM
Unknown Object (File)
Thu, Oct 10, 3:10 PM
Unknown Object (File)
Thu, Oct 10, 3:05 PM
Unknown Object (File)
Thu, Oct 10, 2:44 PM

Details

Summary

We need to access both the server public and private key to do PAKE registration and login. Although it's possible to derive the public key from the private key, the opaque-ke library only lets us derive the full keypair from a byte slice. We should do this once when we load the config from a file at server start time.

Test Plan

ran server and confirmed the keypair was loaded successfully

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun published this revision for review.Jun 27 2022, 1:09 AM
tomek added inline comments.
services/identity/src/config.rs
5

Are we sure we should implement Debug for a keypair? We probably don't want to log them anywhere, so Debug should at least redact it to hide the content.

This revision is now accepted and ready to land.Jun 27 2022, 2:46 PM