Open v0lkan opened 1 year ago
Note that this Controller is a “nice to have”, but not mandatory.
ClusterSpiffeIDs shall be only created by the authorized admins in the first place.
The controller can periodically check and rectify any misconfigurations and/or delete ClusterSPIFFEIDs that do not conform a standard.
Note that instead of a custom operator, we can use an admission webhook as a gatekeeper:
https://kubernetes.io/blog/2019/03/21/a-guide-to-kubernetes-admission-controllers/
Punting to 1.1.0 as this is important, yet less urgent.
This can be a starting point for other controller-related tasks.
Counter point: This is not about security; since an administrator can very-well disable the controller too. It is more about “convenience”.
And for convenience, instead of running yet another process all the time inside the cluster, maybe an offline schema validator would be more useful.
A validator that
AEGIS_xxx
environment variables and make sure that they don’t have typos and validation problems.There are several tools that can be used to facilitate such an offline validation:
We can pick one that fits best to our needs, and create a validator app that you can run before each deployment.
A typical Aegis workload SVID is in the following form:
However, as of now, there is nothing preventing and administrator from interpolating the meta information themselves and coming up with an ID like:
Although you still need sufficient admin privileges to do this; it is better to safeguard against that.
Acceptance Criteria
aegis-notary
) that checks all the generated ClusterSPIFFEIDs and if any of them have thespiffeIdTemplate
that begins withspiffe://aegis.z2h.dev/workload
(customizable) verify that the rest of the template is in the expected format.