---
title: Ansible Tower / AWX
---

## What is Tower

From https://docs.ansible.com/ansible/2.5/reference_appendices/tower.html

:::note
Ansible Tower (formerly ‘AWX’) is a web-based solution that makes Ansible even more easy to use for IT teams of all kinds. It’s designed to be the hub for all of your automation tasks.

Tower allows you to control access to who can access what, even allowing sharing of SSH credentials without someone being able to transfer those credentials. Inventory can be graphically managed or synced with a wide variety of cloud sources. It logs all of your jobs, integrates well with LDAP, and has an amazing browsable REST API. Command line tools are available for easy integration with Jenkins as well. Provisioning callbacks provide great support for autoscaling topologies.
:::

:::note
AWX is the open-source version of Tower. The term "AWX" will be used interchangeably throughout this document.
:::

## Preparation

The following placeholders will be used:

-   `awx.company` is the FQDN of the AWX/Tower install.
-   `authentik.company` is the FQDN of the authentik install.

Create an application in authentik and note the slug, as this will be used later. Create a SAML provider with the following parameters:

-   ACS URL: `https://awx.company/sso/complete/saml/`
-   Audience: `awx`
-   Service Provider Binding: Post
-   Issuer: `https://awx.company/sso/metadata/saml/`

You can of course use a custom signing certificate, and adjust durations.

## AWX Configuration

Navigate to `https://awx.company/#/settings/auth` to configure SAML. Set the Field `SAML SERVICE PROVIDER ENTITY ID` to `awx`.

For the fields `SAML SERVICE PROVIDER PUBLIC CERTIFICATE` and `SAML SERVICE PROVIDER PRIVATE KEY`, you can either use custom certificates, or use the self-signed pair generated by authentik.

Provide metadata in the `SAML Service Provider Organization Info` field:

```json
{
    "en-US": {
        "name": "authentik",
        "url": "https://authentik.company",
        "displayname": "authentik"
    }
}
```

Provide metadata in the `SAML Service Provider Technical Contact` and `SAML Service Provider Technical Contact` fields:

```json
{
    "givenName": "Admin Name",
    "emailAddress": "admin@company"
}
```

In the `SAML Enabled Identity Providers` paste the following configuration:

```json
{
    "authentik": {
        "attr_username": "urn:oid:2.16.840.1.113730.3.1.241",
        "attr_user_permanent_id": "urn:oid:0.9.2342.19200300.100.1.1",
        "x509cert": " ",
        "url": "https://authentik.company/application/saml/awx/login/",
        "attr_last_name": "User.LastName",
        "entity_id": "https://awx.company/sso/metadata/saml/",
        "attr_email": "urn:oid:0.9.2342.19200300.100.1.3",
        "attr_first_name": "urn:oid:2.5.4.3"
    }
}
```

`x509cert` is the certificate configured in authentik. Remove the `--BEGIN CERTIFICATE--` and `--END CERTIFICATE--` headers, then enter the cert as one non-breaking string.
