Option to hide/disable IdP

Sandra November 23, 2020

Is there a way to disable/hide an IdP in the SAML SSO plugin. For example I want to add the test URL, but during normal workhours that one does not have to be visible to everyone.


I want to be able to enable and disable it when it is necessary. 

1 answer

1 accepted

0 votes
Answer accepted
Marvin Meyer-Kahlen November 24, 2020

Hi!

Currently, there is no possibility to disable an IdP. If you are using the ‘IdP Selection Page' as IdP Selection Method (this can be found at SAML Single Sign On Configuration → IdP Selection) there is a way to hide an IdP.

Please note that our customization refers to our ‘Default IdP Selection Page Template’ (this can be found at SAML Single Sign On Configuration → Page Templates → IdP Selection Page Templates).

  • Please add an ‘#if’ conditional in the ‘#foreach($idp in $idps)’ loop
    • In our case we want to hide an IdP with the name ‘NOT VISIBLE’ (replace ‘NOT VISIBLE’ with the IDP name you want to hide. You can find the unique name at SAML Single Sign On Configuration → Identity Providers → Name *)
#if(!($idp.name == "NOT VISIBLE"))
  • After adding the if condition, the modification must be saved and the new IdP Selection page is available immediately

CleanShot 2020-11-23 at 14.04.28@2x.png

Code snippet (complete foreach loop)

#foreach($idp in $idps)

  #if(!($idp.name == "NOT VISIBLE"))

      <p>

        <a href="$idp.ssoUrl">$idp.name</a> $idp.description

      </p>

  #end

#end

Please let us know if it works fine for you or if you need help.

You can always use ‘Reset to Default’ (SAML Single Sign On Configuration → Page Templates → IdP Selection Page Templates) if something went wrong and you will get our ‘Default IdP Selection Page Template’.

Best regards,

Marvin

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events