mirror of
https://github.com/opencloud-eu/opencloud-compose.git
synced 2026-06-08 20:20:04 +08:00
feat: add keycloak ldap shared directory
This commit is contained in:
63
config/keycloak/clients/OpenCloudAndroid.json
Normal file
63
config/keycloak/clients/OpenCloudAndroid.json
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
"clientId": "OpenCloudAndroid",
|
||||||
|
"name": "OpenCloud Android App",
|
||||||
|
"surrogateAuthRequired": false,
|
||||||
|
"enabled": true,
|
||||||
|
"alwaysDisplayInConsole": false,
|
||||||
|
"clientAuthenticatorType": "client-secret",
|
||||||
|
"redirectUris": [
|
||||||
|
"oc://android.opencloud.eu"
|
||||||
|
],
|
||||||
|
"webOrigins": [],
|
||||||
|
"notBefore": 0,
|
||||||
|
"bearerOnly": false,
|
||||||
|
"consentRequired": false,
|
||||||
|
"standardFlowEnabled": true,
|
||||||
|
"implicitFlowEnabled": false,
|
||||||
|
"directAccessGrantsEnabled": true,
|
||||||
|
"serviceAccountsEnabled": false,
|
||||||
|
"publicClient": true,
|
||||||
|
"frontchannelLogout": false,
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"attributes": {
|
||||||
|
"saml.assertion.signature": "false",
|
||||||
|
"saml.force.post.binding": "false",
|
||||||
|
"saml.multivalued.roles": "false",
|
||||||
|
"saml.encrypt": "false",
|
||||||
|
"post.logout.redirect.uris": "oc://android.opencloud.eu",
|
||||||
|
"backchannel.logout.revoke.offline.tokens": "false",
|
||||||
|
"saml.server.signature": "false",
|
||||||
|
"saml.server.signature.keyinfo.ext": "false",
|
||||||
|
"exclude.session.state.from.auth.response": "false",
|
||||||
|
"backchannel.logout.session.required": "true",
|
||||||
|
"client_credentials.use_refresh_token": "false",
|
||||||
|
"saml_force_name_id_format": "false",
|
||||||
|
"saml.client.signature": "false",
|
||||||
|
"tls.client.certificate.bound.access.tokens": "false",
|
||||||
|
"saml.authnstatement": "false",
|
||||||
|
"display.on.consent.screen": "false",
|
||||||
|
"saml.onetimeuse.condition": "false"
|
||||||
|
},
|
||||||
|
"authenticationFlowBindingOverrides": {},
|
||||||
|
"fullScopeAllowed": true,
|
||||||
|
"nodeReRegistrationTimeout": -1,
|
||||||
|
"defaultClientScopes": [
|
||||||
|
"web-origins",
|
||||||
|
"profile",
|
||||||
|
"roles",
|
||||||
|
"groups",
|
||||||
|
"basic",
|
||||||
|
"email"
|
||||||
|
],
|
||||||
|
"optionalClientScopes": [
|
||||||
|
"address",
|
||||||
|
"phone",
|
||||||
|
"offline_access",
|
||||||
|
"microprofile-jwt"
|
||||||
|
],
|
||||||
|
"access": {
|
||||||
|
"view": true,
|
||||||
|
"configure": true,
|
||||||
|
"manage": true
|
||||||
|
}
|
||||||
|
}
|
||||||
64
config/keycloak/clients/OpenCloudDesktop.json
Normal file
64
config/keycloak/clients/OpenCloudDesktop.json
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"clientId": "OpenCloudDesktop",
|
||||||
|
"name": "OpenCloud Desktop Client",
|
||||||
|
"surrogateAuthRequired": false,
|
||||||
|
"enabled": true,
|
||||||
|
"alwaysDisplayInConsole": false,
|
||||||
|
"clientAuthenticatorType": "client-secret",
|
||||||
|
"redirectUris": [
|
||||||
|
"http://127.0.0.1",
|
||||||
|
"http://localhost"
|
||||||
|
],
|
||||||
|
"webOrigins": [],
|
||||||
|
"notBefore": 0,
|
||||||
|
"bearerOnly": false,
|
||||||
|
"consentRequired": false,
|
||||||
|
"standardFlowEnabled": true,
|
||||||
|
"implicitFlowEnabled": false,
|
||||||
|
"directAccessGrantsEnabled": true,
|
||||||
|
"serviceAccountsEnabled": false,
|
||||||
|
"publicClient": true,
|
||||||
|
"frontchannelLogout": false,
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"attributes": {
|
||||||
|
"saml.assertion.signature": "false",
|
||||||
|
"saml.force.post.binding": "false",
|
||||||
|
"saml.multivalued.roles": "false",
|
||||||
|
"saml.encrypt": "false",
|
||||||
|
"post.logout.redirect.uris": "+",
|
||||||
|
"backchannel.logout.revoke.offline.tokens": "false",
|
||||||
|
"saml.server.signature": "false",
|
||||||
|
"saml.server.signature.keyinfo.ext": "false",
|
||||||
|
"exclude.session.state.from.auth.response": "false",
|
||||||
|
"backchannel.logout.session.required": "true",
|
||||||
|
"client_credentials.use_refresh_token": "false",
|
||||||
|
"saml_force_name_id_format": "false",
|
||||||
|
"saml.client.signature": "false",
|
||||||
|
"tls.client.certificate.bound.access.tokens": "false",
|
||||||
|
"saml.authnstatement": "false",
|
||||||
|
"display.on.consent.screen": "false",
|
||||||
|
"saml.onetimeuse.condition": "false"
|
||||||
|
},
|
||||||
|
"authenticationFlowBindingOverrides": {},
|
||||||
|
"fullScopeAllowed": true,
|
||||||
|
"nodeReRegistrationTimeout": -1,
|
||||||
|
"defaultClientScopes": [
|
||||||
|
"web-origins",
|
||||||
|
"profile",
|
||||||
|
"roles",
|
||||||
|
"groups",
|
||||||
|
"basic",
|
||||||
|
"email"
|
||||||
|
],
|
||||||
|
"optionalClientScopes": [
|
||||||
|
"address",
|
||||||
|
"phone",
|
||||||
|
"offline_access",
|
||||||
|
"microprofile-jwt"
|
||||||
|
],
|
||||||
|
"access": {
|
||||||
|
"view": true,
|
||||||
|
"configure": true,
|
||||||
|
"manage": true
|
||||||
|
}
|
||||||
|
}
|
||||||
63
config/keycloak/clients/OpenCloudIOS.json
Normal file
63
config/keycloak/clients/OpenCloudIOS.json
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
"clientId": "OpenCloudIOS",
|
||||||
|
"name": "OpenCloud iOS App",
|
||||||
|
"surrogateAuthRequired": false,
|
||||||
|
"enabled": true,
|
||||||
|
"alwaysDisplayInConsole": false,
|
||||||
|
"clientAuthenticatorType": "client-secret",
|
||||||
|
"redirectUris": [
|
||||||
|
"oc://ios.opencloud.eu"
|
||||||
|
],
|
||||||
|
"webOrigins": [],
|
||||||
|
"notBefore": 0,
|
||||||
|
"bearerOnly": false,
|
||||||
|
"consentRequired": false,
|
||||||
|
"standardFlowEnabled": true,
|
||||||
|
"implicitFlowEnabled": false,
|
||||||
|
"directAccessGrantsEnabled": true,
|
||||||
|
"serviceAccountsEnabled": false,
|
||||||
|
"publicClient": true,
|
||||||
|
"frontchannelLogout": false,
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"attributes": {
|
||||||
|
"saml.assertion.signature": "false",
|
||||||
|
"saml.force.post.binding": "false",
|
||||||
|
"saml.multivalued.roles": "false",
|
||||||
|
"saml.encrypt": "false",
|
||||||
|
"post.logout.redirect.uris": "oc://ios.opencloud.eu",
|
||||||
|
"backchannel.logout.revoke.offline.tokens": "false",
|
||||||
|
"saml.server.signature": "false",
|
||||||
|
"saml.server.signature.keyinfo.ext": "false",
|
||||||
|
"exclude.session.state.from.auth.response": "false",
|
||||||
|
"backchannel.logout.session.required": "true",
|
||||||
|
"client_credentials.use_refresh_token": "false",
|
||||||
|
"saml_force_name_id_format": "false",
|
||||||
|
"saml.client.signature": "false",
|
||||||
|
"tls.client.certificate.bound.access.tokens": "false",
|
||||||
|
"saml.authnstatement": "false",
|
||||||
|
"display.on.consent.screen": "false",
|
||||||
|
"saml.onetimeuse.condition": "false"
|
||||||
|
},
|
||||||
|
"authenticationFlowBindingOverrides": {},
|
||||||
|
"fullScopeAllowed": true,
|
||||||
|
"nodeReRegistrationTimeout": -1,
|
||||||
|
"defaultClientScopes": [
|
||||||
|
"web-origins",
|
||||||
|
"profile",
|
||||||
|
"roles",
|
||||||
|
"groups",
|
||||||
|
"basic",
|
||||||
|
"email"
|
||||||
|
],
|
||||||
|
"optionalClientScopes": [
|
||||||
|
"address",
|
||||||
|
"phone",
|
||||||
|
"offline_access",
|
||||||
|
"microprofile-jwt"
|
||||||
|
],
|
||||||
|
"access": {
|
||||||
|
"view": true,
|
||||||
|
"configure": true,
|
||||||
|
"manage": true
|
||||||
|
}
|
||||||
|
}
|
||||||
66
config/keycloak/clients/cyberduck.json
Normal file
66
config/keycloak/clients/cyberduck.json
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
"clientId": "Cyberduck",
|
||||||
|
"name": "Cyberduck",
|
||||||
|
"description": "File transfer utility client",
|
||||||
|
"surrogateAuthRequired": false,
|
||||||
|
"enabled": true,
|
||||||
|
"alwaysDisplayInConsole": false,
|
||||||
|
"clientAuthenticatorType": "client-secret",
|
||||||
|
"redirectUris": [
|
||||||
|
"x-cyberduck-action:oauth",
|
||||||
|
"x-mountainduck-action:oauth"
|
||||||
|
],
|
||||||
|
"webOrigins": [],
|
||||||
|
"notBefore": 0,
|
||||||
|
"bearerOnly": false,
|
||||||
|
"consentRequired": false,
|
||||||
|
"standardFlowEnabled": true,
|
||||||
|
"implicitFlowEnabled": false,
|
||||||
|
"directAccessGrantsEnabled": true,
|
||||||
|
"serviceAccountsEnabled": false,
|
||||||
|
"publicClient": true,
|
||||||
|
"frontchannelLogout": false,
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"attributes": {
|
||||||
|
"saml.assertion.signature": "false",
|
||||||
|
"saml.force.post.binding": "false",
|
||||||
|
"saml.multivalued.roles": "false",
|
||||||
|
"saml.encrypt": "false",
|
||||||
|
"oauth2.device.authorization.grant.enabled": "false",
|
||||||
|
"backchannel.logout.revoke.offline.tokens": "false",
|
||||||
|
"saml.server.signature": "false",
|
||||||
|
"saml.server.signature.keyinfo.ext": "false",
|
||||||
|
"exclude.session.state.from.auth.response": "false",
|
||||||
|
"oidc.ciba.grant.enabled": "false",
|
||||||
|
"backchannel.logout.session.required": "true",
|
||||||
|
"client_credentials.use_refresh_token": "false",
|
||||||
|
"saml_force_name_id_format": "false",
|
||||||
|
"saml.client.signature": "false",
|
||||||
|
"tls.client.certificate.bound.access.tokens": "false",
|
||||||
|
"saml.authnstatement": "false",
|
||||||
|
"display.on.consent.screen": "false",
|
||||||
|
"saml.onetimeuse.condition": "false"
|
||||||
|
},
|
||||||
|
"authenticationFlowBindingOverrides": {},
|
||||||
|
"fullScopeAllowed": true,
|
||||||
|
"nodeReRegistrationTimeout": -1,
|
||||||
|
"defaultClientScopes": [
|
||||||
|
"web-origins",
|
||||||
|
"profile",
|
||||||
|
"roles",
|
||||||
|
"groups",
|
||||||
|
"basic",
|
||||||
|
"email"
|
||||||
|
],
|
||||||
|
"optionalClientScopes": [
|
||||||
|
"address",
|
||||||
|
"phone",
|
||||||
|
"offline_access",
|
||||||
|
"microprofile-jwt"
|
||||||
|
],
|
||||||
|
"access": {
|
||||||
|
"view": true,
|
||||||
|
"configure": true,
|
||||||
|
"manage": true
|
||||||
|
}
|
||||||
|
}
|
||||||
74
config/keycloak/clients/web.json
Normal file
74
config/keycloak/clients/web.json
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"clientId": "web",
|
||||||
|
"name": "OpenCloud Web App",
|
||||||
|
"description": "",
|
||||||
|
"rootUrl": "{{OC_URL}}",
|
||||||
|
"adminUrl": "{{OC_URL}}",
|
||||||
|
"baseUrl": "",
|
||||||
|
"surrogateAuthRequired": false,
|
||||||
|
"enabled": true,
|
||||||
|
"alwaysDisplayInConsole": false,
|
||||||
|
"clientAuthenticatorType": "client-secret",
|
||||||
|
"redirectUris": [
|
||||||
|
"{{OC_URL}}/",
|
||||||
|
"{{OC_URL}}/oidc-callback.html",
|
||||||
|
"{{OC_URL}}/oidc-silent-redirect.html"
|
||||||
|
],
|
||||||
|
"webOrigins": [
|
||||||
|
"{{OC_URL}}"
|
||||||
|
],
|
||||||
|
"notBefore": 0,
|
||||||
|
"bearerOnly": false,
|
||||||
|
"consentRequired": false,
|
||||||
|
"standardFlowEnabled": true,
|
||||||
|
"implicitFlowEnabled": false,
|
||||||
|
"directAccessGrantsEnabled": true,
|
||||||
|
"serviceAccountsEnabled": false,
|
||||||
|
"publicClient": true,
|
||||||
|
"frontchannelLogout": false,
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"attributes": {
|
||||||
|
"saml.assertion.signature": "false",
|
||||||
|
"saml.force.post.binding": "false",
|
||||||
|
"saml.multivalued.roles": "false",
|
||||||
|
"saml.encrypt": "false",
|
||||||
|
"post.logout.redirect.uris": "+",
|
||||||
|
"oauth2.device.authorization.grant.enabled": "false",
|
||||||
|
"backchannel.logout.revoke.offline.tokens": "false",
|
||||||
|
"saml.server.signature": "false",
|
||||||
|
"saml.server.signature.keyinfo.ext": "false",
|
||||||
|
"exclude.session.state.from.auth.response": "false",
|
||||||
|
"oidc.ciba.grant.enabled": "false",
|
||||||
|
"backchannel.logout.url": "{{OC_URL}}/backchannel_logout",
|
||||||
|
"backchannel.logout.session.required": "true",
|
||||||
|
"client_credentials.use_refresh_token": "false",
|
||||||
|
"saml_force_name_id_format": "false",
|
||||||
|
"saml.client.signature": "false",
|
||||||
|
"tls.client.certificate.bound.access.tokens": "false",
|
||||||
|
"saml.authnstatement": "false",
|
||||||
|
"display.on.consent.screen": "false",
|
||||||
|
"saml.onetimeuse.condition": "false"
|
||||||
|
},
|
||||||
|
"authenticationFlowBindingOverrides": {},
|
||||||
|
"fullScopeAllowed": true,
|
||||||
|
"nodeReRegistrationTimeout": -1,
|
||||||
|
"defaultClientScopes": [
|
||||||
|
"web-origins",
|
||||||
|
"profile",
|
||||||
|
"roles",
|
||||||
|
"groups",
|
||||||
|
"basic",
|
||||||
|
"email"
|
||||||
|
],
|
||||||
|
"optionalClientScopes": [
|
||||||
|
"address",
|
||||||
|
"phone",
|
||||||
|
"offline_access",
|
||||||
|
"microprofile-jwt"
|
||||||
|
],
|
||||||
|
"access": {
|
||||||
|
"view": true,
|
||||||
|
"configure": true,
|
||||||
|
"manage": true
|
||||||
|
}
|
||||||
|
}
|
||||||
8
config/keycloak/docker-entrypoint-override.sh
Normal file
8
config/keycloak/docker-entrypoint-override.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
printenv
|
||||||
|
# replace openCloud domain and LDAP password in keycloak realm import
|
||||||
|
mkdir /opt/keycloak/data/import
|
||||||
|
sed -e "s/cloud.opencloud.test/${OC_DOMAIN}/g" -e "s/ldap-admin-password/${LDAP_ADMIN_PASSWORD:-admin}/g" /opt/keycloak/data/import-dist/opencloud-realm.json > /opt/keycloak/data/import/opencloud-realm.json
|
||||||
|
|
||||||
|
# run original docker-entrypoint
|
||||||
|
/opt/keycloak/bin/kc.sh "$@"
|
||||||
2265
config/keycloak/opencloud-realm-autoprovisioning.dist.json
Normal file
2265
config/keycloak/opencloud-realm-autoprovisioning.dist.json
Normal file
File diff suppressed because it is too large
Load Diff
3017
config/keycloak/opencloud-realm.dist.json
Normal file
3017
config/keycloak/opencloud-realm.dist.json
Normal file
File diff suppressed because it is too large
Load Diff
9
config/ldap/docker-entrypoint-override.sh
Normal file
9
config/ldap/docker-entrypoint-override.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
printenv
|
||||||
|
|
||||||
|
if [ ! -f /opt/bitnami/openldap/share/openldap.key ]
|
||||||
|
then
|
||||||
|
openssl req -x509 -newkey rsa:4096 -keyout /opt/bitnami/openldap/share/openldap.key -out /opt/bitnami/openldap/share/openldap.crt -sha256 -days 365 -batch -nodes
|
||||||
|
fi
|
||||||
|
# run original docker-entrypoint
|
||||||
|
/opt/bitnami/scripts/openldap/entrypoint.sh "$@"
|
||||||
24
config/ldap/ldif/10_base.ldif
Normal file
24
config/ldap/ldif/10_base.ldif
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
dn: dc=opencloud,dc=eu
|
||||||
|
objectClass: organization
|
||||||
|
objectClass: dcObject
|
||||||
|
dc: opencloud
|
||||||
|
o: openCloud
|
||||||
|
|
||||||
|
dn: ou=users,dc=opencloud,dc=eu
|
||||||
|
objectClass: organizationalUnit
|
||||||
|
ou: users
|
||||||
|
|
||||||
|
dn: cn=admin,dc=opencloud,dc=eu
|
||||||
|
objectClass: inetOrgPerson
|
||||||
|
objectClass: person
|
||||||
|
cn: admin
|
||||||
|
sn: admin
|
||||||
|
uid: ldapadmin
|
||||||
|
|
||||||
|
dn: ou=groups,dc=opencloud,dc=eu
|
||||||
|
objectClass: organizationalUnit
|
||||||
|
ou: groups
|
||||||
|
|
||||||
|
dn: ou=custom,ou=groups,dc=opencloud,dc=eu
|
||||||
|
objectClass: organizationalUnit
|
||||||
|
ou: custom
|
||||||
20
config/ldap/ldif/20_admin.ldif
Normal file
20
config/ldap/ldif/20_admin.ldif
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
dn: uid=admin,ou=users,dc=opencloud,dc=eu
|
||||||
|
objectClass: inetOrgPerson
|
||||||
|
objectClass: organizationalPerson
|
||||||
|
objectClass: person
|
||||||
|
objectClass: top
|
||||||
|
uid: admin
|
||||||
|
givenName: Admin
|
||||||
|
sn: Admin
|
||||||
|
cn: admin
|
||||||
|
displayName: Admin
|
||||||
|
description: An admin for this OpenCloud instance.
|
||||||
|
mail: admin@example.org
|
||||||
|
userPassword:: e1NTSEF9UWhmaFB3dERydTUydURoWFFObDRMbzVIckI3TkI5Nmo==
|
||||||
|
|
||||||
|
dn: cn=administrators,ou=groups,dc=opencloud,dc=eu
|
||||||
|
objectClass: groupOfNames
|
||||||
|
objectClass: top
|
||||||
|
cn: administrators
|
||||||
|
description: OpenCloud Administrators
|
||||||
|
member: uid=admin,ou=users,dc=opencloud,dc=eu
|
||||||
70
config/ldap/ldif/30_demo_users.ldif
Normal file
70
config/ldap/ldif/30_demo_users.ldif
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
# Start dn with uid (user identifier / login), not cn (Firstname + Surname)
|
||||||
|
dn: uid=alan,ou=users,dc=opencloud,dc=eu
|
||||||
|
objectClass: inetOrgPerson
|
||||||
|
objectClass: organizationalPerson
|
||||||
|
objectClass: person
|
||||||
|
objectClass: top
|
||||||
|
uid: alan
|
||||||
|
givenName: Alan
|
||||||
|
sn: Turing
|
||||||
|
cn: alan
|
||||||
|
displayName: Alan Turing
|
||||||
|
description: An English mathematician, computer scientist, logician, cryptanalyst, philosopher and theoretical biologist. He was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine.
|
||||||
|
mail: alan@example.org
|
||||||
|
userPassword:: e1NTSEF9Y2ZMdVlqMTBDUFpLWE44VC9mQ0FzYnFHQmtyZExJeGg=
|
||||||
|
|
||||||
|
dn: uid=lynn,ou=users,dc=opencloud,dc=eu
|
||||||
|
objectClass: inetOrgPerson
|
||||||
|
objectClass: organizationalPerson
|
||||||
|
objectClass: person
|
||||||
|
objectClass: top
|
||||||
|
uid: lynn
|
||||||
|
givenName: Lynn
|
||||||
|
sn: Conway
|
||||||
|
cn: lynn
|
||||||
|
displayName: Lynn Conway
|
||||||
|
description: An American computer scientist, electrical engineer, and transgender activist.
|
||||||
|
mail: lynn@example.org
|
||||||
|
userPassword:: e1NTSEF9Y2ZMdVlqMTBDUFpLWE44VC9mQ0FzYnFHQmtyZExJeGg=
|
||||||
|
|
||||||
|
dn: uid=mary,ou=users,dc=opencloud,dc=eu
|
||||||
|
objectClass: inetOrgPerson
|
||||||
|
objectClass: organizationalPerson
|
||||||
|
objectClass: person
|
||||||
|
objectClass: top
|
||||||
|
uid: mary
|
||||||
|
givenName: Mary
|
||||||
|
sn: Kenneth Keller
|
||||||
|
cn: mary
|
||||||
|
displayName: Mary Kenneth Keller
|
||||||
|
description: Mary Kenneth Keller of the Sisters of Charity of the Blessed Virgin Mary was a pioneer in computer science.
|
||||||
|
mail: mary@example.org
|
||||||
|
userPassword:: e1NTSEF9Y2ZMdVlqMTBDUFpLWE44VC9mQ0FzYnFHQmtyZExJeGg=
|
||||||
|
|
||||||
|
dn: uid=margaret,ou=users,dc=opencloud,dc=eu
|
||||||
|
objectClass: inetOrgPerson
|
||||||
|
objectClass: organizationalPerson
|
||||||
|
objectClass: person
|
||||||
|
objectClass: top
|
||||||
|
uid: margaret
|
||||||
|
givenName: Margaret
|
||||||
|
sn: Hamilton
|
||||||
|
cn: margaret
|
||||||
|
displayName: Margaret Hamilton
|
||||||
|
description: A director of the Software Engineering Division of the MIT Instrumentation Laboratory, which developed on-board flight software for NASA's Apollo program.
|
||||||
|
mail: margaret@example.org
|
||||||
|
userPassword:: e1NTSEF9Y2ZMdVlqMTBDUFpLWE44VC9mQ0FzYnFHQmtyZExJeGg=
|
||||||
|
|
||||||
|
dn: uid=dennis,ou=users,dc=opencloud,dc=eu
|
||||||
|
objectClass: inetOrgPerson
|
||||||
|
objectClass: organizationalPerson
|
||||||
|
objectClass: person
|
||||||
|
objectClass: top
|
||||||
|
uid: dennis
|
||||||
|
givenName: Dennis
|
||||||
|
sn: Ritchie
|
||||||
|
cn: dennis
|
||||||
|
displayName: Dennis Ritchie
|
||||||
|
description: American computer scientist. He created the C programming language and the Unix operating system and B language with long-time colleague Ken Thompson.
|
||||||
|
mail: dennis@example.org
|
||||||
|
userPassword:: e1NTSEF9Y2ZMdVlqMTBDUFpLWE44VC9mQ0FzYnFHQmtyZExJeGg=
|
||||||
70
config/ldap/ldif/40_demo_groups.ldif
Normal file
70
config/ldap/ldif/40_demo_groups.ldif
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
dn: cn=users,ou=groups,dc=opencloud,dc=eu
|
||||||
|
objectClass: groupOfNames
|
||||||
|
objectClass: top
|
||||||
|
cn: users
|
||||||
|
description: Users
|
||||||
|
member: uid=alan,ou=users,dc=opencloud,dc=eu
|
||||||
|
member: uid=mary,ou=users,dc=opencloud,dc=eu
|
||||||
|
member: uid=margaret,ou=users,dc=opencloud,dc=eu
|
||||||
|
member: uid=dennis,ou=users,dc=opencloud,dc=eu
|
||||||
|
member: uid=lynn,ou=users,dc=opencloud,dc=eu
|
||||||
|
member: uid=admin,ou=users,dc=opencloud,dc=eu
|
||||||
|
|
||||||
|
dn: cn=chess-lovers,ou=groups,dc=opencloud,dc=eu
|
||||||
|
objectClass: groupOfNames
|
||||||
|
objectClass: top
|
||||||
|
cn: chess-lovers
|
||||||
|
description: Chess lovers
|
||||||
|
member: uid=alan,ou=users,dc=opencloud,dc=eu
|
||||||
|
|
||||||
|
dn: cn=machine-lovers,ou=groups,dc=opencloud,dc=eu
|
||||||
|
objectClass: groupOfNames
|
||||||
|
objectClass: top
|
||||||
|
cn: machine-lovers
|
||||||
|
description: Machine Lovers
|
||||||
|
member: uid=alan,ou=users,dc=opencloud,dc=eu
|
||||||
|
|
||||||
|
dn: cn=bible-readers,ou=groups,dc=opencloud,dc=eu
|
||||||
|
objectClass: groupOfNames
|
||||||
|
objectClass: top
|
||||||
|
cn: bible-readers
|
||||||
|
description: Bible readers
|
||||||
|
member: uid=mary,ou=users,dc=opencloud,dc=eu
|
||||||
|
|
||||||
|
dn: cn=apollos,ou=groups,dc=opencloud,dc=eu
|
||||||
|
objectClass: groupOfNames
|
||||||
|
objectClass: top
|
||||||
|
cn: apollos
|
||||||
|
description: Contributors to the Appollo mission
|
||||||
|
member: uid=margaret,ou=users,dc=opencloud,dc=eu
|
||||||
|
|
||||||
|
dn: cn=unix-lovers,ou=groups,dc=opencloud,dc=eu
|
||||||
|
objectClass: groupOfNames
|
||||||
|
objectClass: top
|
||||||
|
cn: unix-lovers
|
||||||
|
description: Unix lovers
|
||||||
|
member: uid=dennis,ou=users,dc=opencloud,dc=eu
|
||||||
|
|
||||||
|
dn: cn=basic-haters,ou=groups,dc=opencloud,dc=eu
|
||||||
|
objectClass: groupOfNames
|
||||||
|
objectClass: top
|
||||||
|
cn: basic-haters
|
||||||
|
description: Haters of the Basic programming language
|
||||||
|
member: uid=dennis,ou=users,dc=opencloud,dc=eu
|
||||||
|
|
||||||
|
dn: cn=vlsi-lovers,ou=groups,dc=opencloud,dc=eu
|
||||||
|
objectClass: groupOfNames
|
||||||
|
objectClass: top
|
||||||
|
cn: vlsi-lovers
|
||||||
|
description: Lovers of VLSI microchip design
|
||||||
|
member: uid=lynn,ou=users,dc=opencloud,dc=eu
|
||||||
|
|
||||||
|
dn: cn=programmers,ou=groups,dc=opencloud,dc=eu
|
||||||
|
objectClass: groupOfNames
|
||||||
|
objectClass: top
|
||||||
|
cn: programmers
|
||||||
|
description: Computer Programmers
|
||||||
|
member: uid=alan,ou=users,dc=opencloud,dc=eu
|
||||||
|
member: uid=margaret,ou=users,dc=opencloud,dc=eu
|
||||||
|
member: uid=dennis,ou=users,dc=opencloud,dc=eu
|
||||||
|
member: uid=lynn,ou=users,dc=opencloud,dc=eu
|
||||||
114
idm/ldap-keycloak.yml
Normal file
114
idm/ldap-keycloak.yml
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
---
|
||||||
|
services:
|
||||||
|
opencloud:
|
||||||
|
environment:
|
||||||
|
# Ldap IDP specific configuration
|
||||||
|
OC_LDAP_URI: ldaps://ldap-server:1636
|
||||||
|
OC_LDAP_INSECURE: "true"
|
||||||
|
OC_LDAP_BIND_DN: "cn=admin,dc=opencloud,dc=eu"
|
||||||
|
OC_LDAP_BIND_PASSWORD: ${LDAP_ADMIN_PASSWORD:-admin}
|
||||||
|
OC_LDAP_GROUP_BASE_DN: "ou=groups,dc=opencloud,dc=eu"
|
||||||
|
OC_LDAP_GROUP_SCHEMA_ID: "entryUUID"
|
||||||
|
OC_LDAP_USER_BASE_DN: "ou=users,dc=opencloud,dc=eu"
|
||||||
|
OC_LDAP_USER_FILTER: "(objectclass=inetOrgPerson)"
|
||||||
|
OC_LDAP_USER_SCHEMA_ID: "entryUUID"
|
||||||
|
OC_LDAP_DISABLE_USER_MECHANISM: "none"
|
||||||
|
GRAPH_LDAP_SERVER_UUID: "true"
|
||||||
|
GRAPH_LDAP_GROUP_CREATE_BASE_DN: "ou=custom,ou=groups,dc=opencloud,dc=eu"
|
||||||
|
GRAPH_LDAP_REFINT_ENABLED: "true" # osixia has refint enabled.
|
||||||
|
FRONTEND_READONLY_USER_ATTRIBUTES: "user.onPremisesSamAccountName,user.displayName,user.mail,user.passwordProfile,user.accountEnabled,user.appRoleAssignments"
|
||||||
|
OC_LDAP_SERVER_WRITE_ENABLED: "false" # the ldap is managed by Keycloak, so it is not writable by OpenCloud
|
||||||
|
# OC_RUN_SERVICES specifies to start all services except idm and idp. These are replaced by external services
|
||||||
|
OC_EXCLUDE_RUN_SERVICES: idm,idp
|
||||||
|
# Keycloak IDP specific configuration
|
||||||
|
PROXY_AUTOPROVISION_ACCOUNTS: "false"
|
||||||
|
PROXY_ROLE_ASSIGNMENT_DRIVER: "oidc"
|
||||||
|
OC_OIDC_ISSUER: https://${KEYCLOAK_DOMAIN:-keycloak.opencloud.test}/realms/${KEYCLOAK_REALM:-openCloud}
|
||||||
|
PROXY_OIDC_REWRITE_WELLKNOWN: "true"
|
||||||
|
WEB_OIDC_CLIENT_ID: ${OC_OIDC_CLIENT_ID:-web}
|
||||||
|
PROXY_USER_OIDC_CLAIM: "uuid"
|
||||||
|
PROXY_USER_CS3_CLAIM: "userid"
|
||||||
|
WEB_OPTION_ACCOUNT_EDIT_LINK_HREF: "https://${KEYCLOAK_DOMAIN:-keycloak.opencloud.test}/realms/${KEYCLOAK_REALM:-openCloud}/account"
|
||||||
|
# admin and demo accounts must be created in Keycloak
|
||||||
|
OC_ADMIN_USER_ID: ""
|
||||||
|
SETTINGS_SETUP_DEFAULT_ASSIGNMENTS: "false"
|
||||||
|
GRAPH_ASSIGN_DEFAULT_USER_ROLE: "false"
|
||||||
|
GRAPH_USERNAME_MATCH: "none"
|
||||||
|
KEYCLOAK_DOMAIN: ${KEYCLOAK_DOMAIN:-keycloak.opencloud.test}
|
||||||
|
|
||||||
|
ldap-server:
|
||||||
|
image: bitnami/openldap:2.6
|
||||||
|
networks:
|
||||||
|
opencloud-net:
|
||||||
|
entrypoint: [ "/bin/sh", "/opt/bitnami/scripts/openldap/docker-entrypoint-override.sh", "/opt/bitnami/scripts/openldap/run.sh" ]
|
||||||
|
environment:
|
||||||
|
BITNAMI_DEBUG: true
|
||||||
|
LDAP_TLS_VERIFY_CLIENT: never
|
||||||
|
LDAP_ENABLE_TLS: "yes"
|
||||||
|
LDAP_TLS_CA_FILE: /opt/bitnami/openldap/share/openldap.crt
|
||||||
|
LDAP_TLS_CERT_FILE: /opt/bitnami/openldap/share/openldap.crt
|
||||||
|
LDAP_TLS_KEY_FILE: /opt/bitnami/openldap/share/openldap.key
|
||||||
|
LDAP_ROOT: "dc=opencloud,dc=eu"
|
||||||
|
LDAP_ADMIN_PASSWORD: ${LDAP_ADMIN_PASSWORD:-admin}
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:389:1389"
|
||||||
|
- "127.0.0.1:636:1636"
|
||||||
|
volumes:
|
||||||
|
- ./config/ldap/ldif:/ldifs
|
||||||
|
- ./config/ldap/docker-entrypoint-override.sh:/opt/bitnami/scripts/openldap/docker-entrypoint-override.sh
|
||||||
|
- ldap-certs:/opt/bitnami/openldap/share
|
||||||
|
- ldap-data:/bitnami/openldap
|
||||||
|
logging:
|
||||||
|
driver: ${LOG_DRIVER:-local}
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
image: postgres:alpine
|
||||||
|
networks:
|
||||||
|
opencloud-net:
|
||||||
|
volumes:
|
||||||
|
- keycloak_postgres_data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: keycloak
|
||||||
|
POSTGRES_USER: keycloak
|
||||||
|
POSTGRES_PASSWORD: keycloak
|
||||||
|
logging:
|
||||||
|
driver: ${LOG_DRIVER:-local}
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
keycloak:
|
||||||
|
image: quay.io/keycloak/keycloak:25.0.0
|
||||||
|
networks:
|
||||||
|
opencloud-net:
|
||||||
|
command: [ "start", "--proxy=edge", "--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"
|
||||||
|
- "./config/keycloak/opencloud-realm.dist.json:/opt/keycloak/data/import-dist/opencloud-realm.json"
|
||||||
|
environment:
|
||||||
|
OC_DOMAIN: ${OC_DOMAIN:-cloud.opencloud.test}
|
||||||
|
KC_HOSTNAME: ${KEYCLOAK_DOMAIN:-keycloak.opencloud.test}
|
||||||
|
KC_DB: postgres
|
||||||
|
KC_DB_URL: "jdbc:postgresql://postgres:5432/keycloak"
|
||||||
|
KC_DB_USERNAME: keycloak
|
||||||
|
KC_DB_PASSWORD: keycloak
|
||||||
|
KC_FEATURES: impersonation
|
||||||
|
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN_USER:-admin}
|
||||||
|
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-admin}
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.keycloak.entrypoints=https"
|
||||||
|
- "traefik.http.routers.keycloak.rule=Host(`${KEYCLOAK_DOMAIN:-keycloak.opencloud.test}`)"
|
||||||
|
- "traefik.http.routers.keycloak.tls.certresolver=http"
|
||||||
|
- "traefik.http.routers.keycloak.service=keycloak"
|
||||||
|
- "traefik.http.services.keycloak.loadbalancer.server.port=8080"
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
logging:
|
||||||
|
driver: ${LOG_DRIVER:-local}
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
keycloak_postgres_data:
|
||||||
|
ldap-certs:
|
||||||
|
ldap-data:
|
||||||
15
traefik/ldap-keycloak.yml
Normal file
15
traefik/ldap-keycloak.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
services:
|
||||||
|
traefik:
|
||||||
|
networks:
|
||||||
|
opencloud-net:
|
||||||
|
aliases:
|
||||||
|
- ${KEYCLOAK_DOMAIN:-keycloak.opencloud.test}
|
||||||
|
keycloak:
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.keycloak.entrypoints=https"
|
||||||
|
- "traefik.http.routers.keycloak.rule=Host(`${KEYCLOAK_DOMAIN:-keycloak.opencloud.test}`)"
|
||||||
|
- "traefik.http.routers.keycloak.tls.certresolver=letsencrypt"
|
||||||
|
- "traefik.http.routers.keycloak.service=keycloak"
|
||||||
|
- "traefik.http.services.keycloak.loadbalancer.server.port=8080"
|
||||||
Reference in New Issue
Block a user