For the complete documentation index, see llms.txt. This page is also available as Markdown.

Requesting Argo CD access

How to request a just-in-time Argo CD role, on a whole instance or on one project, via P0

The Argo CD integration is in beta. Functionality and configuration may change.

Request a just-in-time Argo CD role through P0. You can request a global role, which applies to the whole Argo CD instance, or a role that one Argo CD project defines. When your request is approved, P0 gives your SSO user the role. When access ends, P0 takes it away.

You sign in to Argo CD through your organization's SSO, with the same email as your P0 account. Your email's domain must be one your organization allows for Argo CD.

Requesting from the P0 CLI

To request a global role:

p0 request argocd global-role <role> [--instance <instance-id>]

To request a role on one project:

p0 request argocd project-role <project> <role> [--instance <instance-id>]
Argument
Description

<role>

The role you need. See Roles.

<project>

The project's name in Argo CD.

--instance <instance-id>

The Argo CD instance, by its ID or label in P0. Optional when P0 is installed on only one Argo CD instance.

For example, to request role:readonly on the instance prod:

p0 request argocd global-role role:readonly --instance prod --reason "Check the payments rollout"

To request the deployer role on the payments project:

p0 request argocd project-role payments deployer --instance prod --reason "Sync the hotfix"

Requesting from Slack or the P0 app

In Slack, the same commands work as slash commands, such as /p0 request argocd global-role <role>. To fill in a form instead, type /p0 request in Slack, or click Request Access on the Access Management page of the P0 app, then select Argo CD and the kind of access:

  • Global role: choose the Argo CD instance and the Role.

  • Project role: choose the Argo CD instance, the Project and the Role.

When P0 is installed on more than one Argo CD instance, the form lists projects and roles once you've chosen the instance, and a project's roles once you've chosen the project.

For every way to request access, see Requesting access.

Roles

Global roles

You can request Argo CD's built-in roles, role:readonly and role:admin, and any role your organization's Argo CD policy defines. The request form lists them. You can leave out the role: prefix: admin is the same request as role:admin.

Two roles are never offered: the role every user already holds by default, and the role of the account P0 uses to make changes.

Project roles

You can request any role a project defines, such as deployer. Name it as the project does, without the proj:<project>: prefix that Argo CD's policy uses. What each role allows is up to your organization: ask your Argo CD admin.

Roles you already hold

P0 refuses a request for a role you already hold. It checks:

  • lines in your organization's Argo CD policy that name your email,

  • a project role's groups, where a group is your email,

  • the role every user holds by default,

  • roles that one of those gives you through another role.

A broader role doesn't count. If you hold role:admin, you can still request role:readonly.

P0 can't see the groups your identity provider puts you in. If you hold a role through such a group, P0 still grants it, and you keep the role through the group when the grant ends.

One request per role

You can have one open request at a time for each role on an instance, and for a project role, on each project. Requests count whoever made them, so a request that someone else made for you counts too. P0 refuses a new request for the same role while an earlier one is approved or active, or while P0 couldn't finish an earlier one's grant or revoke. If two requests for the same role are pending, the second one approved fails.

Requests for different roles don't affect each other. You can hold role:readonly and a project role at the same time, through two requests.

When your access ends

When your access expires, or you or an approver end it early, P0 removes the line that gave you the role. Other ways you hold the role, such as a group, stay as they are.

If someone already removed the line, for example through a change to Argo CD's configuration, you lost the access then, and the request ends normally. P0 doesn't put a removed line back. Request again if you still need the role.

Troubleshooting

Message
What to do

<email> isn't in an email domain this Argo CD connector allows.

Your organization hasn't allowed your email's domain for Argo CD access. Ask your P0 admin.

P0 is installed on more than one Argo CD instance, so name the instance to request it on.

Add --instance <instance-id> to the request.

P0 isn't installed on an Argo CD instance with the id or label <instance>.

Check the instance's ID. Your P0 admin can tell you the IDs of the installed instances.

Name an Argo CD role, such as role:readonly or admin.

The role you typed can't be an Argo CD role name. Check its spelling.

P0 can't find the role <role> on the Argo CD instance <instance>.

The instance has no role by that name that P0 can grant. Check the role's spelling, or pick one from the request form.

Name an Argo CD project, such as default: lowercase letters, digits, hyphens and dots.

The project you typed can't be an Argo CD project name. Check its spelling.

P0 can't find the project <project> on the Argo CD instance <instance>.

Check the project's spelling, and that you named the right instance. If you see it when access is granted, the project was deleted after you requested it.

Name a role the project defines, such as deployer: letters, digits, hyphens and underscores.

Name the project role by its own name, such as deployer, not proj:payments:deployer.

P0 can't find the role <role> on the project <project> on the Argo CD instance <instance>.

The project doesn't define that role. Pick one from the request form, or ask your Argo CD admin to add it to the project.

P0 never grants <role>, the Argo CD connector's own role.

The role belongs to the account P0 uses to make changes. Request another role.

<email> isn't an email P0 can grant an Argo CD role to.

Your P0 email can't be written into Argo CD's policy, for example because it has a comma or a space. Ask your P0 admin.

<role> is the default role on the Argo CD instance <instance>, which every user holds already.

You already have this role. You don't need to request it.

This principal already has this access

You already hold the role you requested. See Roles you already hold.

<email> already holds <grant> outside P0, so P0 won't grant it: revoking it would take away access P0 didn't give.

Someone gave you the role after you made the request. You don't need it from P0.

P0 already manages your access to <grant>. Revoke your previous request and try again.

You already have a request for this role. Relinquish it, or wait for it to end, then request again.

P0 couldn't finish your previous request for <grant>. Ask an admin to fix it in Argo CD and close that request in P0, then request again.

An earlier request for this role failed, and you may still hold the role. An admin removes your line from Argo CD's policy and closes that request. Then request again.

P0 couldn't finish removing your previous access to <grant>. Ask an admin to fix it in Argo CD and finish the revoke in P0, then request again.

An admin follows Error messages for admins for the earlier request's error, which usually ends with Retry revoke. Then request again.

For messages that ask for your P0 admin, see Error messages for admins.

Last updated