Skip to content

Commit 8ff967f

Browse files
committed
Merge branch 'hotfix-1.2.1' into stable
2 parents e775d12 + de20d4d commit 8ff967f

File tree

8 files changed

+35
-27
lines changed

8 files changed

+35
-27
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [1.2.1] - 2018-05-14
8+
### Security
9+
- The default "write" access to "*" by "self" in the file "config/bootstrap/ldif/02-security.ldif" allowed anyone to change all the data about himself. This includes the gid and uid numbers what could lead to serious security issues.
10+
11+
This has been changed to ```olcAccess: to * by self read by dn="cn=admin,{{ LDAP_BASE_DN }}" write by * none"```
12+
13+
Thanks to Francesc Escale for reporting this.
14+
715
## [1.2.0] - 2018-03-02
816
### Changed
917
- Use mdb as default backend

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = osixia/openldap
2-
VERSION = 1.2.0
2+
VERSION = 1.2.1
33

44
.PHONY: build build-nocache test tag-latest push push-latest release git-tag-version
55

README.md

+21-21
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
![Docker Stars](https://img.shields.io/docker/stars/osixia/openldap.svg)
55
![](https://images.microbadger.com/badges/image/osixia/openldap.svg)
66

7-
Latest release: 1.2.0 - OpenLDAP 2.4.44 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/openldap/) 
7+
Latest release: 1.2.1 - OpenLDAP 2.4.44 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/openldap/) 
88

99
**A docker image to run OpenLDAP.**
1010

@@ -35,7 +35,7 @@ Latest release: 1.2.0 - OpenLDAP 2.4.44 - [Changelog](CHANGELOG.md) | [Docker H
3535
- [Link environment file](#link-environment-file)
3636
- [Make your own image or extend this image](#make-your-own-image-or-extend-this-image)
3737
- [Advanced User Guide](#advanced-user-guide)
38-
- [Extend osixia/openldap:1.2.0 image](#extend-osixiaopenldap120-image)
38+
- [Extend osixia/openldap:1.2.1 image](#extend-osixiaopenldap121-image)
3939
- [Make your own openldap image](#make-your-own-openldap-image)
4040
- [Tests](#tests)
4141
- [Kubernetes](#kubernetes)
@@ -55,7 +55,7 @@ If you find this image useful here's how you can help:
5555
## Quick Start
5656
Run OpenLDAP docker image:
5757

58-
docker run --name my-openldap-container --detach osixia/openldap:1.2.0
58+
docker run --name my-openldap-container --detach osixia/openldap:1.2.1
5959

6060
This start a new container with OpenLDAP running inside. Let's make the first search in our LDAP container:
6161

@@ -91,7 +91,7 @@ It will create an empty ldap for the company **Example Inc.** and the domain **e
9191
By default the admin has the password **admin**. All those default settings can be changed at the docker command line, for example:
9292

9393
docker run --env LDAP_ORGANISATION="My Company" --env LDAP_DOMAIN="my-company.com" \
94-
--env LDAP_ADMIN_PASSWORD="JonSn0w" --detach osixia/openldap:1.2.0
94+
--env LDAP_ADMIN_PASSWORD="JonSn0w" --detach osixia/openldap:1.2.1
9595

9696
#### Data persistence
9797

@@ -141,12 +141,12 @@ argument to entrypoint if you don't want to overwrite them.
141141
# single file example:
142142
docker run \
143143
--volume ./bootstrap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/50-bootstrap.ldif \
144-
osixia/openldap:1.2.0 --copy-service
144+
osixia/openldap:1.2.1 --copy-service
145145

146146
#directory example:
147147
docker run \
148148
--volume ./lidf:/container/service/slapd/assets/config/bootstrap/ldif/custom \
149-
osixia/openldap:1.2.0 --copy-service
149+
osixia/openldap:1.2.1 --copy-service
150150

151151
### Use an existing ldap database
152152

@@ -157,7 +157,7 @@ simply mount this directories as a volume to `/var/lib/ldap` and `/etc/ldap/slap
157157

158158
docker run --volume /data/slapd/database:/var/lib/ldap \
159159
--volume /data/slapd/config:/etc/ldap/slapd.d \
160-
--detach osixia/openldap:1.2.0
160+
--detach osixia/openldap:1.2.1
161161

162162
You can also use data volume containers. Please refer to:
163163
> [https://docs.docker.com/engine/tutorials/dockervolumes/](https://docs.docker.com/engine/tutorials/dockervolumes/)
@@ -177,7 +177,7 @@ If you are looking for a simple solution to administrate your ldap server you ca
177177
#### Use auto-generated certificate
178178
By default, TLS is already configured and enabled, certificate is created using container hostname (it can be set by docker run --hostname option eg: ldap.example.org).
179179

180-
docker run --hostname ldap.my-company.com --detach osixia/openldap:1.2.0
180+
docker run --hostname ldap.my-company.com --detach osixia/openldap:1.2.1
181181

182182
#### Use your own certificate
183183

@@ -187,24 +187,24 @@ You can set your custom certificate at run time, by mounting a directory contain
187187
--env LDAP_TLS_CRT_FILENAME=my-ldap.crt \
188188
--env LDAP_TLS_KEY_FILENAME=my-ldap.key \
189189
--env LDAP_TLS_CA_CRT_FILENAME=the-ca.crt \
190-
--detach osixia/openldap:1.2.0
190+
--detach osixia/openldap:1.2.1
191191

192192
Other solutions are available please refer to the [Advanced User Guide](#advanced-user-guide)
193193

194194
#### Disable TLS
195195
Add --env LDAP_TLS=false to the run command:
196196

197-
docker run --env LDAP_TLS=false --detach osixia/openldap:1.2.0
197+
docker run --env LDAP_TLS=false --detach osixia/openldap:1.2.1
198198

199199
### Multi master replication
200200
Quick example, with the default config.
201201

202202
#Create the first ldap server, save the container id in LDAP_CID and get its IP:
203-
LDAP_CID=$(docker run --hostname ldap.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.2.0)
203+
LDAP_CID=$(docker run --hostname ldap.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.2.1)
204204
LDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $LDAP_CID)
205205

206206
#Create the second ldap server, save the container id in LDAP2_CID and get its IP:
207-
LDAP2_CID=$(docker run --hostname ldap2.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.2.0)
207+
LDAP2_CID=$(docker run --hostname ldap2.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.2.1)
208208
LDAP2_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $LDAP2_CID)
209209

210210
#Add the pair "ip hostname" to /etc/hosts on each containers,
@@ -240,7 +240,7 @@ You may have some problems with mounted files on some systems. The startup scrip
240240

241241
To fix that run the container with `--copy-service` argument :
242242

243-
docker run [your options] osixia/openldap:1.2.0 --copy-service
243+
docker run [your options] osixia/openldap:1.2.1 --copy-service
244244

245245
### Debug
246246

@@ -249,11 +249,11 @@ Available levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`.
249249

250250
Example command to run the container in `debug` mode:
251251

252-
docker run --detach osixia/openldap:1.2.0 --loglevel debug
252+
docker run --detach osixia/openldap:1.2.1 --loglevel debug
253253

254254
See all command line options:
255255

256-
docker run osixia/openldap:1.2.0 --help
256+
docker run osixia/openldap:1.2.1 --help
257257

258258

259259
## Environment Variables
@@ -318,7 +318,7 @@ Replication options:
318318

319319
If you want to set this variable at docker run command add the tag `#PYTHON2BASH:` and convert the yaml in python:
320320

321-
docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.2.0
321+
docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.2.1
322322

323323
To convert yaml to python online: http://yaml-online-parser.appspot.com/
324324

@@ -338,7 +338,7 @@ Other environment variables:
338338
Environment variables can be set by adding the --env argument in the command line, for example:
339339

340340
docker run --env LDAP_ORGANISATION="My company" --env LDAP_DOMAIN="my-company.com" \
341-
--env LDAP_ADMIN_PASSWORD="JonSn0w" --detach osixia/openldap:1.2.0
341+
--env LDAP_ADMIN_PASSWORD="JonSn0w" --detach osixia/openldap:1.2.1
342342

343343
Be aware that environment variable added in command line will be available at any time
344344
in the container. In this example if someone manage to open a terminal in this container
@@ -349,28 +349,28 @@ he will be able to read the admin password in clear text from environment variab
349349
For example if your environment files **my-env.yaml** and **my-env.startup.yaml** are in /data/ldap/environment
350350

351351
docker run --volume /data/ldap/environment:/container/environment/01-custom \
352-
--detach osixia/openldap:1.2.0
352+
--detach osixia/openldap:1.2.1
353353

354354
Take care to link your environment files folder to `/container/environment/XX-somedir` (with XX < 99 so they will be processed before default environment files) and not directly to `/container/environment` because this directory contains predefined baseimage environment files to fix container environment (INITRD, LANG, LANGUAGE and LC_CTYPE).
355355

356356
Note: the container will try to delete the **\*.startup.yaml** file after the end of startup files so the file will also be deleted on the docker host. To prevent that : use --volume /data/ldap/environment:/container/environment/01-custom**:ro** or set all variables in **\*.yaml** file and don't use **\*.startup.yaml**:
357357

358358
docker run --volume /data/ldap/environment/my-env.yaml:/container/environment/01-custom/env.yaml \
359-
--detach osixia/openldap:1.2.0
359+
--detach osixia/openldap:1.2.1
360360

361361
#### Make your own image or extend this image
362362

363363
This is the best solution if you have a private registry. Please refer to the [Advanced User Guide](#advanced-user-guide) just below.
364364

365365
## Advanced User Guide
366366

367-
### Extend osixia/openldap:1.2.0 image
367+
### Extend osixia/openldap:1.2.1 image
368368

369369
If you need to add your custom TLS certificate, bootstrap config or environment files the easiest way is to extends this image.
370370

371371
Dockerfile example:
372372

373-
FROM osixia/openldap:1.2.0
373+
FROM osixia/openldap:1.2.1
374374
MAINTAINER Your Name <[email protected]>
375375

376376
ADD bootstrap /container/service/slapd/assets/config/bootstrap

example/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '2'
22
services:
33
openldap:
4-
image: osixia/openldap:1.2.0
4+
image: osixia/openldap:1.2.1
55
container_name: openldap
66
environment:
77
LDAP_LOG_LEVEL: "256"

example/extend-osixia-openldap/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM osixia/openldap:1.2.0
1+
FROM osixia/openldap:1.2.1
22
MAINTAINER Your Name <[email protected]>
33

44
ADD bootstrap /container/service/slapd/assets/config/bootstrap

example/kubernetes/simple/ldap-deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
spec:
1414
containers:
1515
- name: ldap
16-
image: osixia/openldap:1.2.0
16+
image: osixia/openldap:1.2.1
1717
volumeMounts:
1818
- name: ldap-data
1919
mountPath: /var/lib/ldap

example/kubernetes/using-secrets/ldap-deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
spec:
1414
containers:
1515
- name: ldap
16-
image: osixia/openldap:1.2.0
16+
image: osixia/openldap:1.2.1
1717
args: ["--copy-service"]
1818
volumeMounts:
1919
- name: ldap-data

image/service/slapd/assets/config/bootstrap/ldif/02-security.ldif

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ delete: olcAccess
44
-
55
add: olcAccess
66
olcAccess: to attrs=userPassword,shadowLastChange by self write by dn="cn=admin,{{ LDAP_BASE_DN }}" write by anonymous auth by * none
7-
olcAccess: to * by self write by dn="cn=admin,{{ LDAP_BASE_DN }}" write by * none
7+
olcAccess: to * by self read by dn="cn=admin,{{ LDAP_BASE_DN }}" write by * none

0 commit comments

Comments
 (0)