Thycotic Secret Server SAML Integration

Introduction

This document describes how to configure Thycotic Secret Server to work with AuthControl Sentry SSO. Before following these instructions, you should be familiar with using Sentry - see the Sentry User Guide for more information.

Also refer to the official Thycotic SAML integration guide for Secret Server version 10.5+: https://thycotic.force.com/support/s/article/SS-SAML-Config-Guide

Create SAML Keys on CMI

Keys are used within SAML to create a trust relationship between Sentry (acting as an IDP) and a SAML-compliant service provider. It is important that you create your own keys for this integration and keep the private key secure.

Generating Keys

From the CMI Main Menu select the Appliance Option, then select Sentry Menu option.

You will see the keys that are currently being used by Sentry (if any).

_images/GenerateSAMLKeysRSA.jpg

Select Option 1 to Generate New Keys

Give the key a name eg SentryProductionKey Select the key type, RSA or DSA (RSA is recommended for wider compatibility).

Some integrations require keys of a specific type so refer to the appropriate integration guides.

You then need to enter the information required to generate the key. These parameters are:

  • Country Name e.g. US. This should be the standard 2-letter ISO country code.
  • State or Province e.g. Washington.
  • Locality: e.g. Seattle.
  • Organisation: Your Company or Organisation Name.
  • Organisation Unit: Relevant unit, e.g. Information Technology.
  • Common Name: The full server hostname, e.g. sentry.domain.com.
  • Email Address: contact email address for the certificate.

Once you have entered all the details the new keys and certificate will be created.

You will be asked if you want to start using the new key immediately. If you say NO you can select the key at a later date.

Warning

Changing the key being used will impact any existing SAML-based integrations. The existing service providers will need to be updated with the new keys.

Selecting a Key

Select the Select New Key option will list all the keys that have been created on the appliance. You can select the key you wish to use.

Note

You need to restart tomcat for the changes to take effect.

Configure Check Password with Repository on the Swivel Core

In order to check the user’s Active Directory password, ensure that the “local” Agent defined under Server -> Agents has got the Check Password with repository checkbox enabled. When an authentication occurs in AuthControl Sentry, the Active Directory password will then be passed to Active Directory for verification.

_images/Check_password_with_repository.JPG

Hint

If you just want to test Swivel Core authentication without checking Active Directory passwords, you can leave this setting off for the time being. When prompted for a password during login on the AuthControl Sentry Login screen, simply leave the password field blank.

Convert Sentry Keys to PFX

You will need to retrieve the keys generated above from the /home/swivel/.swivel/sentry/keys folder so that you are able to convert from PEM format to a PFX file containing the private key.

The openssl command to achieve a PEM to PFX conversion is as follows:

openssl pkcs12 -export -out Cert.pfx -in cert.pem -inkey key.pem

You will be prompted for a password for the private key and a password for the PFX you are creating This command assumes:

  • Cert.pfx is the file being created
  • cert.pem is the cert file downloadable from the AuthControl keys GUI
  • key.pem is the private key you download from the /home/swivel/.swivel/sentry/keys folder using WinSCP

Download the Sentry SSO IdP metadata

In the Sentry SSO Web GUI (running on port 8443), right click on the ‘View IdP Metadata’ left hand menu option and ‘Save As’ an xml file e.g. SwivelIdPMetadata.xml. We will upload this to the Thycotic Secret Server in a moment.

Setup SAML on Thycotic Secret Server

Login to Thycotic Secret Server as an administrator. You should see a SAML tab where you can perform the SAML configuration:

_images/Thycotic_SAML_settings.png
  • Enable SAML by checking the checkbox. Note: it’s worth noting that there is a URL to facilitate a local login in the event that SAML is not configured correctly. We recommend you read the Thycotic user manual to have this as a backup option prior to your SAML implementation attempt.
  • Under SAML -> Service Provider settings, select a certificate and browse to the PFX certificate created earlier.
  • Under Identity Providers, select ‘Create New Identity Provider’. This is where you will upload the IdP metadata file from earlier (e.g. SwivelIdPMetadata.xml that you saved from the ‘View IdP Metadata’ menu option in the Sentry SSO Web GUI). This should import successfully and populate all the endpoint URLs. The FQDN of these URLs should be valid. If not, login to the Swivel Secure CMI -> Main Menu -> Appliance -> Sentry and set the Base URL to be correct. Then export the IdP metadata again and repeat these steps to attempt to create a new identity provider.
  • Download the Service Provider metadata and open this in a text editor such as Notepad. Locate the entityID. This will be used in the Sentry SSO Application definition in a moment.

Setup Thycotic Secret Server as a Sentry SSO Application definition

_images/Thycotic_IDP_SAML_settings.png

In the Sentry SSO Web GUI (running on port 8443):

  • Locate a Thycotic logo online and upload this via the Application Images option
  • Create a new Application definition using the SAML -> Other option
  • Name: Thycotic Secret Server
  • Image: (select the image you just uploaded)
  • Points: 100 - or whatever fits your risk profile if you have already deployed Sentry session
  • Portal URL: https://<thycoticsecretserverhostname>/secretserver
  • Endpoint URL: https://<thycoticsecretserverhostname>/SecretServer/SAML/AssertionConsumerService.aspx
  • Entity ID: enter the EntityID you copied from the Service Provider metadata (just the value from the XML without quotes)
  • FederatedID: (this will vary according to your installation) windowsusername
  • windowsusername will need to be setup as a username attribute in the Sentry Core GUI running on port 8080 under Repository -> Attributes if it does not exist already. See section below.

Configure windowsusername attribute

In Swivel Core

Thycotic Secret Server requires the username to be in the format domainusername if integrated with AD. To do this, you need to create a Swivel attribute that includes the prefix.

In the Swivel admin console, under the repository details for the relevant AD repository, set the domain qualifier to be the short-form domain name, followed by \ (don’t forget the backslash at the end).

_images/CoreRepositoryQualifier1.png

Under Repository -> Attributes, create an attribute - for example, call it “windowsaccountname”. In the definition for the AD repository, put the AD attribute name “sAMAccountName”, and under domain qualifier, select “As Prefix”.

_images/CoreWindowsUsernameAttribute1.png

Finally, synchronise the AD repository, to ensure that all users have an attribute in the form domainusername.

Click save. You will see something like the below. Click save again.

Login Example

As an example here we will be using OATH authentication as the Primary method required for Thycotic Secret Server authentication.

Login to the AuthControl Sentry Administration Console. Click Authentication Methods in the left hand menu. Click the Edit button against the OATH option in the list of Authentication Methods. Give this Authentication Method 100 points. This will mean that when a login attempt is made to the Thycotic Secret Server Application, this Authentication Method will be offered during login.

Testing authentication to Thycotic Secret Server

This should be the final step after all previous elements have been configured.

Visit your AuthControl Sentry Page with your public DNS entry of your Swivel AuthControl Sentry server, e.g. https://mycompanysentrydomain/sentry/startPage. On a Start Page you will be able to see a new Thycotic Secret Server Icon on which you can click and proceed with authentication (as you would by going straight to the Thycotic Secret Server page)

_images/Thycotic_IDP_icon.png

When you visit this URL you will notice that the domain should redirect to the identity provider login URL that you setup.

_images/Thycotic_IDP_username.png

Once you have submitted your username. You should be presented with the Sentry authentication page.

In this login example we are using the sAMAccountName as a username and the fully qualified domainusername is being passed at the back end.

_images/Thycotic_IDP_username_populated.png

Once you have submitted your username. You should be presented with the page of the Authentication Method which can score enough points to match the points required by the Thycotic Secret Server Application definition.

_images/Thycotic_IDP_OATH_populated.png

After we enter our authentication credentials we successfully will see the Thycotic Secret Server account that we tried to access.

Troubleshooting

There are various logging components available for this particular integration which can aid in diagnosis at different points during authentication.

  • The Swivel Core has a Log Viewer menu item which can reveal information concerning user status e.g. is the user locked, has a session been started for the image request;
  • The Swivel AuthControl Sentry has a View Log menu item which provides details about the SAML assertion and response received from Thycotic Secret Server and can be useful for comparison with the Thycotic log output;

It is crucial when troubleshooting, to pinpoint where the authentication is failing. For example, you may find that the Swivel Core logs show a successful authentication (which would indicate that the user has entered their Password and OTC correctly), but the AuthControl Sentry logging shows that there is a problem with the SAML assertion.

Some common issues which can be diagnosed with the validator are:

  • Certificate or decryption issues;
  • Can AuthControl Sentry find the Certificate locally, is it the correct one?
  • Has the correct Certificate been uploaded to Thycotic Secret Server?
  • Does the Repository -> Attribute name being used actually map to a Repository attribute? Has a User Sync occurred in the Swivel Core since modifying this?