Loading TOC...

MarkLogic 9 Product Documentation
sec:external-security-set-ssl-client-certificate-authorities

sec:external-security-set-ssl-client-certificate-authorities(
   $external-security-name as xs:string,
   $authorities as xs:unsignedLong*
) as empty-sequence()

Summary

Sets the SSL client certificate authorities for the external security identified by $external-security-name to $authorities.

Parameters
external-security-name The name of the external security.
authorities The new SSL client certificate authorities.

Required Privileges

http://marklogic.com/xdmp/privileges/external-security-set-ssl-client-certificate-authorities

Usage Notes

This function must be executed against the Security database.

Example


xquery version "1.0-ml"; 

import module namespace sec = "http://marklogic.com/xdmp/security" 
  at "/MarkLogic/security.xqy";
import module namespace pki = "http://marklogic.com/xdmp/pki" 
      at "/MarkLogic/pki.xqy";
 
let $cert-id :=
    for $cert in pki:get-certificates(pki:get-trusted-certificate-ids())
      where $cert/commonName eq "Acme Certificate Authority" and
            $cert/organizationName eq "Acme Corporation"
    return
      fn:data($cert/pki:certificate-id)

return sec:external-security-set-ssl-client-certificate-authorities("My-External-Security", $cert-id)
 
    

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