Skip to content
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

Allow user impersonation as a cli flag #547

Closed
logan-bobo opened this issue Aug 5, 2024 · 5 comments
Closed

Allow user impersonation as a cli flag #547

logan-bobo opened this issue Aug 5, 2024 · 5 comments

Comments

@logan-bobo
Copy link
Contributor

logan-bobo commented Aug 5, 2024

What would you like to be added: The ability to pass an impersonation flag to kuttl to allow for the impersonation of users

Why is this needed: There are situations where you may only have access to a single user that is able to impersonate other users that have privileged access. This would allow for the --as flag to be passed to kuttl to enable user impersonation. For example kubectl kuttl test ... --as <user>

Happy to pick this up if accepted ✋

@porridge
Copy link
Member

porridge commented Aug 5, 2024

I hope there is a library we can use to be compatible with kubectl w.r.t. translation of the command line flag value to the actual headers that the client needs to send?

Otherwise (if we do the translation by hand) it would be a shame to become subtly incompatible over time.

@logan-bobo
Copy link
Contributor Author

I hope there is a library we can use to be compatible with kubectl w.r.t. translation of the command line flag value to the actual headers that the client needs to send?

I agree we should be able to use k8s.io/cli-runtime/pkg/genericclioptions to add a set of generic kubectl flags that can generate a rest config to use with client-go

@porridge
Copy link
Member

porridge commented Aug 5, 2024

Sounds good! It would be awesome if you could contribute this feature!

@logan-bobo
Copy link
Contributor Author

@porridge I believe we can also now close this one out.

@porridge
Copy link
Member

Done in #549

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants