Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf5fd1d570 | ||
|
|
2af71e9a08 | ||
|
|
e64e1d5397 |
No files matched your search
@@ -263,9 +263,40 @@ MAIL_SERVER_DOCKER_TAG=v1.28.0
|
||||
#MONITORING_COLLABORATION=m_collaboration.yml
|
||||
#MONITORING_COLLABORATION_OO=m_collaboration-oo.yml
|
||||
|
||||
### Keycloak Settings ###
|
||||
# Enable Keycloak as external OIDC provider.
|
||||
# Note: the leading colon is required to enable the service.
|
||||
#KEYCLOAK=:keycloak.yml
|
||||
# Domain of Keycloak, where you can find the management and authentication frontend.
|
||||
# Defaults to "keycloak.owncloud.test"
|
||||
KEYCLOAK_DOMAIN=
|
||||
# Realm used by oCIS. Defaults to "oCIS".
|
||||
KEYCLOAK_REALM=
|
||||
# ownCloud Web OpenID Connect client id. Defaults to "web".
|
||||
OCIS_OIDC_CLIENT_ID=
|
||||
# The recommended (and tested) version to pull. Defaults to "26.2.5".
|
||||
KEYCLOAK_DOCKER_TAG=
|
||||
# Keycloak bootstrap admin credentials (change these for production).
|
||||
KEYCLOAK_ADMIN_USER=admin
|
||||
KEYCLOAK_ADMIN_PASSWORD=change-me-keycloak-admin-password
|
||||
# Keycloak database credentials (change password for production).
|
||||
KEYCLOAK_DB_NAME=keycloak
|
||||
KEYCLOAK_DB_USER=keycloak
|
||||
KEYCLOAK_DB_PASSWORD=change-me-keycloak-db-password
|
||||
|
||||
### External LDAP (OpenLDAP) Settings ###
|
||||
# Enable external LDAP (OpenLDAP).
|
||||
# Note: the leading colon is required to enable the service.
|
||||
#OPENLDAP=:openldap.yml
|
||||
# Password of LDAP user "cn=admin,dc=owncloud,dc=com" (change for production).
|
||||
LDAP_ADMIN_PASSWORD=change-me-openldap-admin-password
|
||||
# Controls whether oCIS Graph can write to LDAP.
|
||||
# Set to "false" for read-only (safer default), "true" for write-enabled.
|
||||
GRAPH_LDAP_SERVER_WRITE_ENABLED=false
|
||||
|
||||
|
||||
## IMPORTANT ##
|
||||
# This MUST be the last line as it assembles the supplemental compose files to be used.
|
||||
# ALL supplemental configs must be added here, whether commented or not.
|
||||
# Each var must either be empty or contain :path/file.yml
|
||||
COMPOSE_FILE=docker-compose.yml${OCIS:-}${TIKA:-}${S3NG:-}${S3NG_MINIO:-}${COLLABORA:-}${IMPORTER:-}${CLAMAV:-}${ONLYOFFICE:-}${EXTENSIONS:-}${UNZIP:-}${DRAWIO:-}${JSONVIEWER:-}${PROGRESSBARS:-}${EXTERNALSITES:-}${MAIL_SERVER:-}${MONITORING:-}
|
||||
COMPOSE_FILE=docker-compose.yml${OCIS:-}${TIKA:-}${S3NG:-}${S3NG_MINIO:-}${COLLABORA:-}${IMPORTER:-}${CLAMAV:-}${ONLYOFFICE:-}${EXTENSIONS:-}${UNZIP:-}${DRAWIO:-}${JSONVIEWER:-}${PROGRESSBARS:-}${EXTERNALSITES:-}${MAIL_SERVER:-}${MONITORING:-}${KEYCLOAK:-}${OPENLDAP:-}
|
||||
@@ -15,4 +15,53 @@ This deployment example is documented in two locations for different audiences:
|
||||
Providing details which are more developer focused. This description can also be used when deviating from the default.\
|
||||
Note that this examples uses self signed certificates and is intended for testing purposes.
|
||||
|
||||
## Optional Features
|
||||
|
||||
`ocis_full` enables optional components through `.env` and `COMPOSE_FILE`.
|
||||
|
||||
Enable Keycloak:
|
||||
|
||||
```bash
|
||||
KEYCLOAK=:keycloak.yml
|
||||
```
|
||||
|
||||
Enable OpenLDAP:
|
||||
|
||||
```bash
|
||||
OPENLDAP=:openldap.yml
|
||||
```
|
||||
|
||||
Enable both:
|
||||
|
||||
```bash
|
||||
KEYCLOAK=:keycloak.yml
|
||||
OPENLDAP=:openldap.yml
|
||||
```
|
||||
|
||||
When both are enabled, the recommended full setup is:
|
||||
|
||||
- Keycloak is the OIDC provider for user authentication.
|
||||
- OpenLDAP is the identity directory backend for oCIS Graph users and groups.
|
||||
- Optional recommendation: configure Keycloak User Federation to read users from LDAP.
|
||||
|
||||
## Run Commands
|
||||
|
||||
```bash
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
docker compose ps
|
||||
docker compose logs -f ocis
|
||||
docker compose logs -f keycloak
|
||||
docker compose logs -f openldap
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- OIDC issuer / redirect URI mismatch:
|
||||
Confirm `OCIS_OIDC_ISSUER` and `KEYCLOAK_DOMAIN` match the Keycloak realm URL and that the Keycloak `web` client redirect URI matches your `OCIS_DOMAIN`.
|
||||
- Keycloak behind reverse proxy:
|
||||
Verify `KC_PROXY_HEADERS=xforwarded`, `KC_HTTP_ENABLED=true`, and Traefik is routing `Host(<KEYCLOAK_DOMAIN>)` to Keycloak port `8080`.
|
||||
- LDAP bind DN / base DN issues:
|
||||
Check `LDAP_ADMIN_PASSWORD`, bind DN `cn=admin,dc=owncloud,dc=com`, user base DN `ou=users,dc=owncloud,dc=com`, and group base DN `ou=groups,dc=owncloud,dc=com`.
|
||||
- oCIS cannot list users/groups:
|
||||
Inspect logs from `ocis` and `openldap`, then verify `GRAPH_LDAP_*` settings and whether `GRAPH_LDAP_SERVER_WRITE_ENABLED` should remain `false` (read-only) or be switched to `true`.
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# replace oCIS domain in keycloak realm import
|
||||
mkdir -p /opt/keycloak/data/import
|
||||
sed -e "s/ocis.owncloud.test/${OCIS_DOMAIN}/g" /opt/keycloak/data/import-dist/ocis-realm.json > /opt/keycloak/data/import/oCIS-realm.json
|
||||
|
||||
# run original docker-entrypoint
|
||||
/opt/keycloak/bin/kc.sh "$@"
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,8 @@
|
||||
# groupOfNames requires at least one member to be present
|
||||
# The refint will use this dn if the last member of the group
|
||||
# has been removed
|
||||
dn: cn=nobody,dc=owncloud,dc=com
|
||||
objectClass: top
|
||||
objectClass: organizationalRole
|
||||
description: to be used for refint in empty groups
|
||||
cn: nobody
|
||||
@@ -0,0 +1,14 @@
|
||||
# configure memberof overlay to use groupOfNames and member attributes
|
||||
dn: olcOverlay={0}memberof,olcDatabase={1}mdb,cn=config
|
||||
changetype: modify
|
||||
replace: olcMemberOfGroupOC
|
||||
olcMemberOfGroupOC: groupOfNames
|
||||
-
|
||||
replace: olcMemberOfMemberAD
|
||||
olcMemberOfMemberAD: member
|
||||
|
||||
# configure refint overlay to use nobody if no member is present
|
||||
dn: olcOverlay={1}refint,olcDatabase={1}mdb,cn=config
|
||||
changetype: modify
|
||||
replace: olcRefintNothing
|
||||
olcRefintNothing: cn=nobody,dc=owncloud,dc=com
|
||||
@@ -0,0 +1,14 @@
|
||||
# the owncloud organization is already setup by osixia configuration
|
||||
#dn: dc=owncloud,dc=com
|
||||
#objectClass: organization
|
||||
#objectClass: dcObject
|
||||
#dc: owncloud
|
||||
#o: ownCloud
|
||||
|
||||
dn: ou=users,dc=owncloud,dc=com
|
||||
objectClass: organizationalUnit
|
||||
ou: users
|
||||
|
||||
dn: ou=groups,dc=owncloud,dc=com
|
||||
objectClass: organizationalUnit
|
||||
ou: groups
|
||||
@@ -0,0 +1,100 @@
|
||||
# Start dn with uid (user identifier / login), not cn (Firstname + Surname)
|
||||
dn: uid=einstein,ou=users,dc=owncloud,dc=com
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
objectClass: ownCloudUser
|
||||
objectClass: person
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
uid: einstein
|
||||
givenName: Albert
|
||||
sn: Einstein
|
||||
cn: einstein
|
||||
displayName: Albert Einstein
|
||||
description: A German-born theoretical physicist who developed the theory of relativity, one of the two pillars of modern physics (alongside quantum mechanics).
|
||||
mail: einstein@example.org
|
||||
uidNumber: 20000
|
||||
gidNumber: 30000
|
||||
homeDirectory: /home/einstein
|
||||
ownCloudUUID: 4c510ada-c86b-4815-8820-42cdf82c3d51
|
||||
userPassword:: e1NTSEF9TXJEcXpFNGdKbXZxbVRVTGhvWEZ1VzJBbkV3NWFLK3J3WTIvbHc9PQ==
|
||||
|
||||
dn: uid=marie,ou=users,dc=owncloud,dc=com
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
objectClass: ownCloudUser
|
||||
objectClass: person
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
uid: marie
|
||||
givenName: Marie
|
||||
sn: Curie
|
||||
cn: marie
|
||||
displayName: Marie Skłodowska Curie
|
||||
description: A Polish and naturalized-French physicist and chemist who conducted pioneering research on radioactivity.
|
||||
mail: marie@example.org
|
||||
uidNumber: 20001
|
||||
gidNumber: 30000
|
||||
homeDirectory: /home/marie
|
||||
ownCloudUUID: f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c
|
||||
userPassword:: e1NTSEF9UmFvQWs3TU9jRHBIUWY3bXN3MGhHNnVraFZQWnRIRlhOSUNNZEE9PQ==
|
||||
|
||||
dn: uid=richard,ou=users,dc=owncloud,dc=com
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
objectClass: ownCloudUser
|
||||
objectClass: person
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
uid: richard
|
||||
givenName: Richard
|
||||
sn: Feynman
|
||||
cn: richard
|
||||
displayName: Richard Phillips Feynman
|
||||
description: An American theoretical physicist, known for his work in the path integral formulation of quantum mechanics, the theory of quantum electrodynamics, the physics of the superfluidity of supercooled liquid helium, as well as his work in particle physics for which he proposed the parton model.
|
||||
mail: richard@example.org
|
||||
uidNumber: 20002
|
||||
gidNumber: 30000
|
||||
homeDirectory: /home/richard
|
||||
ownCloudUUID: 932b4540-8d16-481e-8ef4-588e4b6b151c
|
||||
userPassword:: e1NTSEF9Z05LZTRreHdmOGRUREY5eHlhSmpySTZ3MGxSVUM1d1RGcWROTVE9PQ==
|
||||
|
||||
dn: uid=moss,ou=users,dc=owncloud,dc=com
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
objectClass: ownCloudUser
|
||||
objectClass: person
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
uid: moss
|
||||
givenName: Maurice
|
||||
sn: Moss
|
||||
cn: moss
|
||||
displayName: Maurice Moss
|
||||
description: A worker in the IT Department of Reynholm Industries. Of all the working staff in the IT Department, he is the most hard-working, the most experienced, and the most capable of doing his job well. He puts a lot of effort into his work, however he does not get the credit he deserves.
|
||||
mail: moss@example.org
|
||||
uidNumber: 20003
|
||||
gidNumber: 30000
|
||||
homeDirectory: /home/moss
|
||||
ownCloudUUID: 058bff95-6708-4fe5-91e4-9ea3d377588b
|
||||
userPassword:: e1NTSEF9N0hEdTRoMkFDVExFWWt4U0RtSDZVQjhmUlpKRExDZDc=
|
||||
|
||||
dn: uid=admin,ou=users,dc=owncloud,dc=com
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: organizationalPerson
|
||||
objectClass: ownCloudUser
|
||||
objectClass: person
|
||||
objectClass: posixAccount
|
||||
objectClass: top
|
||||
uid: admin
|
||||
givenName: Admin
|
||||
sn: Admin
|
||||
cn: admin
|
||||
displayName: Admin
|
||||
description: An admin for this oCIS instance.
|
||||
mail: admin@example.org
|
||||
uidNumber: 20004
|
||||
gidNumber: 30000
|
||||
homeDirectory: /home/admin
|
||||
ownCloudUUID: ddc2004c-0977-11eb-9d3f-a793888cd0f8
|
||||
userPassword:: e1NTSEF9UWhmaFB3dERydTUydURoWFFObDRMbzVIckI3TkI5Nmo=
|
||||
@@ -0,0 +1,77 @@
|
||||
dn: cn=users,ou=groups,dc=owncloud,dc=com
|
||||
objectClass: groupOfNames
|
||||
objectClass: ownCloud
|
||||
objectClass: top
|
||||
cn: users
|
||||
description: Users
|
||||
ownCloudUUID: 509a9dcd-bb37-4f4f-a01a-19dca27d9cfa
|
||||
member: uid=einstein,ou=users,dc=owncloud,dc=com
|
||||
member: uid=marie,ou=users,dc=owncloud,dc=com
|
||||
member: uid=richard,ou=users,dc=owncloud,dc=com
|
||||
member: uid=moss,ou=users,dc=owncloud,dc=com
|
||||
member: uid=admin,ou=users,dc=owncloud,dc=com
|
||||
|
||||
dn: cn=sailing-lovers,ou=groups,dc=owncloud,dc=com
|
||||
objectClass: groupOfNames
|
||||
objectClass: ownCloud
|
||||
objectClass: top
|
||||
cn: sailing-lovers
|
||||
description: Sailing lovers
|
||||
ownCloudUUID: 6040aa17-9c64-4fef-9bd0-77234d71bad0
|
||||
member: uid=einstein,ou=users,dc=owncloud,dc=com
|
||||
|
||||
dn: cn=violin-haters,ou=groups,dc=owncloud,dc=com
|
||||
objectClass: groupOfNames
|
||||
objectClass: ownCloud
|
||||
objectClass: top
|
||||
cn: violin-haters
|
||||
description: Violin haters
|
||||
ownCloudUUID: dd58e5ec-842e-498b-8800-61f2ec6f911f
|
||||
member: uid=einstein,ou=users,dc=owncloud,dc=com
|
||||
|
||||
dn: cn=radium-lovers,ou=groups,dc=owncloud,dc=com
|
||||
objectClass: groupOfNames
|
||||
objectClass: ownCloud
|
||||
objectClass: top
|
||||
cn: radium-lovers
|
||||
description: Radium lovers
|
||||
ownCloudUUID: 7b87fd49-286e-4a5f-bafd-c535d5dd997a
|
||||
member: uid=marie,ou=users,dc=owncloud,dc=com
|
||||
|
||||
dn: cn=polonium-lovers,ou=groups,dc=owncloud,dc=com
|
||||
objectClass: groupOfNames
|
||||
objectClass: ownCloud
|
||||
objectClass: top
|
||||
cn: polonium-lovers
|
||||
description: Polonium lovers
|
||||
ownCloudUUID: cedc21aa-4072-4614-8676-fa9165f598ff
|
||||
member: uid=marie,ou=users,dc=owncloud,dc=com
|
||||
|
||||
dn: cn=quantum-lovers,ou=groups,dc=owncloud,dc=com
|
||||
objectClass: groupOfNames
|
||||
objectClass: ownCloud
|
||||
objectClass: top
|
||||
cn: quantum-lovers
|
||||
description: Quantum lovers
|
||||
ownCloudUUID: a1726108-01f8-4c30-88df-2b1a9d1cba1a
|
||||
member: uid=richard,ou=users,dc=owncloud,dc=com
|
||||
|
||||
dn: cn=philosophy-haters,ou=groups,dc=owncloud,dc=com
|
||||
objectClass: groupOfNames
|
||||
objectClass: ownCloud
|
||||
objectClass: top
|
||||
cn: philosophy-haters
|
||||
description: Philosophy haters
|
||||
ownCloudUUID: 167cbee2-0518-455a-bfb2-031fe0621e5d
|
||||
member: uid=richard,ou=users,dc=owncloud,dc=com
|
||||
|
||||
dn: cn=physics-lovers,ou=groups,dc=owncloud,dc=com
|
||||
objectClass: groupOfNames
|
||||
objectClass: ownCloud
|
||||
objectClass: top
|
||||
cn: physics-lovers
|
||||
description: Physics lovers
|
||||
ownCloudUUID: 262982c1-2362-4afa-bfdf-8cbfef64a06e
|
||||
member: uid=einstein,ou=users,dc=owncloud,dc=com
|
||||
member: uid=marie,ou=users,dc=owncloud,dc=com
|
||||
member: uid=richard,ou=users,dc=owncloud,dc=com
|
||||
@@ -0,0 +1,37 @@
|
||||
# This LDIF files describes the ownCloud schema
|
||||
dn: cn=owncloud,cn=schema,cn=config
|
||||
objectClass: olcSchemaConfig
|
||||
cn: owncloud
|
||||
olcObjectIdentifier: ownCloudOid 1.3.6.1.4.1.39430
|
||||
olcAttributeTypes: ( ownCloudOid:1.1.2 NAME 'ownCloudUUID'
|
||||
DESC 'A non-reassignable and persistent account ID)'
|
||||
EQUALITY uuidMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.1.16.1 SINGLE-VALUE )
|
||||
olcAttributeTypes: ( ownCloudOid:1.1.3 NAME 'oCExternalIdentity'
|
||||
DESC 'A triple separated by "$" representing the objectIdentity resource type of the Graph API ( signInType $ issuer $ issuerAssignedId )'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
|
||||
olcAttributeTypes: ( ownCloudOid:1.1.4 NAME 'ownCloudUserEnabled'
|
||||
DESC 'A boolean value indicating if ownCloudUser is enabled'
|
||||
EQUALITY booleanMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE)
|
||||
olcAttributeTypes: ( ownCloudOid:1.1.5 NAME 'ownCloudUserType'
|
||||
DESC 'User type (e.g. Member or Guest)'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
|
||||
olcAttributeTypes: ( ownCloudOid:1.1.6 NAME 'ocLastSignInTimestamp'
|
||||
DESC 'The timestamp of the last sign-in'
|
||||
EQUALITY generalizedTimeMatch
|
||||
ORDERING generalizedTimeOrderingMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE )
|
||||
olcObjectClasses: ( ownCloudOid:1.2.1 NAME 'ownCloud'
|
||||
DESC 'ownCloud LDAP Schema'
|
||||
AUXILIARY
|
||||
MAY ( ownCloudUUID ) )
|
||||
olcObjectClasses: ( ownCloudOid:1.2.2 NAME 'ownCloudUser'
|
||||
DESC 'ownCloud User LDAP Schema'
|
||||
SUP ownCloud
|
||||
AUXILIARY
|
||||
MAY ( ocExternalIdentity $ ownCloudUserEnabled $ ownCloudUserType $ ocLastSignInTimestamp) )
|
||||
@@ -0,0 +1,98 @@
|
||||
---
|
||||
services:
|
||||
traefik:
|
||||
networks:
|
||||
ocis-net:
|
||||
aliases:
|
||||
- ${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}
|
||||
|
||||
ocis:
|
||||
depends_on:
|
||||
keycloak:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
# Keycloak IDP specific configuration
|
||||
PROXY_AUTOPROVISION_ACCOUNTS: "true"
|
||||
PROXY_ROLE_ASSIGNMENT_DRIVER: "oidc"
|
||||
OCIS_OIDC_ISSUER: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/realms/${KEYCLOAK_REALM:-oCIS}
|
||||
PROXY_OIDC_REWRITE_WELLKNOWN: "true"
|
||||
WEB_OIDC_CLIENT_ID: ${OCIS_OIDC_CLIENT_ID:-web}
|
||||
PROXY_USER_OIDC_CLAIM: "preferred_username"
|
||||
PROXY_USER_CS3_CLAIM: "username"
|
||||
WEB_OIDC_SCOPE: "openid profile email acr"
|
||||
KEYCLOAK_DOMAIN: ${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}
|
||||
OCIS_EXCLUDE_RUN_SERVICES: "idp"
|
||||
GRAPH_ASSIGN_DEFAULT_USER_ROLE: "false"
|
||||
GRAPH_USERNAME_MATCH: "none"
|
||||
|
||||
keycloak-postgres:
|
||||
image: postgres:16-alpine
|
||||
networks:
|
||||
ocis-net:
|
||||
volumes:
|
||||
- keycloak-postgres-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_DB: ${KEYCLOAK_DB_NAME:-keycloak}
|
||||
POSTGRES_USER: ${KEYCLOAK_DB_USER:-keycloak}
|
||||
POSTGRES_PASSWORD: ${KEYCLOAK_DB_PASSWORD}
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
"pg_isready -U ${KEYCLOAK_DB_USER:-keycloak} -d ${KEYCLOAK_DB_NAME:-keycloak}",
|
||||
]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
logging:
|
||||
driver: ${LOG_DRIVER:-local}
|
||||
restart: always
|
||||
|
||||
keycloak:
|
||||
image: quay.io/keycloak/keycloak:${KEYCLOAK_DOCKER_TAG:-26.2.5}
|
||||
networks:
|
||||
ocis-net:
|
||||
command:
|
||||
[
|
||||
"start",
|
||||
"--spi-connections-http-client-default-disable-trust-manager=${INSECURE:-false}",
|
||||
"--import-realm",
|
||||
]
|
||||
entrypoint: ["/bin/sh", "/opt/keycloak/bin/docker-entrypoint-override.sh"]
|
||||
volumes:
|
||||
- ./config/keycloak/docker-entrypoint-override.sh:/opt/keycloak/bin/docker-entrypoint-override.sh:ro
|
||||
- ./config/keycloak/ocis-realm.dist.json:/opt/keycloak/data/import-dist/ocis-realm.json:ro
|
||||
environment:
|
||||
OCIS_DOMAIN: ${OCIS_DOMAIN:-ocis.owncloud.test}
|
||||
KC_HOSTNAME: ${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}
|
||||
KC_DB: postgres
|
||||
KC_DB_URL: jdbc:postgresql://keycloak-postgres:5432/${KEYCLOAK_DB_NAME:-keycloak}
|
||||
KC_DB_USERNAME: ${KEYCLOAK_DB_USER:-keycloak}
|
||||
KC_DB_PASSWORD: ${KEYCLOAK_DB_PASSWORD}
|
||||
KC_BOOTSTRAP_ADMIN_USERNAME: ${KEYCLOAK_ADMIN_USER:-admin}
|
||||
KC_BOOTSTRAP_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}
|
||||
KC_PROXY_HEADERS: xforwarded
|
||||
KC_HTTP_ENABLED: "true"
|
||||
KC_HEALTH_ENABLED: "true"
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.keycloak.entrypoints=https"
|
||||
- "traefik.http.routers.keycloak.rule=Host(`${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}`)"
|
||||
- "traefik.http.routers.keycloak.tls.certresolver=http"
|
||||
- "traefik.http.routers.keycloak.service=keycloak"
|
||||
- "traefik.http.services.keycloak.loadbalancer.server.port=8080"
|
||||
depends_on:
|
||||
keycloak-postgres:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "bash -c 'exec 3<>/dev/tcp/127.0.0.1/8080'"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
start_period: 40s
|
||||
logging:
|
||||
driver: ${LOG_DRIVER:-local}
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
keycloak-postgres-data:
|
||||
@@ -0,0 +1,79 @@
|
||||
---
|
||||
services:
|
||||
ocis:
|
||||
depends_on:
|
||||
openldap:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
# OCIS_RUN_SERVICES: exclude the internal IDM service, replaced by external LDAP.
|
||||
# If KEYCLOAK is enabled, exclude internal IDP as well.
|
||||
OCIS_EXCLUDE_RUN_SERVICES: "idm${KEYCLOAK:+,idp}"
|
||||
# LDAP settings shared across oCIS services
|
||||
OCIS_LDAP_URI: ldaps://openldap:636
|
||||
OCIS_LDAP_INSECURE: "true"
|
||||
OCIS_LDAP_BIND_DN: "cn=admin,dc=owncloud,dc=com"
|
||||
OCIS_LDAP_BIND_PASSWORD: ${LDAP_ADMIN_PASSWORD}
|
||||
OCIS_LDAP_GROUP_BASE_DN: "ou=groups,dc=owncloud,dc=com"
|
||||
OCIS_LDAP_GROUP_FILTER: "(objectclass=owncloud)"
|
||||
OCIS_LDAP_GROUP_OBJECTCLASS: "groupOfNames"
|
||||
OCIS_LDAP_USER_BASE_DN: "ou=users,dc=owncloud,dc=com"
|
||||
OCIS_LDAP_USER_FILTER: "(objectclass=owncloud)"
|
||||
OCIS_LDAP_USER_OBJECTCLASS: "inetOrgPerson"
|
||||
LDAP_LOGIN_ATTRIBUTES: "uid"
|
||||
OCIS_ADMIN_USER_ID: "ddc2004c-0977-11eb-9d3f-a793888cd0f8"
|
||||
IDP_LDAP_LOGIN_ATTRIBUTE: "uid"
|
||||
IDP_LDAP_UUID_ATTRIBUTE: "ownclouduuid"
|
||||
IDP_LDAP_UUID_ATTRIBUTE_TYPE: binary
|
||||
# Graph-specific LDAP settings
|
||||
GRAPH_LDAP_URI: ldaps://openldap:636
|
||||
GRAPH_LDAP_BIND_DN: "cn=admin,dc=owncloud,dc=com"
|
||||
GRAPH_LDAP_BIND_PASSWORD: ${LDAP_ADMIN_PASSWORD}
|
||||
GRAPH_LDAP_GROUP_BASE_DN: "ou=groups,dc=owncloud,dc=com"
|
||||
GRAPH_LDAP_GROUP_FILTER: "(objectclass=owncloud)"
|
||||
GRAPH_LDAP_GROUP_OBJECTCLASS: "groupOfNames"
|
||||
GRAPH_LDAP_USER_BASE_DN: "ou=users,dc=owncloud,dc=com"
|
||||
GRAPH_LDAP_USER_FILTER: "(objectclass=owncloud)"
|
||||
GRAPH_LDAP_USER_OBJECTCLASS: "inetOrgPerson"
|
||||
GRAPH_LDAP_SERVER_WRITE_ENABLED: "${GRAPH_LDAP_SERVER_WRITE_ENABLED:-false}"
|
||||
GRAPH_LDAP_REFINT_ENABLED: "true"
|
||||
|
||||
openldap:
|
||||
image: osixia/openldap:1.5.0
|
||||
networks:
|
||||
ocis-net:
|
||||
environment:
|
||||
LDAP_TLS_VERIFY_CLIENT: never
|
||||
LDAP_TLS: true
|
||||
LDAP_ORGANISATION: owncloud
|
||||
LDAP_DOMAIN: owncloud.com
|
||||
LDAP_ROOT: "dc=owncloud,dc=com"
|
||||
LDAP_ADMIN_PASSWORD: ${LDAP_ADMIN_PASSWORD}
|
||||
LDAP_SEED_INTERNAL_LDIF_PATH: /ldifs
|
||||
LDAP_SEED_INTERNAL_SCHEMA_PATH: /schemas
|
||||
ports:
|
||||
- "127.0.0.1:389:389"
|
||||
- "127.0.0.1:636:636"
|
||||
volumes:
|
||||
- ./config/ldap/ldif:/ldifs:ro
|
||||
- ./config/ldap/schemas:/schemas:ro
|
||||
- openldap-certs:/container/service/slapd/assets/certs
|
||||
- openldap-data:/var/lib/ldap
|
||||
- openldap-config:/etc/ldap/slapd.d
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
"ldapsearch -x -H ldap://127.0.0.1:389 -D \"cn=admin,dc=owncloud,dc=com\" -w \"$${LDAP_ADMIN_PASSWORD}\" -b \"dc=owncloud,dc=com\" -s base >/dev/null 2>&1",
|
||||
]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 20s
|
||||
logging:
|
||||
driver: ${LOG_DRIVER:-local}
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
openldap-certs:
|
||||
openldap-data:
|
||||
openldap-config:
|
||||
Reference in new issue
Block a user