# SSO authentication with Centrify

**URL:** https://meta.discourse.org/t/sso-authentication-with-centrify/61298
**Category:** Support
**Created:** [April 20, 2017, 4:19am UTC](https://meta.discourse.org/t/sso-authentication-with-centrify/61298 "2017-04-20T04:19:44Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![mjeanson](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@mjeanson](https://meta.discourse.org/u/mjeanson)
#### Post date: [April 20, 2017, 4:19am UTC](https://meta.discourse.org/t/sso-authentication-with-centrify/61298/1 "2017-04-20T04:19:44Z")

</div>

Hi,  
We are trying to use our SSO provider Centrify with Discourse. And we’re having some problems.  
We installed the SAML plugin ([GitHub - discourse/discourse-saml: Support for SAML in Discourse · GitHub](https://github.com/discourse/discourse-saml))  
We have Discourse version v1.8.0.beta9 +25  
Below are screenshots of the discourse login setup and some of the logs we currently see.

 ![](https://global.discourse-cdn.com/meta/original/3X/c/7/c70e3b7b47608d4d9c8e24c9aa7b82e56a1f3a0f.png)

The SAML assertion is sending the NameID(user identifier) variable as our active directory samaccountname(email minus domain @f…com). Main thing is that it seems like the SAML assertion goes to the correct place but discourse is not configured properly to process it. Normally, it gives the ‘Bad CSRF’ which I’m not entirely what it means.

Assertion URL: http: // discourse\_web\_url/auth/saml/callback  
Issuer: http: // [cloud.centrify.com/SAML/AppName](http://cloud.centrify.com/SAML/AppName)  
Audience: http: // discourse\_web\_url  
Recipient: http: // discourse\_web\_url/auth/saml/callback

Identity Provider Info:  
Sign-In URL: https: // [aac0995.my.centrify.com/applogin/appKey/xxxxx-xxxx-xxxxxx-xxxxxxx/customerId/XXXXXXXX](http://aac0995.my.centrify.com/applogin/appKey/xxxxx-xxxx-xxxxxx-xxxxxxx/customerId/XXXXXXXX)  
And it has also an associated sign-in certificate

Any help would be greatly appreciated!!

Thank you,  
Matthieu

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [April 20, 2017, 5:46am UTC](https://meta.discourse.org/t/sso-authentication-with-centrify/61298/2 "2017-04-20T05:46:03Z")

</div>

From your screenshots you are entering in invalid settings in both “sso url” and “sso secret”…

Quickly reading the instructions and code here - neither of these settings are used for SAML:  
[https://github.com/discourse/discourse-saml](https://github.com/discourse/discourse-saml)

I would suggest checking the readme again and ensuring you have followed the steps:

> <https://github.com/discourse/discourse-saml/blob/main/README.md>

---

<div class="post-metadata">

### Author: ![mjeanson](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@mjeanson](https://meta.discourse.org/u/mjeanson)
#### Post date: [April 20, 2017, 6:26am UTC](https://meta.discourse.org/t/sso-authentication-with-centrify/61298/3 "2017-04-20T06:26:39Z")

</div>

Thank you Dean for your help.

If I remove the ‘sso url’ setting, then going to the discourse page, Chrome gives me an error with “too many redirects”  
I can remove the ‘sso secret’ safely (‘enable sso provider’ is not enabled).

I checked the app.yml settings.  
The DISCOURSE\_SAML\_TARGET\_URL is set with the same “sign-in URL” or “SSO URL” above.  
The DISCOURSE\_SAML\_CERT\_FINGERPRINT and DISCOURSE\_SAML\_CERT are set (correctly I hope, I went to [SAML X.509 Certificate Fingerprint - Online SHA1 Decoder | SAMLTool.com](https://www.samltool.com/fingerprint.php) to generate the fingerprint).  
And DISCOURSE\_SAML\_FULL\_SCREEN\_LOGIN is set to true

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [April 20, 2017, 1:35pm UTC](https://meta.discourse.org/t/sso-authentication-with-centrify/61298/4 "2017-04-20T13:35:21Z")

</div>

> [@mjeanson](#):
>
> too many redirects

This is caused by a page redirecting to another page which then redirects again.

This might be the same page redirecting to itself or two pages bouncing between each other.

It might be helpful to find out which URL’s are directing to work out where the source of the problem might be.

To do this open Google Chrome Developer tools, have the Network tab open then visit the page.

---

<div class="post-metadata">

### Author: ![nickgamb](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@nickgamb](https://meta.discourse.org/u/nickgamb)
#### Post date: [April 20, 2017, 9:38pm UTC](https://meta.discourse.org/t/sso-authentication-with-centrify/61298/5 "2017-04-20T21:38:57Z")

</div>

Hi Matthieu and Dean,

I am a Product Manager and a Developer Advocate with Centrify. It seems that Dean has the Discourse side of things covered here, but I wanted to get in touch and tell you that if at any point you need help with the Centrify side of the configuration, please loop me in and I am happy to help. I can set up a call for all of us to work through this too if that is helpful. You can reach me at [devsupport@centrify.com](mailto:devsupport@centrify.com).

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [July 21, 2019, 6:58pm UTC](https://meta.discourse.org/t/sso-authentication-with-centrify/61298/6 "2019-07-21T18:58:22Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [January 14, 2023, 11:29pm UTC](https://meta.discourse.org/t/sso-authentication-with-centrify/61298/7 "2023-01-14T23:29:13Z")

</div>


