SAML with CyberArk
KeycloakCyberArk supportsintegrates multiplewith authenticationKnocknoc realms, so you must first selectvia the appropriate"Web realmApps" forcomponent, yourpassing organisation.through DoSAML not make any of the below changes in the Keycloak/master realm.assertions.
In this example our realm is called "Acme" and Keycloak is hosted at https://auth.example.com/.
Our Knocknoc instance is a cloud instance with URL https://keycloaktest.knoc.cloud. If you are using a cloud server, replace with your own URL, or if you are using an on-premise server, this is the base URL to your Knocknoc server.
Knocknoc SAML config
PublicLogURL:in to the Knocknoc Admin interface- On the Settings page configure the PublicURL (eg: https://knocknoc.yourserver.com)
- Create and upload a key/cert (see below)
- Save these settings, this enables the SAML metadata file for consumption by CyberArk.
- In another tab, open the CyberArk configuration and follow below. You need to return to this Knocknoc Admin tab for the final step, providing the CyberArk SSO URL back to Knocknoc.
- Create a Web App and establish the base settings.
- Create the SSO link and copy the URL, log back in to Knocknoc in another tab and place this URL in the "samlMetadataUrl" setting, click Save in Knocknoc.
- Under "Service Provider Configuration" enter the SAML metadata URL in the location, and select Load. The URL will be https://
keycloaktest.knoc.cloud Metadata URLhttps://auth.example.knocknoc.yourserver.com/realms/Acme/protocol/saml/descriptor(you can get this from Keycloak > Acme realm > Realm settings > General tab > Endpoints section > "SAML 2.0 Identity Provider Metadata").
CyberArk configuration
SamlMetadataFile the idp-metadata.xml downloaded in the Mellon package from Keycloak
SamlKeyFile and SamlCertFile are currently required fields in Knocknoc but unused once you turn off Keycloak > Client > Keys > "Client signature required"
So if we do a "choose SAML" provider option for Keycloak maybe these could be omitted or not mandatory
Keycloak config
Change to your realm (e.g. Acme, not master)Create clientType: SAMLClient ID:https://keycloaktest.knoc.cloud/api/saml/metadata(Accept defaults, save)SaveSettingsHelp
tabguide Name: e.g. KnocknocRoot URL:self-hosted: https://keycloaktest.knoc.clouddocs.cyberark.com/pam-self-hosted/latest/en/content/pas%20inst/saml-authentication.htmHomeURL:ValidredirectURI:To
/api/saml/acscreate MasteraSAMLkey/certprocessing URL:https://keycloaktest.knoc.cloud/api/saml/acsName ID format: persistentForce name ID format: offForce POST binding: offForce artifact binding: offInclude AuthnStatement: onInclude OneTimeUse Condition: offOptimise REDIRECT signing key lookup: offAllow ECP flow: offSign documents: onSign assertions: onSignature algorithm: RSA_SHA256SAML signature key name: KEY_IDCanonicalization method: EXCLUSIVEKeys tabClient signature required: offEncrypt assertions: offRoles tab: -Client scopes tab:realNameMapper type: user attributename: realNameUser attribute: select the user attribute containing their nameFriendly name: realNameSAML attribute name: realNamenameidMapper type: User attribute mapperpair forNameIDuploading name:innameidName ID format: urn:oasis:names:tc:SAML:2.0:nameid-format:persistentUser attribute: emailsessionDurationMapper type: user attributeName: sessionDurationUser attribute: select the user attribute containingto the KnocknocsessionportaldurationorinconnectedsecondsIdP,
Editfollow the"dedicatedbelow:
scope- Generate a new certificate and
mappers forkey, thisclient"can be done on a Linux host using the below command.openssl req -new -x509 -days 3650 -nodes -subj /CN=Knocknoc/
https://keycloaktest.knoc.cloud/api/saml/metadata-dedicated-outanduser-demo-knoc-cloud.crtadd-keyoutin mappers:user-demo-knoc-cloud.key TheIfclientrequired,scopeconvert"role_list"theshouldcertificatealreadytoexistpfxbyusingdefaultthe following command.openssl pkcs12 -export -out user-demo-knoc-cloud.pfx -inkey user-demo-knoc-cloud.key -in user-demo-knoc-cloud.crt
- Generate a new certificate and
Advanced tabBrowser flow: browser
Authentication flow overrides
- for