# Jenkins

### Overview

The Veza integration for Jenkins enables the discovery of users, groups, roles, and permissions. Once configured, Veza uses Jenkins APIs to populate the Access Graph with entities and metadata. The integration supports project-based Matrix Authorization and role-based access controls, including group-based role assignments from the role-strategy-plugin.

To enable the integration:

### Jenkins Setup

Create a user and API token for the Veza integration:

1. Create a Jenkins user for the integration. Log in to Jenkins and go to **Dashboard → Manage Jenkins → Users → Create User**. Enter the name, password, and email-address and save your changes.
2. Assign them a role with the **Overall Read** permission under **Manage Jenkins** > **Manage and Assign Roles**.
3. Get an API token for the user. Browse to your Jenkins instance, log in and go to **(Your Username) > Configure > API Token**.
4. Click **Add New Token**. Give the token a name and save the value.

### Veza Setup

Add the integration to Veza:

1. Browse to your Veza instance and log in.
2. Go to **Integrations**.
3. Click **Add Integration**. Select **Jenkins** as the integration to add. Click **Next**.
4. Complete the required fields:
   * Jenkins Token: the token you created for the integrations.
   * URL: URL of the Jenkins environment. Ensure the URL ends with a `/`.
   * Username: Integration user name.
5. Click **Save** to enable the integration.

### Supported Entities

ID and Name are collected for users, groups, and roles. Veza discovers and processes all permissions found in Jenkins, including custom permissions from plugins. Custom plugin permissions are automatically registered and categorized as "Uncategorized" type permissions.

#### Jenkins User

A Jenkins User represents an account with specific permissions and roles within the Jenkins automation server. This entity is subject to access control with varying levels of permissions, such as read, write, and execute, on different Jenkins resources.

| Property       | Description                                          |
| -------------- | ---------------------------------------------------- |
| `full_name`    | Full name for the user                               |
| `absolute_url` | URL for the user. The ID is part of the absolute URL |

#### Jenkins Role

A Jenkins Role is a set of capabilities assigned to Jenkins users or groups within Jenkins.

| Property      | Description                                                                                                                                                   |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Name`        | Name of the role                                                                                                                                              |
| `Type`        | Authorization type for the role. Supports USER (assigned to specific users), GROUP (assigned to groups), or EITHER (can be assigned to both users and groups) |
| `Permissions` | List of permissions associated with the role. Includes both standard Jenkins permissions and custom permissions from installed plugins                        |

#### Jenkins Group

A Jenkins Group represents a collection of users managed by Jenkins role-based access control. Groups are discovered when using the role-strategy-plugin with group-based role assignments.

| Property | Description                     |
| -------- | ------------------------------- |
| `Name`   | Name of the group               |
| `ID`     | Unique identifier for the group |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/integrations/jenkins.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
