Page MenuHomePhabricator

[keyserver] Print warnings if usingIdentityCredentials not set
ClosedPublic

Authored by inka on Mar 7 2024, 3:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 1:23 AM
Unknown Object (File)
Thu, Apr 25, 8:10 AM
Unknown Object (File)
Thu, Apr 25, 8:10 AM
Unknown Object (File)
Thu, Apr 25, 8:10 AM
Unknown Object (File)
Thu, Apr 25, 8:10 AM
Unknown Object (File)
Thu, Apr 25, 8:10 AM
Unknown Object (File)
Thu, Apr 25, 8:06 AM
Unknown Object (File)
Thu, Apr 25, 7:23 AM
Subscribers

Details

Summary

issue: ENG-6618
We want to warn the dev that they are not using identity credentials for communictaing with the clients

For now using identity credentials is optional. The dev can proceed with their setup. If they want to start using the identity credentials though, they need to restart nix and go through setting up a new keyserver.
If the keyserver is run in Docker, the dev should set usingIdentityCredentials flag in COMM_JSONCONFIG_secrets_user_credentials env variable and create a new keyserver. See doc

We don't need this warning on the prod keyserver - it will not have the flag set, but that's fine, because the dafualt 256 is its id.

Test Plan

Ran the keyserver and checked that if usingIdentityCredentials is set then the warning is not printed, and if it is set, then the warning is printed

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka requested review of this revision.Mar 7 2024, 3:37 AM
keyserver/src/user/login.js
26–29 ↗(On Diff #37920)

Do we need really to block the rest of this function on this await? Can we do it in parallel?

39–46 ↗(On Diff #37920)

Is the behavior of console.warn well-defined to concatenate the list of strings with a single space in between each?

I wonder if it would be better to just console.warn a single, manually concatened string, to avoid any ambiguity

michal added inline comments.
keyserver/src/user/login.js
25 ↗(On Diff #37964)

I find this function name weird. It starts with check but doesn't return bool or sth similar. Maybe just getUserCredentials?

This revision is now accepted and ready to land.Mar 12 2024, 9:23 AM

Rename to getUserCredentials