> I also need a minion to be connected to multiple masters at the
> same time: will it be supported?
I'll keep that use-case in the back of my head.
> I'm not sure I follow you here: why a key-pair to sign keys? does
> it mean we can have different keys for all masters so that each
> master won't share their private-key with other masters?
>
https://salt.readthedocs.org/en/v0.12.1/topics/specs/salt_auth_proto_abs.html
If you're already familiar with salt communication process, never mind
that link. If you're not, it will hopefully make my approach easier to
understand.
###
Currently a minion can only have one single master public key in
/etc/salt/pki/minion/minion_master.pub. If a minion was connected to a
master and then connects to the same or any other master and receives
a pubkey that differs from the one already present on the minion, the
minion complains and exits. Its currently not possible to update a
masters pubkey on the minion.
If you have multiple masters and dont share keys, all masters will
have a different priv/pub key-pair. So if the minion switches to a
different master than it was connected to before, the master will send
a different pub-key to the minion. Therfore making the minion complain
and exit.
The comparison that is currently in the minion is very simple (pseudo):
1. connect to master
2. receive pubkey
3. read (possibly) already present master-pubkey from file
3. if pubkey not yet present, save received pubkey and continue
3. if pubkey already present, compare and complain when different
My approach is to not rely on a simple comparison like that.
I want the minion to be able to verify any pubkey from any master that
is running in my environment. That can be done by creating a new
priv/pub-key-pair on the master just for signing, make that key-pair
available on all masters and minions and then always have the master
sign its public key when it is send to a minion.
That signing key-pair only needs to be generated the first time the
master starts. It should then be included in the bootstrap process of
a minion.
Does that make it more clear?
-felskrone