Loading TOC...


   external-security-name as String,
   description as String,
   authentication as String,
   cache-timeout as Number,
   authorization as String,
   ldap-server as (sec.ldapServer)?,
   saml-server as (sec.samlServer)?,
   client-certificate-authorities as (Number|String)[],
   require-client-certificate as Boolean
) as (Number|String)


This function creates an external authentication configuration object and returns the id of the configuration. This configuration is used when MarkLogic Server is used with an external Kerberos and/or LDAP server to control user access.

For more information on external security, see External Security in the Security Guide.

external-security-name The name of external authentication configuration.
description The description of external authentication configuration.
authentication The authentication protocol. This can be either ldap, saml, kerberos, or certificate.

If authentication is certificate, only certificate authentication will be performed. If authentication is not certificate and if require-client-certificate is set to true, a client certificate is required in addition to some other form of authentication.

cache-timeout Login cache timeout, in seconds.
authorization The authorization scheme. Set to ldap for external authorization using an LDAP server, internal to authorize using MarkLogic Server, or saml for SAML authorization.
ldap-server The LDAP server configuration created by the sec:ldap-server function.
saml-server The SAML server configuration created by the sec:saml-server function.
client-certificate-authorities One or more client certificate authority ids.
require-client-certificate Whether a client certificate is required. Set to true to require a client certificate, or false to not require a client certificate. This parameter cannot be null or empty.


// Execute this against the security database.
const sec = require('/MarkLogic/security');

  const ldapConfig = sec.ldapServer(
        'config for ldap', 
        null, null, 

// Creates an external authorization configuration object, named 'ldapConfig',
// that uses the 'simple' bind method for an LDAP server.

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.