Page MenuHomePhabricator

When registering a device, write a device ID
ClosedPublic

Authored by epriestley on Jan 21 2015, 12:15 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 17, 4:28 PM
Unknown Object (File)
Mon, Sep 2, 8:41 PM
Unknown Object (File)
Mon, Sep 2, 8:15 PM
Unknown Object (File)
Sat, Aug 31, 2:32 PM
Unknown Object (File)
Sun, Aug 25, 8:31 AM
Unknown Object (File)
Sun, Aug 25, 7:03 AM
Unknown Object (File)
Sun, Aug 25, 7:03 AM
Unknown Object (File)
Aug 18 2024, 10:47 AM
Subscribers

Details

Summary

Ref T5833. In some cases, we need to know if an Almanac device is the localhost or not, so we can either handle or forward the request.

To accomplish this, write a device ID when running bin/almanac register.

Using --allow-key-reuse and --identify-as, multiple devices are permitted to authenticate as one device but identify as different devices. In the Phacility cluster, this allows all the repoXXX machines to have one keypair (making key management much easier) but still work as separate devices. This is an advanced feature; normal installs with 1-3 hosts would just generate a key + device per host and identify/authenticate as the same device.

Test Plan

Ran commands with lots of flags like PHACILITY_INSTANCE=local sudo -E ./bin/almanac register --device daemon.phacility.net --private-key ~/dev/core/conf/keys/daemon.key --force --allow-key-reuse --identify-as local001.phacility.net. Got a good result from AlmanacKeys::getDeviceID() afterward.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to When registering a device, write a device ID.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Jan 21 2015, 12:29 AM
This revision was automatically updated to reflect the committed changes.