mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valery Kharseko
23 hours ago 92ea60ad34783ab90ab7e2574f2169fc8ef03900
refs
author Valery Kharseko <vharseko@3a-systems.ru>
Sunday, October 4, 2026 09:24 +0200
committer GitHub <noreply@github.com>
Sunday, October 4, 2026 09:24 +0200
commit92ea60ad34783ab90ab7e2574f2169fc8ef03900
tree de86838c341efc1a8ffcc303140807c0efd09d50 tree | zip | gz
parent 458f009de6ccb989ac565da62ac407f20755303e view | diff
[#1157] Quote BASE_DN when the Docker bootstrap creates the userRoot backend (#1164)

Fixes #1157

### Problem

`bootstrap/setup.sh` passed the base DN to `dsconfig create-backend`
without quotes:

```sh
--set base-dn:$BASE_DN
```

If `BASE_DN` contains a space, for example `o=My Company,c=US`, the
shell splits it into `base-dn:o=My` and a stray
argument `Company,c=US`. dsconfig rejects the command line and `|| exit
1` stops the bootstrap at "creating backend".
The container never becomes healthy.

### Change

- **`setup.sh`**: `--set "base-dn:$BASE_DN"`. This was the only unquoted
use of `BASE_DN` in the Docker scripts.
- **`build.yml`**: a new step, `Docker test base DN with a space`, in
both image jobs (default and alpine), right after
`Docker test custom password`. It starts a container with `BASE_DN="o=My
Company,c=US"` and `--addBaseEntry`, waits
for it to become healthy, and checks that a base search returns `dn:
o=My Company,c=US`.

### Testing

I built the image locally from master's server zip and ran it with that
base DN.

- Without the fix, the container logs the error below and stays in
`starting`:

```
creating backend: je db-directory: db
An error occurred while parsing the command-line arguments: Argument
"Company,c=US" does not start with one or two dashes and unnamed
trailing
arguments are not allowed
```

- With the fix, the container becomes healthy and the base search
returns `dn: o=My Company,c=US`. The check the new
step makes passes.
2 files modified
22 ■■■■■ changed files
.github/workflows/build.yml 20 ●●●●● diff | view | raw | blame | history
opendj-packages/opendj-docker/bootstrap/setup.sh 2 ●●●●● diff | view | raw | blame | history