> ## 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.

# Bitbucket Cloud

> Connect Bitbucket Cloud to Iru Compliance with an Atlassian API token using HTTP Basic auth to collect workspace, repository, and pull request review evidence.

### About Bitbucket Cloud

The **Bitbucket Cloud** connector collects **repository**, **workspace**, **project**, and **team** metadata your audits expect around change management and access reviews. Iru authenticates with **HTTP Basic Auth**: your **Atlassian account email** as the username and an **Atlassian API token** as the password (plain passwords are rejected).

### How It Works

Clients send Base64-encoded credentials:

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

Atlassian is **deprecating app passwords** - create **API tokens** for new work and migrate anything still using legacy secrets before they sunset.

| Detail             | Value                          |
| ------------------ | ------------------------------ |
| **Category**       | Developer tools                |
| **Authentication** | Basic auth (email + API token) |

Documentation: [Manage API tokens](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/), [Bitbucket API tokens](https://support.atlassian.com/bitbucket-cloud/docs/create-an-api-token/), [REST intro](https://developer.atlassian.com/cloud/bitbucket/rest/intro/).

### Prerequisites

* Access to Bitbucket **workspaces** you expect evidence from.
* Permission to create **API tokens** on your Atlassian ID.

### Connect Bitbucket Cloud to Iru

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

    <Steps>
      <Step title="Open Atlassian account settings">
        While signed in to Bitbucket Cloud (or any Atlassian app in the same Atlassian account), select your **profile icon**, then **Account settings** (sometimes labeled **Atlassian account**).
      </Step>

      <Step title="Open Security and API tokens">
        Choose **Security**, then **Create and manage API tokens** (wording may read **API tokens**).
      </Step>

      <Step title="Create a scoped API token">
        Select **Create API token with scopes** (or the closest equivalent). You are creating an Atlassian API token Bitbucket will accept for Basic auth in Iru.
      </Step>

      <Step title="Configure the token">
        Give the token a label (for example **Iru Compliance**). Choose an expiry (tokens last up to **365 days**). Grant **read** scopes on repositories, workspaces, and teams so they align with what your controls reference.
      </Step>

      <Step title="Copy the token">
        Create the token and copy the value **immediately**; Atlassian shows it once. You will use it with your Atlassian email in Iru’s **Submit Credentials** step.
      </Step>
    </Steps>

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

  <Tab title="Iru Compliance">
    <Note>
      Finish the [**Bitbucket Cloud**](#bitbucket-cloud) 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 Bitbucket">
        Find **Bitbucket** (use **Category** or **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 Basic authentication">
        When the wizard asks for Basic authentication, enter your **Atlassian email** as the username and the **API token** as the password.
      </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 **Bitbucket** 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="401 Unauthorized">
    Use **email + API token**, not Bitbucket username and not your Atlassian password.
  </Accordion>

  <Accordion title="Expired token">
    Mint a new token under Account settings and update Iru.
  </Accordion>

  <Accordion title="Missing workspaces">
    Ensure the Atlassian account belongs to every workspace you expect data from.
  </Accordion>

  <Accordion title="Legacy app passwords">
    Replace with API tokens - app passwords are deprecated.
  </Accordion>
</AccordionGroup>

### Considerations

<CardGroup cols={2}>
  <Card title="Tokens expire: calendar reminders prevent silent…" icon="circle-info">
    Tokens expire - calendar reminders prevent silent outages.
  </Card>

  <Card title="Read scopes keep Iru from mutating repos or pull…" icon="shield">
    Read scopes keep Iru from mutating repos or pull requests.
  </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>
