Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
(#1 of 10) |
Lecture notes |
Pdf slides |
|
(#2 of 10) |
Lecture notes |
Pdf slides |
|
(#3 of 10) |
Lecture notes |
Pdf slides |
|
(#4 of 10) |
Lecture notes |
Pdf slides |
|
(#5 of 10) |
Lecture notes |
Pdf slides |
|
(#6 of 10) |
Lecture notes |
Pdf slides |
|
(#7 of 10) |
Lecture notes |
Pdf slides |
|
(#8 of 10) |
Lecture notes |
Pdf slides |
|
(#9 of 10) |
Lecture notes |
Pdf slides |
|
(#10 of 10) |
Lecture notes |
Pdf slides |
|
(#1 of 10) |
Lecture notes |
Pdf slides |
|
(#2 of 10) |
Lecture notes |
Pdf slides |
|
(#3 of 10) |
Lecture notes |
Pdf slides |
|
(#4 of 10) |
Lecture notes |
Pdf slides |
|
(#5 of 10) |
Lecture notes |
Pdf slides |
|
(#6 of 10) |
Lecture notes |
Pdf slides |
|
(#7 of 10) |
Lecture notes |
Pdf slides |
|
(#8 of 10) |
Lecture notes |
Pdf slides |
|
(#9 of 10) |
Lecture notes |
Pdf slides |
|
(#10 of 10) |
Lecture notes |
Pdf slides |
|
(#1 of 4) |
Lecture notes |
Pdf slides |
|
(#2 of 4) |
Lecture notes |
Pdf slides |
|
(#3 of 4) |
Lecture notes |
Pdf slides |
|
(#4 of 4) |
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
(#1 of 4) |
Lecture notes |
Pdf slides |
|
(#2 of 4) |
Lecture notes |
Pdf slides |
|
(#3 of 4) |
Lecture notes |
Pdf slides |
|
(#4 of 4) |
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
Lecture notes |
Pdf slides |
|
OS specific instructions at Install Docker
Engine
.
Windows: Make sure to install Windows Subsystem for Linux version 2 (WSL 2). Install Ubuntu from Microsoft's App store and follow Docker Desktop WSL 2 backend.
Read the introductory slides at LDAP as well.
docker run --detach ❶ \ --name openldap ❷\ -p 389:389 \ ❸ --env LDAP_ORGANISATION="Betrayers heaven" \ ❹ --env LDAP_TLS=false ❺\ --env LDAP_DOMAIN="betrayer.com" ❻\ --env LDAP_ADMIN_PASSWORD="secret" ❼\ --env LDAP_CONFIG_PASSWORD="secret" ❽\ --volume ~/OpenLdap/Data:/var/lib/ldap ❾\ --volume ~/OpenLdap/Config:/etc/ldap/slapd.d ❾\ osixia/openldap:1.4.0 ❿
version: '3.7'
services:
openldap:
image: osixia/openldap:1.4.0
container_name: openldap
restart: always
environment:
LDAP_ORGANISATION: "Betrayers heaven"
LDAP_TLS: "false"
LDAP_DOMAIN: "betrayer.com"
LDAP_ADMIN_PASSWORD: "secret"
LDAP_CONFIG_PASSWORD: "secret"
ports:
- 389:389
volumes:
- ~/OpenLdap/Data:/var/lib/ldap
- ~/OpenLdap/Config:/etc/ldap/slapd.d
Download and install Apache Directory Studio.
Configure access to your local docker container.
dn: uid=smith ❶,dc=betrayer,dc=com ❷ changetype: add ❸ objectClass: inetOrgPerson ❹ objectClass: organizationalPerson ❹ objectClass: Person ❹ objectClass: top ❹ uid: smith ❺ cn: Jill Smith ❻ sn: Smith ❻
Operation | Result |
---|---|
dn: uid=smith,dc=betrayer,dc=com ❶ changetype: modify ❷ add: description ❸ description: New employee ❹ |
dn: uid=smith,dc=betrayer,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
cn: Jill Smith
sn: Smith
uid: smith
description: New employee |
Operation | Result |
---|---|
dn: uid=smith,dc=betrayer,dc=com ❶ changetype: modify ❷ replace: description ❸ description: Long term employee ❹ |
dn: uid=smith,dc=betrayer,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
cn: Jill Smith
sn: Smith
uid: smith
description: Long term employee |
Base state | Operation | Result |
---|---|---|
dn: uid=smith,dc=betrayer,dc=com
...
uid: smith
commonName: Jill Smith
surname: Smith
description: Long term employee |
|
|
Base state | Operation |
---|---|
|
dn: uid=smith,dc=betrayer,dc=com changetype: modify add: mail ❶ mail: smith@company.com ❷ mail: jsmith@privateaccount.org ❸ mail: smith@company.com ❹ ERR_13207_VALUE_ALREADY_EXISTS ❹ The value 'smith@company.com' already exists in the attribute (mail) |
Base state | Operation | Result |
---|---|---|
dn: uid=smith,dc=betrayer,dc=com ... cn: Jill Smith mail: jsmith@privateaccount.org mail: smith@company.com mail: anonymous@keeput.org |
dn: uid=smith,dc=... changetype: modify delete: mail mail: smith@company.com mail: anonymous@keeput.org |
|
SubordinateSubtree (not yet officially standardized)
|
|
|
|
access to attrs=matrikelNr by dn="uid=goik,ou=userlist,dc=hdm-stuttgart,dc=de" read by dn="uid=kuhn,ou=userlist,dc=hdm-stuttgart,dc=de" read by self read by * none access to attrs=userPassword,shadowLastChange,passwordClear by dn="uid=Administrator,ou=people,ou=MI,ou=domainlist,dc=hdm-stuttgart,dc=de" read by anonymous auth by * none
Work through the exercises the section called “Browse an existing LDAP Server” and the section called “Populating your DIT.” to the section called “Extending an existing entry”.
When logging in as a non - admin user
i.e. using a bind DN
like uid=petra,ou=MIB,ou=MI,dc=betrayer,dc=com
you will not be able to browse your tree. This action requires
a permission setting to be changed in
olcDatabase={1}mdb,cn=config of your server's
configuration tree
. Follow these steps:
Log in to your server's configuration using
cn=admin,cn=config
as in Figure 790, “Administrator access to your server's configuration”.
Select your database backend node below
cn=config
.
Replace:
to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage by * break
By:
to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage by * read
Find your LDAP servers database back end. Install the lmdb-utils package and dump your back end's data.
Create an application reading
ldap.hdm-stuttgart.de
's data and writing
corresponding student entries back to your local LDAP server.
Document oriented (hierarchy support).
Horizontal scaling (Sharding)
Large user community
Major programming languages API support.
Open Source
docker run -d \ --name localMongoDb ❶\ -e MONGO_INITDB_ROOT_USERNAME=admin ❷\ -e MONGO_INITDB_ROOT_PASSWORD=secret ❷\ -e MONGO_INITDB_DATABASE=admin ❸\ -v ~/Data/Mongo:/data/db ❹\ -p 27017:27017 ❺\ mongo:4.4.1 ❻
docker-compose.yml |
mongo-init.js |
---|---|
version: '3.7' services: mongodb: image: mongo:4.4.1 container_name: mongodb restart: always environment: MONGO_INITDB_ROOT_USERNAME: admin MONGO_INITDB_ROOT_PASSWORD: secret ports: - 27017:27017 volumes: - ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro |
|
|
> mongo -u admin -p secret admin
...
db.createUser(
... {
... user: "explorer",
... pwd: "secret",
... roles: [
... {
... role: "readWrite",
... db: "exploredb"
... }
... ],
... passwordDigestor: "server"
... }
... );
Successfully added user: { "user" : "explorer"...
> mongo -u explorer -p secret admin
...
> use exploredb
switched to db exploredb
> db.user.insert(
... { cname: "Eve Gardener",
... uid: "gardener",
... email: "gardener@betrayer.com"
... }
... )
WriteResult({ "nInserted" : 1 })
>
> db.user.find()
{ "_id" : ObjectId("5fa1c79d661a55242658f135"),
"cname" : "Eve Gardener", "uid" : "gardener", "email" : "gardener@betrayer.com" }
View --> Tool Windows --> Database
Data Source --> MongoDB
Code | Result |
---|---|
|
db.group.find() [ { "_id": {"$oid": "5fa3035932b87a0c60a6ed1a"}, "cname": "New users", "gid": "users" } ] |
Code | Result |
---|---|
|
[ { "acknowledged": true, "deletedCount": 1 } ] |
Code | Result |
---|---|
|
[
{
"acknowledged": true,
"deletedCount": 23
}
] |
Code | Result |
---|---|
db.group.update( {_id: ObjectId( "5fa3035932b87a0c60a6ed1a")}, { $unset: { gidNumber: 42 ❶ } } ) |
db.group.find() [ { "_id": {"$oid": "5fa3035932b87a0c60a6ed1a"}, "cname": "My users", "gid": "users" } ] |
|
|
|
... Bulk write operation error on server localhost:27017.
Write errors: [BulkWriteError{index=0, code=121,
message='Document failed validation', details={}}]. |
See BSON Types for reference.
|
com.mongodb.MongoBulkWriteException:
Bulk write operation error on server localhost:27017.
Write errors: [BulkWriteError{index=0, code=11000,
message='E11000 duplicate key error collection:
exploredb.group index: cname_1 dup key:
{ cname: "Extra users" }', details={}}]. |
No way to enforce referential integrity rules.
Problem: Large datasets / high throughput
Two alternatives:
Vertical scaling: RAM, cpu,...
Horizontal scaling: Load distribution by multiple nodes.
See sharded-cluster for details.