Contents

Introduction

Prerequisites

Requirements

Components Used

Problem

Solution

One-Liner Automatic

Introduction

This document describes how to set the Single Sign On (SSO) to the empty/default values on the Secure Network Analytics Manager.

Prerequisites

Requirements

There are no specific requirements for this document.

Components Used

The information in this document is based on the Secure Network Analytics Manager (SMC) Version 7.1 and later.

An SSH client/application with copy-and-paste functionality is encouraged for this article.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.

Problem

The SSO settings configured are invalid, or outdated, or the Central Management shows Configuration Changes Failed after an invalid or obsolete SSO configuration was saved.

Solution

There are two parts to the SSO Configuration which are Central Management and Fedlet Manager. If a comparison of the original and final configurations is desired, then run all listed steps. If a comparison is not desired then only run the commands that are not marked as (Optional).  A One-Liner command at the end of this article performs the steps for you.

Step 1. (Optional) If you wish to compare the current Central Management configuration with the end result, run the jq '.configurableElements.sso' /lancope/var/services/cm/configuration/$(awk -F\" '{print $8}' /lancope/var/services/cm-agent/configuration/managementChannel.json)/config.json > jqdoldcm.json command.

741smc:~# jq '.configurableElements.sso' /lancope/var/services/cm/configuration/$(awk -F\" '{print $8}' /lancope/var/services/cm-agent/configuration/managementChannel.json)/config.json > jqdoldcm.json

741smc:~#

Step 2. (Optional) if you wish to compare the current configuration with the end result, run the jq . /lancope/var/fedlet-manager/conf/fedlet-manager.json > jqdoldfm.json command.

741smc:~# jq . /lancope/var/fedlet-manager/conf/fedlet-manager.json > jqdoldfm.json

741smc:~#

Step 3. Create a temporary variable with the tmpfile=$(mktemp) command.

741smc:~# tmpfile=$(mktemp)

741smc:~#

Step 4. Create a temporary variable with thecm_file=$(echo /lancope/var/services/cm/configuration/$(awk -F\" '{print $8}' /lancope/var/services/cm-agent/configuration/managementChannel.json)/config.json)command.

741smc:~# cm_file=$(echo /lancope/var/services/cm/configuration/$(awk -F\" '{print $8}' /lancope/var/services/cm-agent/configuration/managementChannel.json)/config.json)

741smc:~#

Step 5. Determine your current Secure Network Analytics version with the echo $SWINFO_version command.

741smc:~# echo $SWINFO_version

7.4.1

If the SMC version is 7.4.1, run these commands:

741smc:~# cp $cm_file $tmpfile && jq --arg foo "" --argjson bar false '.configurableElements.sso.ssoEnabled = $bar|.configurableElements.sso.ssoDescription = $foo|.configurableElements.sso.idpXml = $foo|.configurableElements.sso.ssoProxy = $foo|.configurableElements.sso.ssoOnly = $bar|.configurableElements.sso.downloadIdpXml = $bar' "$tmpfile" > $cm_file && rm -f -- $tmpfile

741smc:~# cp /lancope/var/fedlet-manager/conf/fedlet-manager.json $tmpfile && jq --arg foo "" --argjson bar false '.ssoEnabled = $bar|.ssoDescription = $foo|.idpXml = $foo|.ssoProxy = $foo|.state = "NO_CONFIGURATION"|.message="Single Sign-On is not configured."' $tmpfile >/lancope/var/fedlet-manager/conf/fedlet-manager.json && rm -f -- $tmpfile

741smc:~#

If the SMC version is earlier than 7.4.1, run these commands:

711smc:~# cp $cm_file $tmpfile && jq --arg foo "" --argjson bar false '.configurableElements.sso.ssoEnabled = $bar|.configurableElements.sso.ssoDescription = $foo|.configurableElements.sso.idpXml = $foo|.configurableElements.sso.ssoOnly = $bar|.configurableElements.sso.downloadIdpXml = $bar' "$tmpfile" > $cm_file && rm -f -- $tmpfile

711smc:~# cp /lancope/var/fedlet-manager/conf/fedlet-manager.json $tmpfile && jq --arg foo "" --argjson bar false '.ssoEnabled = $bar|.ssoDescription = $foo|.idpXml = $foo|.state = "NO_CONFIGURATION"|.message="Single Sign-On is not configured."' $tmpfile >/lancope/var/fedlet-manager/conf/fedlet-manager.json && rm -f -- $tmpfile

711smc:~#

Step 6. (Optional) If you wish to compare the end result configuration with the original configurations, run these commands:

741smc:~# jq '.configurableElements.sso' $cm_file > jqdnewcm.json

741smc:~# jq . /lancope/var/fedlet-manager/conf/fedlet-manager.json > jqdnewfm.json

741smc:~# diff -y jqdoldcm.json jqdnewcm.json

741smc:~# diff -y jqdoldfm.json jqdnewfm.json

Step 7. (Optional) Delete the json files created as part of this comparison process in the last step.

741smc:~# rm -f jqdoldcm.json jqdnewcm.json

741smc:~# rm -f jqdoldfm.json jqdnewfm.json

Step 8. Unset the variables created at the start of this document.

711smc:~# unset tmpfile

711smc:~# unset cm_file

711smc:~#

Restart the central management process with the docker central-managementcommand.

741smc:~# docker restart svc-central-management

svc-central-management

741smc:~#

One-Liner Automatic

Run this command to perform all of the steps seen in this article. The output contains some additional formatting.

bash <(base64 -d <<< "H4sIAIXWV2MAA+1WXW/aQBB8769YWVZIpNoobapWQkSqSIh4AEehaSuVKrrYa3LBvnPuDihq+t+7Z4PBBMhHX6qqEqDcst6dnRsyi+GNBA/BGYiB6Bs2RDgEDzqCG/jMFGfXCWpgIoIzZm5QQZtTYCC6bMTFEAymGcQUAt/3wYGGSTN7bLr76ch+eQCNML2ah9A2qydMhDLD+oSpukY14SHqepjWQyliPhwrZrgUdXefTUfgtQcO1H5migsD7odfta2PewRdmLUiKRMUTumL1g0TAhP/VktxMM8qDtDQCWIG/jtoYMmGOZECB+IMjbFzhmOlqAq06EOxBLplYdCGGaTJb++g5pftibbTJE/QvtayBu6cBjiG27tIJlGY5v2f1b6NUYIG+ralrV209aukxHmSV8yu8lnXYkXjBZD4CUCWyghlmlEpXOrlDUW7MuLxLIe6egEklMssYvkMG6izspqPVEQVtFYfp/F4DN/A7X/p9NrB1QSVpjA0m+C894/8Qwe+QwNIlwLCbEmxO1ch7O3RjOB5TA0hlhIcpzjk814zBTFLNO64N/s+FTYaQRNceuR+Z+4J6lDxzOQowaWeO/J5lH1Nk8fz6H2u5I/ZkzIDkcwehxrJqUgkizolBMqvgbNgziF1lHQSiyoFLybuKtQS5S8S3vOvZ8MtbCF7jdMH1OW/Vjo5veCqFfTanbPLi4+fOkHPufdT1JpQNp0+6ZXg9flQeIEArkFIUyobI9+pLYc4fhEHGzltANp5/20p/xdoRaB/tx5j/kxjEzgtje0PrYlKPd2arAm1HljT23mUKQoWf+RW1H1gUz1p8DU5CXE7lWRNiZQj8qcZkK/FmJvvWNDmo6HfD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Uz1p8DU5CXE7lWRNiZQj8qcZkK/FmJvvWNDmo6HfD2DKaCcKzZglpOXlPUCmcMLlWFNUqqIava6VHCFhCpLIti4sDu6hh9PFmZzONgJvtrYdrFG6iYeVwdb3A100XQ/Pe2/YJqog4gqI8jLK1lWSq9QfUfRSaKo/qayREdq8fHGUiqlZvj1qal3Ib+f0qylbsI3zlqWAi+NCoQVy5wLpV6e2LCWWBBmOaBVRRRroSeiFRZ63XCjtP+vNUjxa2ZKoGuyG9Oo3OzkftYILAAA=" | gunzip)

Stage 1 - Init Variables and Gather Files

Making temp file ...

Done

Getting current Central Management state

Done

Getting current Fedlet Statement

Done

Stage 1 - complete

Stage 2 - Modifying configurations

Updating Central Management and Fedlet Manager Configuration

Done

Stage 2 - Complete

Stage 3 - Compare

Comparing CM configurations

Note, this wont look any different unless SSO was actually configured previously or this is broken

Old CM Config | New CM Conf

{                                               {

"ssoEnabled": true,                           | "ssoEnabled": false,

"ssoDescription": "Known Bad Config",         | "ssoDescription": "",

"idpXml": "https://www.example.com",          | "idpXml": "",

"ssoProxy": "",                                 "ssoProxy": "",

"ssoOnly": false,                               "ssoOnly": false,

"downloadIdpXml": true                        | "downloadIdpXml": false

}                                               }

Comparing Fedlet Statements

Old Fedlet Statement | New Fedlet Statement

{                                                             {

"ssoEnabled": true,                                         | "ssoEnabled": false,

"ssoDescription": "Known Bad Config",                       | "ssoDescription": "",

"idpXml": "",                                                 "idpXml": "",

"spFqdn": "741smc.example.local",                             "spFqdn": "741smc.example.local",

"ssoProxy": "",                                               "ssoProxy": "",

"state": "FAILED_TO_DOWNLOAD_IDP",                          | "state": "NO_CONFIGURATION",

"message": "We couldn’t reach the Identity Provider URL. En | "message": "Single Sign-On is not configured."

}                                                             }

Stage 3 - Complete

Stage 4 - Unset variables and delete temporary files

Restarting Central Management

svc-central-management

Done

Stage 4 - complete