Conversation
When you setup a node alias, it is difficult to match the workload without carefully looking at the documenation of the particular node attestor and see what selectors are unique. This is very hard to automate. Allow easy automation by making the node svid always available as a selector. Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
|
If you know the node SPIFFE ID can you not just create the registration entry with the parent id set to the node SPIFFE ID? |
No, because a node alias needs the parent id to be |
|
@kfox1111 could you share an example of how this would be used? |
|
The exact use case is complicated, but reasonable. I'll try and lay it out Say you want to use a stronger node attestor then the k8s one. For example, you want to attest with a TPM and are running them as VMs in the cloud. It is very hard before hand to determine what the TPM pubhash is going to be. let alone have a helper app understand that a node spiffeid of for spire-controller-manager to map a pod (workload) to the parentid of the node it is on, it only has access to the k8s node document that the pod is running on. In addition, lots of properties of the node object are directly controllable by the node itself so are untrustworthy. While the parentid setting is templated in spire-controller-manager, the limited set of data it can use to do the template means its best to set it to something simple and trustworthy. like so, how do we autogenerate a link between what spire-controller-manager needs as input entries and the unknown spiffeids nodes are going to get? Node aliases can really help with this. We write a helper client/server pair. How does this work:
the spire-controller-manager will sync these entries automatically to the spire-server, so the rest service does not need access to the spire server directly, increasing security. validating policies can also be written to further restrict what it can do for increased security. Because it uses the svid:path, it can be made to work no matter what node attestor is being used on that particular node, nor does the node id needs to be discovered beforehand, or special knowlege of how to map a particular node svid to a set of selectors that works for that particular type of node attestor. now you have a valid trust path from a pod all the way to a specific node attestor on the node it is running on, without human intervention, so stuff like autoscaling of k8s cluster nodes running in aws secured with tpms "just works". |
Pull Request check list
Affected functionality
When you setup a node alias, it is difficult to match the workload without carefully looking at the documenation of the particular node attestor and see what selectors are unique. This is very hard to automate.
Description of change
Allow easy automation by making the node svid always available as a selector.