# Help setting up XDMoD and Keyclock(SAML)

**URL:** <https://discourse.openondemand.org/t/help-setting-up-xdmod-and-keyclock-saml/1525>\
**Category:** Get Help\
**Tags:** question\
**Created:** [June 9, 2021, 8:42am UTC](https://discourse.openondemand.org/t/help-setting-up-xdmod-and-keyclock-saml/1525 "2021-06-09T08:42:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Starter](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/starter/32/728_2.png) [@Starter](https://discourse.openondemand.org/u/Starter)\
**Post date:** [June 9, 2021, 8:42am UTC](https://discourse.openondemand.org/t/help-setting-up-xdmod-and-keyclock-saml/1525/1 "2021-06-09T08:42:58Z")

</div>

I’m trying to integrate XDMoD into the OOD dashboard.  
But it doesn’t work well. I don’t know how to set it up correctly.

If anyone has set up Keycloak and XDMoD, please let me know it.

Can someone provide the 3 files related to php below?  
(authsources.php, config.php, saml20-idp-remote.php)

And let me know how to set up Keycloak(saml) in detail.

I can’t find anything about this in the manual.

Thank you~!

[Keycloak Log]  
2021-06-09 07:30:43,238 WARN [org.keycloak.events] (default task-27) type=LOGIN\_ERROR, realmId=ondemand, clientId=null, userId=null, ipAddress=XXX.XX.XX.XXX, error=invalid\_redirect\_uri

[XDMoD Auth test]

 ![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/1X/f178486b02ee82b4d8294e58a47c61b27072631c.png)

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [June 9, 2021, 1:37pm UTC](https://discourse.openondemand.org/t/help-setting-up-xdmod-and-keyclock-saml/1525/2 "2021-06-09T13:37:17Z")

</div>

Hi and welcome! @tdockendorf do you have any insight here?

---

<div class="post-metadata">

**Author:** ![tdockendorf](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/tdockendorf/32/202_2.png) [@tdockendorf](https://discourse.openondemand.org/u/tdockendorf)\
**Post date:** [June 9, 2021, 2:08pm UTC](https://discourse.openondemand.org/t/help-setting-up-xdmod-and-keyclock-saml/1525/3 "2021-06-09T14:08:12Z")

</div>

For the config.php I only modify the following values:

- secretsalt
- auth.adminpassword

The comments above secretsalt give examples of how to generate the value.

I put authsources and our Keycloak JSON configs here: [XDMOD and Keycloak · GitHub](https://gist.github.com/treydock/38b0c52a8d59cfa78099acc62fd387aa)

The saml20-idp-remote.php I got from using the simplesamlphp interface, somewhere once you have the config.php and authsources.php is a way to generate the metadata. Looking at my notes I think you go to `https://<XDMOD server name>/simplesaml/module.php/saml/sp/metadata.php/default-sp` and it will need information from Keycloak which I got by doing this `curl https://<Keycloak server name>/auth/realms/<REALM name>/protocol/saml/descriptor`. If I remember correctly that will generate the PHP you need for the saml20-idp-remote.php.

I used Puppet to generate the certs specific to the simplesamplphp SP but the command you can use to generate them is here: [Open XDMoD - Setting up XDMoD for LDAP Authentication](https://open.xdmod.org/9.5/simpleSAMLphp-ldap.html). Further details about the XDMOD side of things is here: [Open XDMoD - Single Sign On Guide](https://open.xdmod.org/9.5/simpleSAMLphp.html)

Based on the errors you got it looks like your redirect URL in Keycloak is wrong, the value you should use is in the Keycloak Client JSON in the Gist linked above.

---

<div class="post-metadata">

**Author:** ![Starter](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/starter/32/728_2.png) [@Starter](https://discourse.openondemand.org/u/Starter)\
**Post date:** [June 10, 2021, 12:00am UTC](https://discourse.openondemand.org/t/help-setting-up-xdmod-and-keyclock-saml/1525/4 "2021-06-10T00:00:13Z")

</div>

You gave me the answer that I need.  
I’m going to do as you said.

Thank you for your reply.  
Have a nice day 🙂

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 3:42pm UTC](https://discourse.openondemand.org/t/help-setting-up-xdmod-and-keyclock-saml/1525/5 "2022-05-26T15:42:52Z")

</div>

Closed on May 26, 2022, 3:42pm UTC


