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
F14010496: D11452.id.diff
Thu, Oct 31, 9:16 AM
F14010495: D11452.id27584.diff
Thu, Oct 31, 9:16 AM
F14010461: D11452.diff
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
Unknown Object (File)
Sep 17 2024, 4:28 PM
Unknown Object (File)
Sep 2 2024, 8:41 PM
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
Branch
need3
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 3958
Build 3971: [Placeholder Plan] Wait for 30 Seconds

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.