-
Notifications
You must be signed in to change notification settings - Fork 159
Description
Is your feature request related to a problem? Please describe.
When configuring OpenCloud with external authentication and excluding the idm service, the auth-basic service still tries to access the IDM's LDAP certificate at /var/lib/opencloud/idm/ldap.crt, causing startup failures:
"CA cert file is not ready yet. Waiting 2 seconds for it to appear."
"Error reading LDAP CA Cert '/var/lib/opencloud/idm/ldap.crt.': open /var/lib/opencloud/idm/ldap.crt: no such file or directory"
This forces users to manually exclude auth-basic from the services list, which is not documented and not intuitive.
Describe the solution you'd like
The auth-basic service should be more intelligent about its dependencies:
-
Check for IDM exclusion: When starting, check if
idmis inOC_EXCLUDE_RUN_SERVICES -
Adapt behavior: If IDM is excluded and no
AUTH_BASIC_LDAP_*configuration is provided, either:- Skip looking for the IDM certificate
- Auto-disable itself with a clear log message
- Use the main
OC_LDAP_*configuration if available
-
Better error messages: Replace generic "CA cert file is not ready" with:
"IDM service is excluded but auth-basic is configured to use IDM's LDAP certificate. Either configure AUTH_BASIC_LDAP_* variables for external LDAP or exclude auth-basic service."
Describe alternatives you've considered
- Documentation only: Document that users need to exclude auth-basic when using external auth (current workaround)
- Remove auth-basic dependency: Refactor so auth-basic doesn't depend on IDM certificate location
Additional context
This issue was discovered when setting up HA deployments with external Keycloak/LDAP where the current behavior is:
- Users exclude
idm,idpas documented - OpenCloud fails to start due to auth-basic looking for IDM certificate
- Users have to discover through trial and error that auth-basic also needs exclusion
Related discussion: opencloud-eu/helm#102 (comment)
The ideal solution would make OpenCloud "just work" with external authentication without requiring deep knowledge of internal service dependencies.