Remove the USER IMPERSONATE Permission from Your Roles

For the complete documentation index, see llms.txt. For a full content snapshot, see llms-full.txt. Append .md to any kestra.io/docs/* URL for plain Markdown.

Available on: Enterprise EditionCloud

Kestra 2.1.0 removes the IMPERSONATE action from the USER resource in the RBAC model. Impersonation is reserved to Instance Owners, and no role permission grants it.

In 2.0, the action didn’t let anyone impersonate from the UI or the impersonate endpoint, which were already Instance Owner only. It was only checked for API requests that send the X-Kestra-Impersonate header with basic authentication, and the managed Admin role held it, so a tenant admin could impersonate any user that way.

What changed

  • Role editor and managed roles: IMPERSONATE no longer appears in the role editor, and the managed Admin role no longer carries it.
  • Existing roles: no migration is needed. A stored role that still holds the action is read without it, and stays editable.
  • API: creating or updating a role with USER IMPERSONATE is rejected with a 422 error: Action UNKNOWN is not valid for resource USER.
  • X-Kestra-Impersonate header: a basic-auth request that sends the header now fails authentication unless the credentials belong to an Instance Owner.
  • Service accounts: Instance Owners can now impersonate a service account, from Instance IAM → Service Accounts or with POST /api/v1/users/{id}/impersonate.

If you followed the 2.0 RBAC migration and granted USER IMPERSONATE to some roles, remove it now.

For administration tasks that don’t need an Instance Owner, use a service account with its own role and API token.

Update role definitions

Terraform

A kestra_role that still lists the action fails to apply. Remove IMPERSONATE from the USER actions:

resource "kestra_role" "admin" {
name = "Platform admin"
resources {
type = "USER"
actions = ["VIEW", "LIST", "UPDATE", "MANAGE_GROUP_MEMBERSHIP"] # was: [..., "IMPERSONATE"]
}
}

kestractl and the API

kestractl roles create and roles update fail the same way. Remove IMPERSONATE from --permission flags and from the files passed to --permissions-file. Scripts that call the role API directly must remove it from their payloads too.

Was this page helpful?