Skip to content

feat: support admin password file env#3034

Open
bxn-dev wants to merge 1 commit into
opencloud-eu:mainfrom
bxn-dev:feat/2982_idm_admin_passwort_file
Open

feat: support admin password file env#3034
bxn-dev wants to merge 1 commit into
opencloud-eu:mainfrom
bxn-dev:feat/2982_idm_admin_passwort_file

Conversation

@bxn-dev

@bxn-dev bxn-dev commented Jun 28, 2026

Copy link
Copy Markdown

Adds file-based admin password support for the IDM admin user.

Supported env vars:

  • ADMIN_PASSWORD_FILE for opencloud init
  • IDM_ADMIN_PASSWORD_FILE for opencloud init
  • IDM_ADMIN_PASSWORD_FILE for the IDM service config parser

The file content is read and trailing \n / \r\n is trimmed. Supplying both a direct password env var and a password file env
var returns a config error.

Related Issue

Motivation and Context

This allows deployments to provide the IDM admin password via Docker secrets or mounted secret files instead of exposing the
password directly through environment variables.

How Has This Been Tested?

  • test environment: local checkout on branch feat/2982_idm_admin_passwort_file
  • test case 1: helper tests for no file env, file env, trailing newline trimming, direct-value conflict, and missing file
  • test case 2: IDM parser test for IDM_ADMIN_PASSWORD_FILE
  • test case 3:
go test ./pkg/config ./opencloud/pkg/command ./services/idm/pkg/...

Screenshots (if appropriate):

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation added

Read ADMIN_PASSWORD_FILE and IDM_ADMIN_PASSWORD_FILE during init, and IDM_ADMIN_PASSWORD_FILE in the IDM parser.\n\nRefs: opencloud-eu#2982
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 2 duplication

Metric Results
Duplication 2

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for IDM_ADMIN_PASSWORD_FILE

1 participant