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, Nov 19, 8:05 AM
Unknown Object (File)
Wed, Nov 13, 12:38 AM
Unknown Object (File)
Thu, Oct 31, 9:16 AM
Unknown Object (File)
Thu, Oct 31, 9:16 AM
Unknown Object (File)
Thu, Oct 31, 8:50 AM
Unknown Object (File)
Oct 3 2024, 11:21 AM
Unknown Object (File)
Sep 20 2024, 2:41 AM
Unknown Object (File)
Sep 20 2024, 12:09 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.