correct the ssh revocation docs and say the sign permission is shared
This commit is contained in:
parent
0afb111862
commit
aeb9317ad1
1 changed files with 30 additions and 6 deletions
|
|
@ -5,11 +5,17 @@ key onto it. The agent holds no standing SSH key. It asks the swarm's secret
|
|||
store for a certificate that lasts an hour, and the machine trusts the swarm's
|
||||
SSH certificate authority (CA) instead of a list of keys.
|
||||
|
||||
Nothing changes until you do both of these:
|
||||
Agent-side, nothing changes until you do both of these:
|
||||
|
||||
1. Switch SSH on for the agent and name the machines it may reach.
|
||||
2. Make each machine trust the CA and list the agents allowed in.
|
||||
|
||||
The permission to get a certificate is in the policy every agent shares, so
|
||||
every agent with a store identity can already get a certificate for its own
|
||||
name, whether or not you switch SSH on for it. That's harmless: no machine
|
||||
trusts a name it doesn't list. Switching SSH on only sets up the key, the
|
||||
renewal and the client config.
|
||||
|
||||
## 1. Switch it on for an agent
|
||||
|
||||
In the agent's config:
|
||||
|
|
@ -82,9 +88,15 @@ module writes no `authorized_keys`.
|
|||
|
||||
- **One agent from one machine:** remove its name from that user's
|
||||
`principals` and deploy the machine. The next login attempt fails.
|
||||
- **One agent from every machine:** delete its cert-auth role
|
||||
`hive-agent-<name>` in the store. It can no longer log in to the store, so
|
||||
nothing signs for it, and its last certificate lapses within three hours.
|
||||
- **One agent from every machine:** remove its name from every machine's
|
||||
`principals`. That's the revocation. No swarm-wide switch
|
||||
stops signing for an agent that a hive still declares: if you delete
|
||||
its cert-auth role `hive-agent-<name>` in the store, `swarm-controller`
|
||||
writes it back within five minutes. Signing stops only once no hive declares
|
||||
the agent any more (you destroyed it); the controller then stops renewing
|
||||
its store identity, and the identity lapses with its 7-day certificate.
|
||||
- **A certificate already issued** stays valid until it expires, at most three
|
||||
hours, whatever you remove. Removing a principal blocks new logins at once.
|
||||
- **The CA itself:** if the CA key changes, every machine needs the
|
||||
new public key. Nothing replaces the CA by itself.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue