When using impersonation user information and permissions not preserved when switching context #2969
Closed
Description
Describe the bug
When using impersonation via the --as
option the authentication information is apparently not carried over when switching context. As best I can tell k9s seems to fall back to my default user when switching context.
To Reproduce
Steps to reproduce the behavior:
- Set up two contexts/clusters
- Set up two users in both
- Give user-1 edit permissions for context-1 and view permissions in context-2
- Give user-2 permissions to impersonate user-1 and view access
- Start k9s with
k9s --context context-2 --as user1
as user-2 - Switch context to context-1
- Try to edit a resource user-1 has permissions for
Expected behavior
When switching context, I expect the active user and its permissions to be preserved.
Versions (please complete the following information):
- OS: Fedora Workstation
- K9s: 0.32.6
- K8s: 1.30.5