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)
Sat, Dec 14, 11:01 PM
Unknown Object (File)
Thu, Dec 12, 7:06 AM
Unknown Object (File)
Wed, Dec 11, 7:36 PM
Unknown Object (File)
Wed, Nov 27, 3:30 PM
Unknown Object (File)
Mon, Nov 25, 4:11 PM
Unknown Object (File)
Sun, Nov 24, 7:14 AM
Unknown Object (File)
Sat, Nov 23, 1:52 PM
Unknown Object (File)
Nov 19 2024, 8:05 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
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.