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

# Creating a new connection

> Due to a limitation in our docs it has become confusing to figure out how to create a new connection. This guide will help you through the process.

Before you can create a new connection we need a few prerequisites: an API Key and an Organization.
For more information on these two items please review our quick start guide [here](intro/quick-start).

The last step of the quick start describes how to create a new connection, the POST body consists of:

1. `vendor` - The Enum of the vendor product you want to connect to.
2. `credentials` - The specific credential body for the vendor you are connecting to, this is not required for Oauth based connections.
3. `options` - (Optional) Any additional options you want to pass to the connection, each vendor has different options available.

Since creating a connection requires you to have the correct combination of vendor, credentials, and options in the correct combination we have provided examples of each below.

## VMS Connections

<Accordion title="Tenable">
  ```json theme={null}
  {
    "credentials": {
      "client_key": "<string>",
      "secret_key": "<string>"
    },
    "vendor": "TENABLE"
  }
  ```
</Accordion>

<Accordion title="Qualys">
  ```json theme={null}
  {
    "credentials": {
        "username": "test",
        "password": "pass",
    },
    "options": { # Optional not required
        "init_load_timestamp": "2021-01-01T00:00:00+00:00", # Timestamp to start the data pull from
    },
    "vendor": "QUALYS"
  }
  ```
</Accordion>

<Accordion title="InsightVM">
  ```json theme={null}
  {
    "credentials": {
      "base_url": "https://api.url.com",
      "api_key": "api_key"
    },
    "vendor": "INSIGHTVM"
  }
  ```
</Accordion>

<Accordion title="MS Defender VMS">
  ```json theme={null}
  {
    "vendor": "MS_DEFENDER_VMS",
    "options": { # Optional not required
      "oauth2_redirect_urls": { # Overried the default redirect to Leen's splash page'
        "success": "https://myapp.com/success",
        "error": "https://myapp.com/error"
      }
    }
  }
  ```

  More info on our OAuth flow can be found [here](/integrations/ms-defender-vms-credential)
</Accordion>

<Accordion title="SentinelOne VMS">
  ```json theme={null}
  {
    "credentials": {
      "base_url": "https://api.url.com",
      "api_token": "api_token"
    },
    "vendor": "SENTINELONE_VMS"
  }
  ```
</Accordion>

<Accordion title="CrowdStrike Spotlight">
  ```json theme={null}
  {
    "credentials": {
      "client_id": "client_id",
      "client_secret": "client_secret"
    },
    "vendor": "CROWDSTRIKE_SPOTLIGHT"
  }
  ```
</Accordion>

<Accordion title="AWS Inspector2">
  <Accordion title="Direct access">
    ```json theme={null}
    {
      "credentials": {
        "aws": {
          "aws_access_key_id": "access_key_id",
          "aws_secret_access_key": "secret_key",
          "aws_region_name": "us-east-1",
          "type": "direct_access"
        }
      },
      "vendor": "AWS_INSPECTOR2"
    }
    ```
  </Accordion>

  <Accordion title="Leen Role">
    ```json theme={null}
    {
      "credentials": {
        "aws": {
          "aws_role_arn": "role_arn",
          "external_id": "external_id",
          "aws_region_name": "us-east-1",
          "type": "leen_role"
        }
      },
      "vendor": "AWS_INSPECTOR2"
    }
    ```
  </Accordion>

  <Accordion title="Role Chaining">
    ```json theme={null}
    {
      "credentials": {
        "aws": {
          "aws_role_arn": "role_arn",
          "external_id": "external_id",
          "aws_region_name": "us-east-1",
          "type": "role_chaining"
        }
      },
      "vendor": "AWS_INSPECTOR2"
    }
    ```
  </Accordion>
</Accordion>

<Accordion title="Wiz VMS">
  ```json theme={null}
  {
    "credentials": {
      "base_url": "https://api.usxx.app.wiz.io",
      "client_id": "client_id",
      "client_secret": "client_secret"
    },
    "vendor": "WIZ_VMS"
  }
  ```
</Accordion>

## EDR Connections

<Accordion title="MS Defender Endpoint">
  ```json theme={null}
  {
    "vendor": "MS_DEFENDER_ENDPOINT",
    "options": { # Optional not required
      "oauth2_redirect_urls": { # Overried the default redirect to Leen's splash page'
        "success": "https://myapp.com/success",
        "error": "https://myapp.com/error"
      }
    }
  }
  ```

  More info on our OAuth flow can be found [here](/integrations/ms-defender-credential)
</Accordion>

<Accordion title="SentinelOne Endpoint">
  ```json theme={null}
  {
    "credentials": {
      "base_url": "https://api.url.com",
      "api_token": "api_token"
      },
      "vendor": "SENTINELONE"
  }
  ```
</Accordion>

<Accordion title="CrowdStrike Falcon">
  ```json theme={null}
  {
    "credentials": {
      "client_id": "client_id",
      "client_secret": "client_secret"
    },
    "vendor": "CROWDSTRIKE"
  }
  ```
</Accordion>

## AppSec Connections

<Accordion title="Snyk">
  ```json theme={null}
  {
      "vendor": "SNYK",
      "options": { # Optional not required
          "oauth2_redirect_urls": { # Overried the default redirect to Leen's splash page'
            "success": "https://myapp.com/success",
            "error": "https://myapp.com/error"
          }
      }
  }
  ```

  More info on our OAuth flow can be found [here](/integrations/snyk-credential)
</Accordion>

<Accordion title="Semgrep">
  ```json theme={null}
  {
    "vendor": "SEMGREP",
    "credentials": {
      "web_api_token": "web_api_token"
    }
  }
  ```
</Accordion>

<Accordion title="Aikido">
  ```json theme={null}
  {
    "vendor": "AIKIDO",
    "credentials": {
      "client_id": "client_id",
      "client_secret": "client_secret",
    }
  }
  ```
</Accordion>

<Accordion title="Wiz Code">
  ```json theme={null}
  {
    "credentials": {
      "base_url": "https://api.usxx.app.wiz.io",
      "client_id": "client_id",
      "client_secret": "client_secret"
    },
    "vendor": "WIZ_CODE"
  }
  ```
</Accordion>

<Accordion title="Checkmarx">
  ```json theme={null}
  {
    "credentials": {
      "base_url": "https://us.ast.checkmarx.net",
      "tenant_name": "tenant-name",
      "client_id": "client_id",
      "client_secret": "client_secret"
    },
    "vendor": "CHECKMARX"
  }
  ```
</Accordion>

<Accordion title="Mend.io">
  ```json theme={null}
  {
    "credentials": {
      "user_email": "user-email",
      "user_key": "user-key",
      "org_uuid": "org-uuid",
      "base_url": "https://api-saas.mend.io"
    }
    "vendor": "MEND"
  },
  ```
</Accordion>

## IDP Connections

<Accordion title="Okta">
  ```json theme={null}
  {
      "vendor": "OKTA",
      "credentials": {
        "org_url": "https://{your-tenant}.okta.com",
        "api_token": "api_token"
      }
  }
  ```
</Accordion>

<Accordion title="MS Entra">
  <Accordion title="OAuth2">
    ```json theme={null}
    {
      "vendor": "MS_ENTRA",
      "options": { # Optional not required
        "oauth2_redirect_urls": { # Overried the default redirect to Leen's splash page'
          "success": "https://myapp.com/success",
          "error": "https://myapp.com/error"
        }
      }
    }
    ```

    More info on our OAuth flow can be found [here](/integrations/ms-entra-idp-credential)
  </Accordion>

  <Accordion title="Secret">
    ```json theme={null}
    {
      "vendor": "MS_ENTRA",
      "credentials": {
        "client_id": "client_id",
        "client_secret": "client_secret",
        "tenant_id": "tenant_id"
      }
    }
    ```
  </Accordion>
</Accordion>

## TPRM Connections

<Accordion title="Black Kite">
  ```json theme={null}
  {
    "credentials": {
      "client_id": "client_id",
      "client_secret": "client_secret"
    },
    "vendor": "BLACK_KITE"
  }
  ```
</Accordion>

<Accordion title="BitSight">
  ```json theme={null}
  {
    "credentials": {
      "username": "<generated_api-token>"
    },
    "vendor": "BIT_SIGHT"
  }
  ```
</Accordion>

<Accordion title="SecurityScorecard">
  ```json theme={null}
  {
    "credentials": {
      "api_key": "<generated_api-token>"
    },
    "vendor": "SECURITY_SCORECARD",
  }
  ```
</Accordion>

<Accordion title="ProcessUnity">
  ```json theme={null}
  {
      "credentials": {
          "base_url": "https://{region}.processunity.net/{InstanceName}",
          "username": "<PU username>",
          "password": "<PU password>",
          "third_party_import_template_id": "<Int, Third Party Import Template ID>",
          "issues_import_template_id": "<Int, Issues Import Template ID>"
      },
      "vendor": "PROCESSUNITY",
      "options": {
          "connection_id": "<Leen connection id of source connection>"
      }
  }
  ```
</Accordion>
