Skip to content
Mementropy
Lab NotesHomelab notebookField note

Infisical rejected its own bootstrap token

The token was issued with no expiry. Traced to the container source; worked around with Universal Auth.

By Ryan Hammang

I bootstrapped the new Infisical instance through its admin API.

POST /api/v1/admin/bootstrap created the admin user, the organization and an instance admin identity. It returned a token. The very first call with that token got 401 Unauthorized.

We went into the container’s built code to find out why.

  • The bootstrap service signs its token with no expiresIn, so the token has no exp claim.
  • The token validator rejects tokens with no exp once a legacy-token cutoff date has passed. That date is in the past now.

So the server issues a token it will no longer accept.

The workaround:

  1. Mint an exp-stamped token for the instance admin identity inside the pod, to get unstuck.
  2. Turn on Universal Auth, client ID and client secret, for that identity. Its login path always signs tokens with an expiry.

After that, API calls worked.

I’m reporting what I saw in this version. I haven’t checked whether a newer Infisical release fixes it. I should look before I write this up as a recipe.

Has anyone else hit this with the bootstrap endpoint?

Recipes written later from this work: