Skip to content

Missing run_as option for update_api_key #2842

@elri

Description

@elri

Summary:

As far as I can tell, the client is missing the feature run_as for updating an apikey.

Would like this an option, maybe as a list (run_as: list[str]) given as an argument to update_api_key

More details:

From the documentation (this is exactly the same for the API and the client):

To update another user’s API key, use the run_as feature to submit a request on behalf of another user.

According to Elastic API documentation on Submitting requests on behalf of other users this is done by adding on a header.

Example

curl -H "es-security-runas-user: jacknich" -u es-admin -X GET http://localhost:9200/

There is no option to add headers or run_as-usernames specifically when calling update_api_key though:

update_api_key(*, id, error_trace=None, expiration=None, filter_path=None, human=None, metadata=None, pretty=None, role_descriptors=None, body=None)

If I didn't miss how the client handles this, I suspect this feature to be unsupported for other functions as well (despite documentation saying otherwise)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions