Skip to content

Add support for IDM_ADMIN_PASSWORD_FILE #2982

Description

@bxn-dev

Is your feature request related to a problem? Please describe.

This Issue is related to this one opencloud-compose/#306

In short, the request was to add the variable IDM_ADMIN_PASSWORD_FILE in addition to the variable IDM_ADMIN_PASSWORD, so that, for example, Docker secrets could be used. Currently, opencloud-compose can pass IDM_ADMIN_PASSWORD, but file-based secret handling would require a shell wrapper or entrypoint workaround in the compose stack.

Describe the solution you'd like

Add native server-side support for reading the admin password from a file.

Suggested behavior:

  • Support IDM_ADMIN_PASSWORD_FILE
  • Optionally also support ADMIN_PASSWORD_FILE, matching the existing ADMIN_PASSWORD alias
  • If *_FILE is set, read the password from that file
  • Trim a trailing newline from the file content
  • If both IDM_ADMIN_PASSWORD and IDM_ADMIN_PASSWORD_FILE are set, return a clear configuration error instead of silently choosing one

This would allow compose deployments to use Docker secrets like:

environment:
  IDM_ADMIN_PASSWORD_FILE: /run/secrets/idm_admin_password
secrets:
  - idm_admin_password

Describe alternatives you've considered

The alternative would be adding a shell wrapper in opencloud-compose that reads the secret file and exports IDM_ADMIN_PASSWORD before starting the server.

I think this is less ideal because:

  • it only helps the compose stack
  • it duplicates secret-handling logic outside the server
  • it is harder to test and maintain
  • other deployment methods would not benefit from it

Native server-side support would work for Docker Compose, Kubernetes, systemd, and any other deployment method that can mount secrets as files.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions