---
title: "Machine identities"
description: "The Infisical logins your machine and your GitHub runners authenticate as, and how many you get."
canonical_url: "https://nuxtstart.com/docs/configuration/machine-identities"
---

> Index of every page on this site: [llms.txt](https://nuxtstart.com/llms.txt)

A machine identity is a login, not a project. It lives under **Organization** > **Access Control** >
**Machine Identities**, and it is how anything that is not a person signs in to Infisical.

Your project needs three, and one of them you may already have.

<table>
<thead>
  <tr>
    <th>
      Identity
    </th>
    
    <th>
      Authenticates
    </th>
    
    <th>
      Signs in with
    </th>
    
    <th>
      Shared across projects
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Your machine
    </td>
    
    <td>
      local development
    </td>
    
    <td>
      Universal Auth
    </td>
    
    <td>
      <strong>
        Yes
      </strong>
      
       — one per person, not per project
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GH PRs
      </code>
    </td>
    
    <td>
      pull request builds
    </td>
    
    <td>
      OIDC
    </td>
    
    <td>
      No — bound to one repository
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GH Push
      </code>
    </td>
    
    <td>
      push deploys
    </td>
    
    <td>
      OIDC
    </td>
    
    <td>
      No — bound to one repository
    </td>
  </tr>
</tbody>
</table>

<warning>

Infisical Free allows **five identities per organization**, and its own definition counts humans as
well as machines. Two of the three above are per repository, so a second project costs two more
slots. Plan for that before you start rather than at your first deploy.

</warning>

## Why two of them cannot be shared

Your machine identity is you. You already reach every project you own, so lending it to another one
of your own projects crosses no boundary.

The two GitHub identities are not machines. A runner is created and destroyed per job. What the
identity represents is *code running in one repository on one event*, which is why its OIDC subject
names the repository:

```text
repo:<owner>/<repo>:ref:refs/heads/{main,development,staging}
```

Share one across two repositories and anyone who can push a branch to either can read the other's
secrets, production included — a workflow runs the file as that branch writes it.

## Do you already have these?

Check **Organization** > **Access Control** > **Machine Identities** before creating anything. A
second project reuses your machine identity and needs only the two GitHub ones.

## Your machine

One per person, not per project. Create it once, then add it to each project you work on.

<steps level="3">

### Create it

Go to **Organization** > **Access Control** > **Machine Identities**, select **Create**, and name it
after the machine — `John Mac`, `alice-thinkpad`. Leave the organization role at **member**; it only
ever reads secrets inside projects.

### Add a client secret

On its page, select **Add Client Secret**. Infisical shows the **Client ID** and the **Client
Secret**, and the client secret appears once.

### Add it to each project

In every application project, go to **Project** > **Access Control** > **Machine Identities** >
**Add Machine Identity to Project**, and set the **Role** to **Viewer**. Repeat this for a second
project rather than creating a second identity.

### Connect your machines

The same pair goes in every gitignored `.env.local`, in every project:

```env [.env.local]
INFISICAL_CLIENT_ID=<your client ID>
INFISICAL_CLIENT_SECRET=<your client secret>
```

</steps>

[Universal Auth](https://infisical.com/docs/documentation/platform/identities/universal-auth) covers
the mechanism.

## `GH PRs` and `GH Push`

Two per repository. A runner sets no client pair, falls through to OIDC, and the varlock plugin
fetches GitHub's token and exchanges it — so nothing long-lived is stored in your repository.

Create both the same way: **Create** an identity, then **Add Auth Method** > **OIDC Auth**. Where
one organization holds more than one project, prefix the names, since identity names are
organization-wide.

**Read the subject prefix off GitHub rather than typing it.** GitHub decides the first half of the
subject, and it is not always `repo:<owner>/<repo>`:

```shell
# Prints the exact prefix GitHub puts in every OIDC token for this repository
gh api /repos/<owner>/<repo>/actions/oidc/customization/sub --jq .sub_claim_prefix
```

A repository created after 15 July 2026 gets an immutable prefix carrying the owner and repository
IDs — `repo:acme@310036262/store@1317816270` — so that renaming either one does not break
authentication, and a deleted repository recreated under the same name inherits nothing. An older
repository prints the plain `repo:<owner>/<repo>`. Use whichever that command returns, and append the
event part below to it.

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      <code>
        GH PRs
      </code>
    </th>
    
    <th>
      <code>
        GH Push
      </code>
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      OIDC Discovery URL
    </td>
    
    <td>
      <code>
        https://token.actions.githubusercontent.com
      </code>
    </td>
    
    <td>
      same
    </td>
  </tr>
  
  <tr>
    <td>
      Issuer
    </td>
    
    <td>
      <code>
        https://token.actions.githubusercontent.com
      </code>
    </td>
    
    <td>
      same
    </td>
  </tr>
  
  <tr>
    <td>
      Subject
    </td>
    
    <td>
      <code>
        <prefix>:pull_request
      </code>
    </td>
    
    <td>
      <code>
        <prefix>:ref:refs/heads/{main,development,staging}
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Audiences
    </td>
    
    <td>
      <code>
        https://github.com/<owner>
      </code>
    </td>
    
    <td>
      same
    </td>
  </tr>
  
  <tr>
    <td>
      Access Token TTL
    </td>
    
    <td>
      <code>
        1800
      </code>
    </td>
    
    <td>
      same
    </td>
  </tr>
  
  <tr>
    <td>
      Access Token Max TTL
    </td>
    
    <td>
      <code>
        3600
      </code>
    </td>
    
    <td>
      same
    </td>
  </tr>
  
  <tr>
    <td>
      Organization role
    </td>
    
    <td>
      <strong>
        member
      </strong>
    </td>
    
    <td>
      same
    </td>
  </tr>
</tbody>
</table>

Then grant each one read on the folder its runs need, through **Project** > **Access Control** >
**Machine Identities** > **Add Machine Identity to Project**:

<table>
<thead>
  <tr>
    <th>
      Identity
    </th>
    
    <th>
      Reads
    </th>
    
    <th>
      Because
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        GH PRs
      </code>
    </td>
    
    <td>
      <code>
        development:/preview
      </code>
    </td>
    
    <td>
      every pull request is the <code>
        preview
      </code>
      
       context
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GH Push
      </code>
    </td>
    
    <td>
      <code>
        development:/development
      </code>
      
      , <code>
        staging:/
      </code>
      
      , <code>
        production:/
      </code>
    </td>
    
    <td>
      a push deploys its branch's Runtime Context
    </td>
  </tr>
</tbody>
</table>

`GH Push` needs `development` as well as the other two, because a push to the `development` branch is
the most frequent deploy and authenticates as this identity.

Each identity's **ID** — not its client secret, which OIDC never issues — becomes a repository
variable in
[The secret and the variables](https://nuxtstart.com/docs/getting-started/deploying-development#the-secret-and-the-variables):
`INFISICAL_GH_PRS_IDENTITY_ID` and `INFISICAL_GH_PUSH_IDENTITY_ID`.

The subject field accepts glob patterns, where `*` matches any characters including `:` and `/`.

<caution>

The subject is what binds an identity to your repository, and a wrong one fails as
`403 Access denied: OIDC subject not allowed` — the same message whether the prefix, the event part
or the whole value is wrong. Check the prefix with the command above before changing anything else.
Widen the subject to cover a second repository and that repository can read this one's secrets.

</caution>

[OIDC authentication for GitHub](https://infisical.com/docs/documentation/platform/identities/oidc-auth/github)
covers Infisical's side.

## Next steps

- [Set up your secret store](https://nuxtstart.com/docs/configuration/secret-store) — the projects these identities read
- [Connect the repository to Cloudflare](https://nuxtstart.com/docs/getting-started/deploying-development#connect-the-repository-to-cloudflare)
— where the two identity IDs are registered
- [Environment values](https://nuxtstart.com/docs/reference/environment-values#how-each-context-authenticates) — which run
picks which identity

## Sitemap

See the full [sitemap](https://nuxtstart.com/sitemap.md) for all pages.
