diff --git a/deployments/examples/ocis_multi/README.md b/deployments/examples/ocis_multi/README.md index 52be6c8b006..d048fbc44a9 100644 --- a/deployments/examples/ocis_multi/README.md +++ b/deployments/examples/ocis_multi/README.md @@ -38,3 +38,19 @@ In this example, the admin user (configured in `config/ldap/ldif/20_users.ldif` **Security Note:** Master-ID grants member status only (not admin privileges). Regular users require specific instance IDs for access control. + +## Vault Mode + +You can enable the vault storage on both instances. The file `vault-storage.yml` adds one extra `storage-users` service to each instance: `storage-users-vault` for `ocis` and `storage-users-vault-ocm` for `ocis-ocm`. It also enables MFA and vault mode on both `ocis` and `ocis-ocm`. + +To start the deployment with the vault, add the file `vault-storage.yml` to the compose command: + +```bash +docker compose -f docker-compose.yml -f vault-storage.yml up -d +``` + +Alternatively, set the `COMPOSE_FILE` environment variable: + +```bash +COMPOSE_FILE=docker-compose.yml:vault-storage.yml docker compose up -d +``` diff --git a/deployments/examples/ocis_multi/config/ldap/ldif/20_users.ldif b/deployments/examples/ocis_multi/config/ldap/ldif/20_users.ldif index 481d6dff121..50b20c06b2d 100644 --- a/deployments/examples/ocis_multi/config/ldap/ldif/20_users.ldif +++ b/deployments/examples/ocis_multi/config/ldap/ldif/20_users.ldif @@ -18,7 +18,7 @@ gidNumber: 30000 homeDirectory: /home/einstein ownCloudUUID: 4c510ada-c86b-4815-8820-42cdf82c3d51 owncloudMemberOf: ec730a6c-1b63-4b45-b83b-9e2311afdf85 -ownCloudRole: ocisUser +ownCloudRole: ocisSpaceAdmin userPassword:: e1NTSEF9TXJEcXpFNGdKbXZxbVRVTGhvWEZ1VzJBbkV3NWFLK3J3WTIvbHc9PQ== dn: uid=marie,ou=users,dc=owncloud,dc=com diff --git a/deployments/examples/ocis_multi/vault-storage.yml b/deployments/examples/ocis_multi/vault-storage.yml new file mode 100644 index 00000000000..e8289575e45 --- /dev/null +++ b/deployments/examples/ocis_multi/vault-storage.yml @@ -0,0 +1,79 @@ +services: + ocis: + environment: + OCIS_MFA_ENABLED: true + NATS_NATS_HOST: 0.0.0.0 + SETTINGS_GRPC_ADDR: ocis:9191 + OCIS_ENABLE_VAULT_MODE: true + + ocis-ocm: + environment: + OCIS_MFA_ENABLED: true + SETTINGS_GRPC_ADDR: ocis-ocm:9191 + OCIS_ENABLE_VAULT_MODE: true + + storage-users-vault: + image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG:-latest} + networks: + ocis-net: + depends_on: + ocis: + condition: service_started + command: ["storage-users", "server"] + environment: + OCIS_LOG_LEVEL: ${LOG_LEVEL:-info} + OCIS_LOG_COLOR: "${LOG_PRETTY:-false}" + OCIS_LOG_PRETTY: "${LOG_PRETTY:-false}" + OCIS_GATEWAY_GRPC_ADDR: ocis:9142 + OCIS_EVENTS_ENDPOINT: ocis:9233 + OCIS_CACHE_STORE_NODES: ocis:9233 + MICRO_REGISTRY_ADDRESS: ocis:9233 + # configure vault mode for the storage users service + STORAGE_USERS_ENABLE_VAULT_MODE: true + STORAGE_USERS_SERVICE_NAME: storage-users-vault + STORAGE_USERS_GRPC_ADDR: storage-users-vault:9285 + STORAGE_USERS_HTTP_ADDR: storage-users-vault:9286 + STORAGE_USERS_DATA_SERVER_URL: http://storage-users-vault:9286/data + STORAGE_USERS_DEBUG_ADDR: storage-users-vault:9287 + STORAGE_USERS_OCIS_ROOT: /var/lib/ocis/storage/users-vault + STORAGE_USERS_EVENTS_CONSUMER_GROUP: vault-dcfs + volumes: + # use the same volumes as the ocis service + - ${OCIS_CONFIG_DIR:-ocis-config}:/etc/ocis + - ${OCIS_DATA_DIR:-ocis-data}:/var/lib/ocis + logging: + driver: ${LOG_DRIVER:-local} + restart: always + + storage-users-vault-ocm: + image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG:-latest} + networks: + ocis-net: + depends_on: + ocis-ocm: + condition: service_started + command: ["storage-users", "server"] + environment: + OCIS_LOG_LEVEL: ${LOG_LEVEL:-info} + OCIS_LOG_COLOR: "${LOG_PRETTY:-false}" + OCIS_LOG_PRETTY: "${LOG_PRETTY:-false}" + OCIS_GATEWAY_GRPC_ADDR: ocis-ocm:9142 + OCIS_EVENTS_ENDPOINT: ocis-ocm:9233 + OCIS_CACHE_STORE_NODES: ocis-ocm:9233 + MICRO_REGISTRY_ADDRESS: ocis-ocm:9233 + # configure vault mode for the storage users service + STORAGE_USERS_ENABLE_VAULT_MODE: true + STORAGE_USERS_SERVICE_NAME: storage-users-vault + STORAGE_USERS_GRPC_ADDR: storage-users-vault-ocm:9285 + STORAGE_USERS_HTTP_ADDR: storage-users-vault-ocm:9286 + STORAGE_USERS_DATA_SERVER_URL: http://storage-users-vault-ocm:9286/data + STORAGE_USERS_DEBUG_ADDR: storage-users-vault-ocm:9287 + STORAGE_USERS_OCIS_ROOT: /var/lib/ocis/storage/users-vault + STORAGE_USERS_EVENTS_CONSUMER_GROUP: vault-dcfs + volumes: + # use the same volumes as the ocis-ocm service + - ${OCIS_OCM_CONFIG_DIR:-ocis-ocm-config}:/etc/ocis + - ${OCIS_OCM_DATA_DIR:-ocis-ocm-data}:/var/lib/ocis + logging: + driver: ${LOG_DRIVER:-local} + restart: always