Skip to Content
Open Beta — managed Kubernetes, DNS & more are live.
🎟️

Application credentials

Updated 2026-11-20
On this page

Application credentials

Application credentials let scripts, CI pipelines and tools authenticate to the Patrii Cloud API without your personal password. Create a scoped credential per integration and revoke it independently.

An application credential is a long-lived identity made of an ID and a secret. It is scoped to the current project and carries a set of roles, so a script acts with exactly the permissions you grant, not your full personal access. Application credentials bypass interactive multi-factor prompts, which is what makes them suitable for automation.

The secret is shown only once, at creation. You store it in your CI or on the machine that runs the script, and use it to obtain API tokens. If a credential is no longer needed or may have leaked, you revoke just that credential, without changing your password or disturbing other integrations.

Screenshot — The Application Credentials page listing credentials with their ID, roles and expiry
The Application Credentials page listing credentials with their ID, roles and expiry

Key concepts

Application credential — An ID plus secret used by automation to authenticate to the API.

Secret — The confidential half, shown once at creation and never retrievable again.

Scope — The project the credential is bound to; it cannot act outside that project.

Roles — The permissions the credential carries, which can be narrower than your own.

Expiry — An optional date after which the credential stops working.

Before you start

  • The project the automation should act in is the active project.
  • A place to store the secret securely (a CI secret store or secrets vault).
  • A name for the credential that identifies its integration.

Step by step

  1. Open application credentials

    Open your account, or a project's actions menu, and go to Application credentials.

    Screenshot — The Application Credentials page with the Create button
    The Application Credentials page with the Create button
  2. Create a credential

    Give it a descriptive name (for example my-ci-pipeline), an optional description, and an optional expiry date.

    Screenshot — The Create Application Credential dialog
    The Create Application Credential dialog
  3. Copy the secret once

    The credential ID and secret are shown once. Copy them, or download the .env file, and store them in your CI secret store. The secret is not shown again.

    Screenshot — The credential-created dialog with the one-time secret and Download .env button
    The credential-created dialog with the one-time secret and Download .env button
  4. Use it in automation

    Set the ID and secret as environment variables where your script or pipeline runs, then call the API or CLI with them.

  5. Revoke when done

    Delete the credential when the integration is retired or if the secret may be exposed. Any tokens issued from it stop working.

Examples

Use a credential with the Patrii CLI
export PATRII_APP_CREDENTIAL_ID=<credential-id>
export PATRII_APP_CREDENTIAL_SECRET=<credential-secret>
patrii server list
Use the same credential with Terraform
# The Terraform provider reads differently named variables
export PATRII_APPLICATION_CREDENTIAL_ID=<credential-id>
export PATRII_APPLICATION_CREDENTIAL_SECRET=<credential-secret>
terraform plan
Exchange the credential for an API token
curl -X POST https://api.patrii.cloud/auth/app-credential-login \
  -H 'Content-Type: application/json' \
  -d '{"credential_id": "<id>", "credential_secret": "<secret>"}'

Limits & specifications

Application credential fields:

FieldMeaning
NameIdentifies the integration; letters, numbers, dashes and underscores.
Credential IDThe non-secret identifier used to log in.
SecretThe confidential half, shown once at creation.
RolesThe permissions the credential carries in its project.
ExpiresOptional expiry; blank means it does not expire on its own.

Best practices

  • Create one credential per integration so you can revoke them independently.
  • Set an expiry so forgotten credentials do not live forever.
  • Store the secret in a CI secret store or the secrets vault, never in the repository.
  • Grant only the roles the automation needs, not your full access.
  • Revoke immediately on any suspicion of exposure; it does not affect your password.

FAQ

I lost the secret. Can I see it again?
No. The secret is shown once at creation and cannot be retrieved afterward. Delete the credential and create a new one, then update your automation with the new values.
How is this different from my password?
An application credential is scoped to one project, can carry narrower roles, bypasses interactive MFA for automation, and can be revoked on its own without changing your password.
What happens to running jobs when I delete a credential?
Tokens obtained from that credential are invalidated, so jobs relying on it will fail to authenticate. Rotate to a new credential before deleting the old one to avoid an interruption.

Learn more

Everything you can do here in the console is also available through the Patrii Cloud API for automation and scripting.

Was this article helpful?
Thank you for your feedback. Still stuck? Contact us