Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ xref:#cli-constraints["Tools and Server Constraints"] indicates the constraints,
a|[none]
* `backendstat`
* `create-rc-script`
* `dsjavaproperties`
* `encode-password`
* `list-backends`
* `setup`
Expand Down Expand Up @@ -164,7 +163,7 @@ a|With one exception, this command can be used with current and previous OpenDJ
This commands is not useful with other types of directory servers.

a|[none]
* `make-ldif`
* `makeldif`
a|This command depends on template files. The template files can make use of configuration files installed with OpenDJ directory server under `config/MakeLDIF/`.

The LDIF output can be used with OpenDJ and other directory servers.
Expand All @@ -176,7 +175,7 @@ a|[none]
* `ldapmodify`
* `ldappasswordmodify`
* `ldapsearch`
* `ldif-diff`
* `ldifdiff`
* `ldifmodify`
* `ldifsearch`
a|These commands can be used independently of OpenDJ directory server, and so are not tied to a specific version.
Expand Down Expand Up @@ -235,12 +234,6 @@ On Windows, the equivalent non-interactive command that `dsconfig` prints quotes
+
For details see xref:../reference/admin-tools-ref.adoc#dsconfig-1[dsconfig(1)] in the __Reference__.

`dsjavaproperties`::
Apply changes you make to `opendj/config/java.properties`, which sets Java runtime options.

+
For details see xref:../reference/admin-tools-ref.adoc#dsjavaproperties-1[dsjavaproperties(1)] in the __Reference__.

`dsreplication`::
Configure data replication between directory servers to keep their contents in sync.

Expand Down Expand Up @@ -298,11 +291,11 @@ Search a branch of directory data for entries that match the LDAP filter you spe
+
For details see xref:../reference/admin-tools-ref.adoc#ldapsearch-1[ldapsearch(1)] in the __Reference__.

`ldif-diff`::
`ldifdiff`::
Display differences between two LDIF files, with the resulting output having LDIF format.

+
For details see xref:../reference/admin-tools-ref.adoc#ldifdiff-1[ldif-diff(1)] in the __Reference__.
For details see xref:../reference/admin-tools-ref.adoc#ldifdiff-1[ldifdiff(1)] in the __Reference__.

`ldifmodify`::
Similar to the `ldapmodify` command, modify specified attribute values for specified entries in an LDIF file.
Expand All @@ -322,11 +315,11 @@ List backends and base DNs served by OpenDJ directory server.
+
For details see xref:../reference/admin-tools-ref.adoc#list-backends-1[list-backends(1)] in the __Reference__.

`make-ldif`::
`makeldif`::
Generate directory data in LDIF based on templates that define how the data should appear.

+
The `make-ldif` command is designed to help generate test data that mimics data expected in production, but without compromising real, potentially private information.
The `makeldif` command is designed to help generate test data that mimics data expected in production, but without compromising real, potentially private information.

+
For details see xref:../reference/admin-tools-ref.adoc#makeldif-1[makeldif(1)] in the __Reference__.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,23 @@
information: "Portions copyright [year] [name of copyright owner]".

Copyright 2017 ForgeRock AS.
Portions Copyright 2024 3A Systems LLC.
Portions Copyright 2024-2026 3A Systems, LLC.
////

:figure-caption!:
:example-caption!:
:table-caption!:


ifndef::env-site[]
[#chap-backup-restore]
endif::[]
== Backing Up and Restoring Data

ifdef::env-site[]
anchor:chap-backup-restore[]
endif::[]

This chapter covers management of directory data backup archives. For information on managing directory data in an interoperable format that is portable between directory server products, see xref:chap-import-export.adoc#chap-import-export["Managing Directory Data"] instead. In this chapter you will learn to:

* Create backup archives
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@
:table-caption!:


ifndef::env-site[]
[#chap-change-certs]
endif::[]
== Changing Server Certificates

ifdef::env-site[]
anchor:chap-change-certs[]
endif::[]

This chapter covers how to replace OpenDJ key pairs and public key certificates. In this chapter you will learn to:

* Replace a key pair for securing a connection handler
Expand Down Expand Up @@ -141,7 +147,7 @@ $ keytool \
[source, console]
----
$ keytool \
-genkey \
-genkeypair \
-alias admin-cert \
-keyalg RSA \
-validity 7300 \
Expand All @@ -153,28 +159,7 @@ $ keytool \
-keypass `cat admin-keystore.pin`
----
+
Notice that the `-alias` option takes the same alias as before. This is because the `ssl-cert-nickname` for the Administration Connector is configured as `admin-cert`. Also, the `-dname` option has a CN value corresponding to the fully qualified domain name of the host where OpenDJ directory server is running.

. Get the new key pair's certificate signed, using one of the following alternatives:
+

* Self-sign the certificate:
+

[source, console]
----
$ keytool \
-selfcert \
-alias admin-cert \
-validity 7300 \
-keystore admin-keystore \
-storepass `cat admin-keystore.pin`
----

* Create a certificate signing request, have it signed by a CA, and import the signed certificate from the CA reply.
+
For examples of the `keytool` commands to use, see xref:chap-connection-handlers.adoc#new-ca-signed-cert["To Request and Install a CA-Signed Certificate"].

Keep the configured alias, `admin-cert`, and set the server DNS name in `-ext`. The generated certificate is self-signed. To use a CA-signed certificate, follow the signing and import steps in xref:chap-connection-handlers.adoc#new-ca-signed-cert[Request and Install a CA-Signed Certificate] with the same alias and DNS name.

. Export a copy of the certificate from the keystore:
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@
:table-caption!:


ifndef::env-site[]
[#chap-connection-handlers]
endif::[]
== Configuring Connection Handlers

ifdef::env-site[]
anchor:chap-connection-handlers[]
endif::[]

This chapter shows you how to configure OpenDJ directory server to listen for directory client requests using connection handlers. You can view information about connection handlers in the OpenDJ control panel, and update the configuration using the `dsconfig` command, described in xref:../reference/admin-tools-ref.adoc#dsconfig-1[dsconfig(1)] in the __Reference__.
In this chapter you will learn to:

Expand Down Expand Up @@ -182,18 +188,19 @@ First, create a server private key and public key certificate in a Java Keystore

. Generate the server private key and public key certificate by using the Java `keytool` command.
+
The FQDN for OpenDJ directory server, which you can see under Server Details in the OpenDJ control panel, is set both as a `DNSName` in the certificate's `SubjectAlternativeName` list, and also in the CN of the certificate's subject name DN for backwards compatibility:
Set the server DNS name in the Subject Alternative Name extension and in the subject CN.
+

[source, console]
----
$ keytool \
-genkey \
-genkeypair \
-alias server-cert \
-keyalg rsa \
-ext "san=dns:opendj.example.com" \
-dname "CN=opendj.example.com,O=Example Corp,C=FR" \
-keystore /path/to/opendj/config/keystore \
-storetype JKS \
-storepass changeit \
-keypass changeit
----
Expand All @@ -204,40 +211,23 @@ $ keytool \
Notice that the `-storepass` and `-keypass` options take identical password arguments. OpenDJ requires that you use the same password to protect both the keystore and the private key.
======
+
If the server can respond on multiple FQDNs, then specify multiple subject alternative names when using the `keytool` command's `-ext` option. In the following example the primary FQDN is `opendj.example.com` and the alternative is `ldap.example.com`:
+

[source, console]
----
$ keytool \
-genkey \
-alias server-cert \
-keyalg rsa \
-ext "san=dns:opendj.example.com,dns:ldap.example.com" \
-dname "CN=opendj.example.com,O=Example Corp,C=FR" \
-keystore /path/to/opendj/config/keystore \
-storepass changeit \
-keypass changeit
----
For multiple names, use a comma-separated list such as `-ext "san=dns:opendj.example.com,dns:ldap.example.com"`.

. Create a certificate signing request file for the certificate you generated:
. Create a certificate signing request with the same DNS names you used when generating the key pair:
+

[source, console]
----
$ keytool \
-certreq \
-alias server-cert \
-ext "san=dns:opendj.example.com" \
-keystore /path/to/opendj/config/keystore \
-storepass changeit \
-file server-cert.csr
----

. Have the CA sign the request (`server-cert.csr`).
+
See the instructions from your CA on how to provide the request.
+
The CA returns the signed certificate.
. Submit `server-cert.csr` to your CA. Check that the signed certificate includes the requested DNS names.

. If you have set up your own CA and signed the certificate, or are using a CA whose signing certificate is not included in the Java runtime environment, import the CA certificate into the keystore so that it can be trusted.
+
Expand Down Expand Up @@ -820,67 +810,37 @@ Each LDAP connection handler also limits what a single client can hold before it
[#tls-protocols-cipher-suites]
=== TLS Protocols and Cipher Suites

By default OpenDJ supports the SSL and TLS protocols and the cipher suites supported by the underlying Java virtual machine. For details see the documentation for the Java virtual machine (JVM) in which you run OpenDJ. For Oracle Java, see the __Java Cryptography Architecture Oracle Providers Documentation__ for the link:http://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html#SunJSSEProvider[The SunJSSE Provider, window=\_blank].

To list the available protocols and cipher suites, read the `supportedTLSProtocols` and `supportedTLSCiphers` attributes of the root DSE. Install unlimited strength Java cryptography extensions for stronger ciphers:
OpenDJ uses the TLS protocols and cipher suites enabled by the Java runtime. Query the listener's root DSE to see its current settings. Use a client that xref:#setup-server-cert[trusts the server certificate].

[source, console]
----
$ ldapsearch --port 1389 --baseDN "" --searchScope base "(objectclass=*)" \
$ ldapsearch --hostname opendj.example.com --port 1636 --useSSL \
--baseDN "" --searchScope base "(objectclass=*)" \
supportedTLSCiphers supportedTLSProtocols
dn:
supportedTLSCiphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
supportedTLSCiphers: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
supportedTLSCiphers: TLS_RSA_WITH_AES_128_CBC_SHA256
supportedTLSCiphers: TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
supportedTLSCiphers: TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
supportedTLSCiphers: TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
supportedTLSCiphers: TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
supportedTLSCiphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
supportedTLSCiphers: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
supportedTLSCiphers: TLS_RSA_WITH_AES_128_CBC_SHA
supportedTLSCiphers: TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
supportedTLSCiphers: TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
supportedTLSCiphers: TLS_DHE_RSA_WITH_AES_128_CBC_SHA
supportedTLSCiphers: TLS_DHE_DSS_WITH_AES_128_CBC_SHA
supportedTLSCiphers: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
supportedTLSCiphers: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
supportedTLSCiphers: TLS_RSA_WITH_AES_128_GCM_SHA256
supportedTLSCiphers: TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
supportedTLSCiphers: TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
supportedTLSCiphers: TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
supportedTLSCiphers: TLS_DHE_DSS_WITH_AES_128_GCM_SHA256
supportedTLSCiphers: TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
supportedTLSCiphers: TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
supportedTLSCiphers: SSL_RSA_WITH_3DES_EDE_CBC_SHA
supportedTLSCiphers: TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
supportedTLSCiphers: TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
supportedTLSCiphers: SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA
supportedTLSCiphers: SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
supportedTLSCiphers: TLS_EMPTY_RENEGOTIATION_INFO_SCSV
supportedTLSProtocols: SSLv2Hello
supportedTLSProtocols: TLSv1
supportedTLSProtocols: TLSv1.1
supportedTLSCiphers: TLS_AES_128_GCM_SHA256
supportedTLSCiphers: TLS_AES_256_GCM_SHA384
...
supportedTLSProtocols: TLSv1.2
supportedTLSProtocols: TLSv1.3
----
You can restrict the list of protocols and cipher suites used by setting the `ssl-protocol` and `ssl-cipher-suite` connection handler properties to include only the protocols or cipher suites you want.

For example, to restrict the cipher suites to `TLS_EMPTY_RENEGOTIATION_INFO_SCSV` and `TLS_RSA_WITH_AES_256_CBC_SHA` use the `dsconfig set-connection-handler-prop` command as shown in the following example:
To limit the LDAPS listener to TLS 1.2 and 1.3, set both values in one command.

[source, console]
----
$ dsconfig \
set-connection-handler-prop \
set-connection-handler-prop \
--port 4444 \
--hostname opendj.example.com \
--bindDN "cn=Directory Manager" \
--bindPassword password \
--handler-name "LDAPS Connection Handler" \
--add ssl-cipher-suite:TLS_EMPTY_RENEGOTIATION_INFO_SCSV \
--add ssl-cipher-suite:TLS_RSA_WITH_AES_256_CBC_SHA \
--set ssl-protocol:TLSv1.2 \
--set ssl-protocol:TLSv1.3 \
--no-prompt \
--trustAll
----
To restrict cipher suites, use one `--set ssl-cipher-suite:<suite>` per suite. Repeat the root DSE search to verify the settings.


[#client-cert-validation]
Expand Down Expand Up @@ -1799,14 +1759,20 @@ The bind password for the user.
[#ldif-access]
=== LDIF File Access

The LDIF connection handler lets you make changes to directory data by placing LDIF in a file system directory that OpenDJ server regularly polls for changes. The LDIF, once consumed, is deleted.

You configure LDIF file access by using the command-line tool `dsconfig`.
The LDIF connection handler runs change records from `.ldif` files as internal operations. Give write access to the server account and trusted data loaders. Check the `.applied.*` file for results. The handler removes processed input files or renames them with `.errors-encountered.*` after a parsing or I/O error.

[#setup-ldif-access]
.To Set Up LDIF File Access
====

. Create the default input directory under the server instance.
+

[source, console]
----
$ mkdir /path/to/opendj/config/auto-process-ldif
----

. Activate LDIF file access:
+

Expand All @@ -1826,16 +1792,6 @@ $ dsconfig \
+
The change takes effect immediately.

. Add the directory where you put LDIF to be processed:
+

[source, console]
----
$ mkdir /path/to/opendj/config/auto-process-ldif
----
+
This example uses the default value of the `ldif-directory` property for the LDIF connection handler.

====


Expand Down
Loading
Loading