Python: Impersonation support

Created on 16 Oct 2017  路  8Comments  路  Source: kubernetes-client/python

Does the Python client support User Impersonation[1]? I have been able to achieve it by setting the default headers with header_name and header_value on kubernetes.client.ApiClient but that doesn't seem like the best way to do this.

[1] https://kubernetes.io/docs/admin/authentication/#user-impersonation

Most helpful comment

@sniranjan yes but only through the mechanism I mentioned in my initial message:

from kubernetes import client as kclient
kclient.ApiClient(header_name='Impersonate-User', header_value='impersonated-user-name')

Not ideal, but it did meet my needs.

All 8 comments

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/remove-lifecycle rotten

/remove-lifecycle stale

@kincl Were you able to find a way to do this?

@sniranjan yes but only through the mechanism I mentioned in my initial message:

from kubernetes import client as kclient
kclient.ApiClient(header_name='Impersonate-User', header_value='impersonated-user-name')

Not ideal, but it did meet my needs.

Was this page helpful?
0 / 5 - 0 ratings