# SAML Problem

**URL:** <https://forum.ansible.com/t/saml-problem/35580>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [August 4, 2021, 12:19pm UTC](https://forum.ansible.com/t/saml-problem/35580 "2021-08-04T12:19:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandru\_Luca](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@Alexandru\_Luca](https://forum.ansible.com/u/Alexandru_Luca)\
**Post date:** [August 4, 2021, 12:19pm UTC](https://forum.ansible.com/t/saml-problem/35580/1 "2021-08-04T12:19:01Z")

</div>

Hello,

I want to configure SAML Sign-on in AWX using Keycloak.  
But when I try to add the SOCIAL\_AUTH\_SAML\_SP\_PRIVATE\_KEY I get an error Invalid certificate or key  
The full error:  
**_{ “SOCIAL\_AUTH\_SAML\_SP\_PRIVATE\_KEY”: [“Invalid certificate or key: MIIEpQIBAAKCAQEAvw9FpFgsa5Trfgq540JsgEGPqWsnQCX1+XjguyNHHAof/IxzH2UyQ5vUUkjOpkQ1l0xRW1gdXDURH8osyXeC…”] }_**

I am using AWX 17.1.0 and using [http://awx/api/v2/settings/saml/](http://awx/api/v2/settings/saml/) to add the SAML configuration.

I have copied the Private Key, Certificate directly from the Keycloak client, so they match.

Do you have an idea?

Thanks!

---

<div class="post-metadata">

**Author:** ![GereG](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gereg/32/10252_2.png) [@GereG](https://forum.ansible.com/u/GereG)\
**Post date:** [May 25, 2022, 1:38am UTC](https://forum.ansible.com/t/saml-problem/35580/2 "2022-05-25T01:38:54Z")

</div>

Hi there,

Were you able to get this to work?  
Also, what documentation did you follow to set up the SAML Authentication and Keycloak needed setup?

I was following [https://josh-tracy.github.io/Ansible\_Tower\_RedHatSSO/](https://josh-tracy.github.io/Ansible_Tower_RedHatSSO/) and was able to get the “S” Logo to login with from AWX but after Clicking on it I get “We are Sorry … Page Not Found” message.

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [June 2, 2022, 1:07pm UTC](https://forum.ansible.com/t/saml-problem/35580/3 "2022-06-02T13:07:14Z")

</div>

I’m not sure if this will help but in the AWX project we have a way to setup and configure a Keycloak container next to AWX for testing.  
Perhaps our configuration will help you troubleshoot yours?

The docs around this are at [https://github.com/ansible/awx/tree/devel/tools/docker-compose#keycloak-integration](https://github.com/ansible/awx/tree/devel/tools/docker-compose#keycloak-integration)  
The playbook we used to “plumb” keycloak and AWX is located at: [https://github.com/ansible/awx/blob/devel/tools/docker-compose/ansible/plumb\_keycloak.yml](https://github.com/ansible/awx/blob/devel/tools/docker-compose/ansible/plumb_keycloak.yml)

In addition, there is a slightly older blog which describes the configuration between RH SSO (Keycloak upstream) with Tower (AWX upstream): [https://www.ansible.com/blog/red-hat-single-sign-on-integration-with-ansible-tower](https://www.ansible.com/blog/red-hat-single-sign-on-integration-with-ansible-tower)

Let us know if any of this helps.

-John
