Skip to main content

Securing MarkLogic Server

CA Certificate Import into MarkLogic Server from Query Console

You can also import the Certificate Authority by using pki:insert-trusted-certificates() to load the Trusted CA into the Security database in MarkLogic Server:

Note

If using Query Console, make sure this query is executed against the Security database.

xquery version "1.0-ml";

import module namespace pki = "http://marklogic.com/xdmp/pki" at "/MarkLogic/pki.xqy";
 
pki:insert-trusted-certificates(
  xdmp:document-get("/OurCertificateLocation/DemoLabCA.pem",
  <options xmlns="xdmp:document-get">
    <format>text</format>
  </options>)
)

(This query is Import_Trusted_CA.xqy hosted by GitHub.)