-
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
User can't recover signed identities on Helm since v13 #29262
Comments
Inlcudes `tar` and its transitive dependencies to the distrol image in order to address #29262
Is something like this what you're after? ❯ kubectl --namespace teleport exec deploy/teleport-auth -- tctl auth sign --user admin-guy --format openssh -o ssh-adminguy
The credentials have been written to ssh-adminguy, ssh-adminguy-cert.pub
❯ kubectl --namespace teleport exec deploy/teleport-auth -- tar c ssh-adminguy ssh-adminguy-cert.pub > adminguy-local.tar
❯ tar -xvf adminguy-local.tar
x ssh-adminguy
x ssh-adminguy-cert.pub |
The goal is to be able to use
|
OK, so I've built and tested a distroless image with Given some files we want to extract from a pod, for the sake of an example created via
Write
Oops Question re: workarounds: |
If we do end up wanting
Not sure whether handling single-file exports with Edit: see #29451 for experimental implementation |
A quick and dirty experiment showing one possible approach for writing certificates to stdout. Demonstrates a possible solution to #29262. DO NOT MERGE AS IS. IN NO WAY PRODUCTION READY.
…29451) * Proof-of-concept writing tar to stdout A quick and dirty experiment showing one possible approach for writing certificates to stdout. Demonstrates a possible solution to #29262. DO NOT MERGE AS IS. IN NO WAY PRODUCTION READY. * Fix timestamps * Adds `--tar` option to `auth sign` Adds an option to bundle the certificates generated by `tctl auth sign` into a tarball and writes that tarball to stdout. This is to facilitate extracting credentials from environments with limited access to the filesystem and tools like a shell, tar and so on, e.g. distroless Docker images. Example usage: ``` $ kubectl exec ... -- tctl auth sign --user alice --format openssh -o alice --tar | tar xv x alice-cert.pub x alice ``` * Reroutes helper mesg to stderr when straming tar file to stdout
What would you like Teleport to do?
As a user, I want to be able to sign an identity for a server or a Teleport user by exec-ing in the auth pods. This was working until v13. I want
tctl
to support sending the signed content to stdout.I also want the workarounds and proper way to sign identities to be documented (see workarounds).
What problem does this solve?
Trust bootstrapping. A lot of users used
kubectl exec -it deployment/auth -- tctl auth sign ...
to sign various things like the teleport plugin identities or db/host certs.Until v13, we were using debian-based images, with
tar
in them. Now that we are using distroless-based images, we don't havetar
anymore and cannot invokekubectl cp
by default.If a workaround exists, please include it.
tctl auth sign
). This provides betters security and auditability guarantees as the actions are logged as your user and RBAC is enforced. This approach should be preferred when possible.tctl
's output to stdout (use-o /proc/self/fd/1 --overwrite
). This doesn't work when the output oftctl auth sign
is multiple files (e.g. DB certs)The text was updated successfully, but these errors were encountered: