Skip to main content
A Jenkins connection authenticates Infisical to Jenkins with a user’s API token, so Infisical can list your folders and manage the credentials that your pipelines read.
This guide only authenticates Infisical with Jenkins. Once the app connection is ready, you can use it to set up integrations.

Prerequisites

  • A Jenkins user with the following permissions:
    • Overall/Read
    • Credentials/View, Credentials/Create, Credentials/Update, and Credentials/Delete, either across Jenkins or on each folder you plan to sync to
    • Job/Read on each folder you plan to sync to and on every folder that contains it
  • If your Jenkins instance isn’t reachable from the internet, a Gateway with network access to it

Step 1: Generate a Jenkins API token

Infisical needs an API token for the Jenkins user that has the permissions in the prerequisites.
1
Log in to Jenkins as the user from the prerequisites. Select your name in the top-right corner, then select Security. On older Jenkins versions, select Configure instead.
2
Under API Token, select Add new Token, enter a name that identifies the token, such as infisical, then select Generate.
Use an API token, not the user’s password. Infisical can’t create a connection that uses a password.
3
Copy the token and store it securely. Jenkins shows it only once.

Step 2: Create the app connection

Next, create the app connection in Infisical.
To create the connection using the API, use the Jenkins Create endpoint. If the instance isn’t reachable from the internet, include the ID of a Gateway that can reach it as gatewayId, or the ID of a Gateway pool as gatewayPoolId.
1
In the sidebar, select Integrations, then open the App Connections tab.App Connections Tab
2
Select Add Connection and choose Jenkins.
3
Fill out the form’s fields:
  • Name: A descriptive name for the connection; it must be slug-friendly
  • Description (optional): A note for future reference
  • Gateway: The Gateway or Gateway pool to route requests through if your Jenkins instance isn’t reachable from the internet; otherwise leave it as Internet Gateway
  • Method: API Token, the only method the connection supports
  • Jenkins Instance URL: The URL of your Jenkins instance, including the path Jenkins is served under if it has one, such as https://ci.example.com/jenkins
  • Jenkins Username: The username of the Jenkins user that owns the API token
  • Jenkins API Token: The token you copied when generating a Jenkins API token
Then, select Connect to Jenkins.
When you submit the form, Infisical checks that Jenkins accepts the username and token and that the user has the Overall/Read permission.
Your Jenkins app connection is ready to use.

Step 3: Configure integrations

Now that your Jenkins app connection is configured, you can use it to set up the following integration:

Jenkins sync

Sync secrets from Infisical to Jenkins credentials.