> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iru.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Jenkins

> Connect Jenkins to Iru Compliance using HTTP Basic Auth with a username and API token to collect job configuration, build history, and plugin evidence.

### About Jenkins

Iru calls the Jenkins remote API with **HTTP Basic** authentication: **username** plus an **API token** as the **password** (preferred over a real password). The wizard first stores **`jenkins_host`** (hostname and optional context path only), then collects credentials.

### How It Works

```http theme={null}
Authorization: Basic base64(username:api_token)
```

| Detail             | Value                    |
| ------------------ | ------------------------ |
| **Category**       | CI/CD                    |
| **Authentication** | Basic (user + API token) |

Official references: [Scripted clients](https://www.jenkins.io/doc/book/system-administration/authenticating-scripted-clients/), [API tokens](https://www.jenkins.io/blog/2018/07/02/new-api-token-system/), [Remote API](https://www.jenkins.io/doc/book/using/remote-access-api/).

### Prerequisites

* Jenkins reachable from **Iru’s network** (firewall / VPN / allowlist as needed).
* A user with **Overall/Read** and job-level **read** access for the scope you audit.
* **HTTPS** strongly recommended for the controller.

### Connect Jenkins to Iru

<Tabs>
  <Tab title="Jenkins">
    <Note>
      Complete this tab before you connect the source in Compliance.
    </Note>

    <Steps>
      <Step title="Sign in to Jenkins">
        Open your Jenkins controller URL and sign in with a user who has at least **Overall/Read** and the job read access your compliance scope needs.
      </Step>

      <Step title="Open your user profile">
        Click your **username** in the upper-right (or the **People** link, then your user), depending on your Jenkins theme.
      </Step>

      <Step title="Open Configure">
        Select **Configure** for your user account so you can edit personal settings.
      </Step>

      <Step title="Open the API Token section">
        Scroll to the **API Token** section (or **API Token** / **Add new Token**, depending on Jenkins version). If you do not see it, your administrator may restrict token creation.
      </Step>

      <Step title="Create a new token">
        Choose **Add new Token**, enter a name such as **Iru Compliance**, then select **Generate** (or **Create**). Copy the token **once** when Jenkins shows it.

        Optional **expiry** may apply; Jenkins also surfaces aging tokens in the UI so you can rotate before they lapse.
      </Step>
    </Steps>

    <Note>
      Continue on the [**Iru Compliance**](#iru-compliance) tab.
    </Note>
  </Tab>

  <Tab title="Iru Compliance">
    <Note>
      Finish the [**Jenkins**](#jenkins) tab first.
    </Note>

    <Steps>
      <Step title="Open Sources">
        In Iru Compliance, on the left navigation bar, expand **Compliance** and select **Sources**.

        <Frame>
          <img src="https://mintcdn.com/iru/7HsGH7lnQ8GpVmI0/assets/media/images/iru-navigation-compliance-sources.png?fit=max&auto=format&n=7HsGH7lnQ8GpVmI0&q=85&s=595982441fd777b333b3ecfea24adc24" alt="Left navigation: Compliance expanded, Sources selected" width="424" height="1056" data-path="assets/media/images/iru-navigation-compliance-sources.png" />
        </Frame>
      </Step>

      <Step title="Turn on Jenkins">
        Find **Jenkins** (set **Category** to **Developer tools** or use **Search by name or description**). On that card, turn on the **toggle**. A browser tab or window may open for the connector wizard.
      </Step>

      <Step title="Enter Jenkins host">
        Enter **`jenkins_host`** as **`jenkins.example.com`** or **`jenkins.example.com/jenkins`** (**without** `https://`). Confirm server variables.
      </Step>

      <Step title="Enter Jenkins credentials">
        Enter **username** and paste the **API token** into the password field.
      </Step>

      <Step title="Finish the connection">
        Click **Submit Credentials**. When the connection succeeds, the wizard shows **Connection Configured**.
      </Step>

      <Step title="Confirm the source is Active">
        Close the **Iru is requesting access to external services** browser tab, then return to **Compliance** → **Sources** and confirm the **Jenkins** card is **Active**.
      </Step>
    </Steps>
  </Tab>
</Tabs>

### Troubleshooting

<AccordionGroup>
  <Accordion title="Nothing opens when you turn the source on">
    Check **pop-up blocker** settings for the Iru site and try again.
  </Accordion>

  <Accordion title="Server variables failed">
    Toggle source off/on for a fresh wizard session.
  </Accordion>

  <Accordion title="401 / 403">
    Correct user/token; user needs **read** permissions on target jobs.
  </Accordion>

  <Accordion title="Unreachable">
    Routing, TLS, VPN, or allowlist for Iru egress.
  </Accordion>

  <Accordion title="Wrong host string">
    Include context path if Jenkins is not at domain root.
  </Accordion>
</AccordionGroup>

### Considerations

<CardGroup cols={2}>
  <Card title="Use a read-only service user scoped to the folders…" icon="circle-info">
    Use a **read-only** service user scoped to the folders or views you need.
  </Card>
</CardGroup>

### Related Articles

<CardGroup cols={2}>
  <Card title="Sources Management" icon="plug" href="/en/compliance/sources-management">
    Browse and manage every Compliance source.
  </Card>

  <Card title="Getting Started With Compliance" icon="rocket" href="/en/compliance/getting-started-with-compliance">
    Frameworks, actions, and **Artifacts**.
  </Card>

  <Card title="Iru Overview" icon="layer-group" href="/en/iru/platform-overview/iru-overview">
    How Endpoint, Compliance, and Identity fit together.
  </Card>

  <Card title="Artifacts Management" icon="folder-open" href="/en/compliance/artifacts-management">
    Upload, review, and organize evidence from sources and actions.
  </Card>
</CardGroup>
