Homec4science

When registering a device, write a device ID

Authored by epriestley <git@epriestley.com> on Jan 23 2015, 01:06.

Description

When registering a device, write a device ID

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.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5833

Differential Revision: https://secure.phabricator.com/D11452

Details

Committed
epriestley <git@epriestley.com>Jan 23 2015, 01:06
Pushed
aubortJan 31 2017, 17:16
Parents
rPHd6ed9c2f685a: Fix an undefined variable
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHadf209e6555a: When registering a device, write a device ID (authored by epriestley <git@epriestley.com>).Jan 23 2015, 01:06