-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Machine ID: Teleport Plugins on Kubernetes (Epic) #29048
Comments
A few general questions spring to mind:
|
Initial discussion with one customer user suggests sidecar is convenient. It also has the advantage of tying the identity directly to the specific access plugin pod - and - avoids integrating with the Kubernetes secret API directly at this time. It will not be able to handle the |
Sidecars are definitely convenient. I do think that a "better" way to do this from a broader perspective though would be to have a dedicated Machine ID Helm chart which runs in its own container and provisions its I appreciate that this muddies the water, but maintaining sidecars for 50 different containers that all need to read identities becomes a little cumbersome and would require people to modify the code for their existing third-party setups, whereas running Machine ID completely separately and having it use the k8s secret API for communication is a more scalable, distributed pattern. With this said, people would likely need to change their deployments to mount the newly-minted secrets into their existing containers anyway so what do I know 😅 |
My two cents regarding the sidecar vs standalone deployment:
I would prefer the second approach, I've been hurt numerous times by the sidecar approach, and I think this is a Kubernetes antipattern. This also is a hard blocker for Jobs, I think CronJob and CI-like Jobs are a good fit for MachineID and we want to support them. |
Hi. If i would do it "Kubernetes way", I would implement the controller pattern. Where via CRD we can provide bot configuration for different services (e.g. plugins, custom applications). It can be translated to the cron or regular job application. The Secret is written to different resources for each application to consume because it is bounded with the specific set of permissions by attached role(s). However, this solution might bring new challenges. The mentioned automatic secrets upgrade is described in the Kubernetes documentation.
In addition to that, there might be issues for this flow in case of temporary or permanent unavailability of Teleport or Cluster API. This can be mitigated with combination of I agree with challenges that were mentioned for sidecars containers. But there is an ongoing work to improve its lifecycle within the pod. You can check this KEP to get more details. |
A controller/operator is definitely something that interests me down the line - although - I do worry it potentially results in a scenario where the single "bot" controller deployed to the cluster has a wide RBAC grant in order to account for all the potential uses in the cluster.
Indeed - I think realistically, I'm going to complete the work that will allow sidecar & non-sidecar deployments. We'll then be able to switch to recommending sidecars when the k8s KEP enters GA and the support for sidecars in k8s is less questionable. |
#33028 has arisen as necessary |
I'm closing this epic as complete as the actual implementation work is now done. Documentation and extending the helm charts to take advantage of this remains - but I'll leave those as separate items of work. |
Customers often deploy Teleport "plugins" that integrate Teleport with another service. One such example is the Slack integration, which delivers messages to a slack channel when Access Requests are created.
These plugins require authentication against the Teleport API. Historically, this has been done by creating an identity file using
tctl auth sign
- but this creates a long lived, and potentially powerful, credential. Machine ID is the new "golden path" for short-lived credentials for Machine Access, but, there are several factors preventing Machine ID being used for this:tbot
produces renewed credentials, and this is sub-optimal for reliability.Tasks
The text was updated successfully, but these errors were encountered: