Skip to content

[Improvement-18812][Authentication] Require explicit Gateway and Actuator credentials - #18813

Open
ruanwenjun wants to merge 2 commits into
apache:devfrom
ruanwenjun:improvement/18812-explicit-auth-credentials
Open

ruanwenjun wants to merge 2 commits into
apache:devfrom
ruanwenjun:improvement/18812-explicit-auth-credentials

Conversation

@ruanwenjun

@ruanwenjun ruanwenjun commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Was this PR generated or assisted by AI?

YES. AI assisted with the implementation, regression tests, upgrade notes, and this description.

Purpose of the pull request

Closes #18812.

Require explicitly configured credentials before enabling Python Gateway or Actuator authentication. A custom API configuration can currently inherit the Java default Gateway token, while enabling Actuator authentication can reuse the username/password shipped in service configurations.

Brief change log

  • Remove the Python Gateway Java token default and reject whitespace-only tokens when the gateway is enabled.
  • Clear the Actuator username/password defaults in API, Master, Worker, Alert and Standalone configuration. Reuse the existing validation that requires both credentials when authentication is enabled.
  • Add startup validation tests for missing, empty and whitespace-only credentials, successful explicit credentials, and disabled features without credentials.
  • Document the required explicit credentials in the English and Chinese upgrade notes.
  • Update the English and Chinese Standalone installation guides with the correct configuration path, both Gateway settings, and the matching Python client token.

Verify this pull request

  • Before the Gateway fix, the new regression suite reported three expected failures for the retained token default and accepted whitespace-only token. All five Gateway validation tests pass after the change.
  • Local Maven verification passed all 13 focused tests: ApiConfigValidationTest (5), ApiConfigTest (3), and ActuatorAuthenticationAutoConfigurationTest (5).
./mvnw -o verify -B \
  -pl dolphinscheduler-api,dolphinscheduler-authentication/dolphinscheduler-actuator-authentication \
  -Dtest=ApiConfigValidationTest,ApiConfigTest,ActuatorAuthenticationAutoConfigurationTest \
  -Dsurefire.failIfNoSpecifiedTests=false \
  -Djacoco.skip=true -Danalyze.skip=true -Dmaven.test.skip=false -DskipUT=false
  • Spotless passed for both affected Java modules and the two upgrade documents.
  • Parsed all five changed service YAML files and verified that Actuator authentication remains disabled by default with empty credentials.
  • Parsed the Gateway YAML examples in both Standalone guides and checked that they match each other and use existing configuration keys.
  • git diff --check passed. The full test suite and deployment verification were not run.

Pull Request Notice

Pull Request Notice

Deployments enabling Python Gateway or Actuator authentication must provide the relevant non-blank credentials. Upgrade notes are included in both languages.

@SbloodyS SbloodyS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the English and Chinese Standalone installation guides alongside this change? Both currently point users to api-server/conf/application.yaml and only show how to enable the gateway. Standalone loads standalone-server/conf/application.yaml, and with this PR, setting api.python-gateway.enabled: true without a non-blank api.python-gateway.auth-token will cause startup to fail.

Please show both settings in the correct file and mention that the Python client must use the same token.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement][Authentication] Require explicit credentials for Python Gateway and Actuator

2 participants