Skip to content

kid field ignored in tenant YAML credentials for private_key_jwt client authentication #1466

Description

@divyeshkumarbalar-art

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this tool and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

When deploying a client with private_key_jwt authentication via the Auth0 Deploy CLI using a tenant YAML file, the kid field specified in the credentials block is ignored and a random kid is auto-generated instead.

auth0-deploy-cli: 8.42.0
node: 20.19.0

References:

Management API docs note: "If not specified, a kid value will be auto-generated." — confirming kid is a supported API field."auth0-deploy-cli": "8.42.0"

Expectation

Expected Behavior:
The kid value specified in the YAML should be used when creating the credential.

Actual Behavior:
A random kid is assigned to the credential on the tenant, ignoring the value provided in the YAML.

Reproduction

Steps to Reproduce:

Configure a client in tenant YAML with the following block:
client_authentication_methods:
private_key_jwt:
credentials:
- name: "My Public Key"
credential_type: "public_key"
kid: "MY_CUSTOM_KID_VALUE"
pem: "MY_PEM_CONTENT"
alg: "RS256"
Deploy using auth0 deploy via the Auth0 Deploy CLI.
Check the resulting credential on the tenant — the kid is auto-generated, not the specified value.
Workaround:
Using the Management API POST /clients/{client_id}/credentials directly correctly sets the kid as specified.

Deploy CLI version

8.42.0

Node version

20.19.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions