Skip to content

Add AJP REMOTE_USER authentication propagation test#9

Closed
honza-kasik wants to merge 6 commits into
modcluster:mainfrom
honza-kasik:ajp-auth-propagation
Closed

Add AJP REMOTE_USER authentication propagation test#9
honza-kasik wants to merge 6 commits into
modcluster:mainfrom
honza-kasik:ajp-auth-propagation

Conversation

@honza-kasik

@honza-kasik honza-kasik commented Jun 2, 2026

Copy link
Copy Markdown
Contributor
  • Adds AjpAuthPropagationTest validating end-to-end REMOTE_USER propagation via AJP from httpd to WildFly/Elytron's EXTERNAL mechanism
  • Tests the same AJP protocol path used by IIS/isapi_redirect after Windows authentication
  • Three scenarios: authenticated user with correct role (200), no authentication (403), wrong role (403)
  • Adds -Dhttpd.skip.mod_proxy_cluster flag to NativeHttpdBalancer to support running httpd without mod_proxy_cluster (needed because its global proxy handler intercepts all ProxyPass requests)

There was no test coverage for the REMOTE_USER → AJP → Elytron EXTERNAL mechanism path. This test validates the actual AJP protocol path end-to-end using httpd Basic auth as a stand-in for any external authenticator (IIS, SSO, etc.).

@honza-kasik honza-kasik marked this pull request as draft June 2, 2026 12:21
@honza-kasik honza-kasik force-pushed the ajp-auth-propagation branch from 3bf4b70 to 1402d75 Compare June 2, 2026 12:31
@honza-kasik honza-kasik changed the title WIP REMOTE_USER ajp Add AJP REMOTE_USER authentication propagation test Jun 2, 2026
Validates the end-to-end path that IIS/isapi_redirect uses after
Windows authentication: httpd authenticates the user (via Basic auth
as a stand-in for Windows auth) → mod_proxy_ajp forwards REMOTE_USER
as an AJP attribute → Undertow receives it → Elytron's EXTERNAL
mechanism authenticates the user → the secured servlet is accessible.

Three test scenarios: authenticated user with correct role (200),
no authentication (403), authenticated user with wrong role (403).

Adds -Dhttpd.skip.mod_proxy_cluster flag to run httpd without
mod_proxy_cluster modules, since its global proxy handler intercepts
all ProxyPass requests. The test sets this flag via @BeforeAll.
Enable AjpAuthPropagationTest to run in both Docker and native mode.

Docker changes:
- DockerHttpdBalancer: skipModProxyCluster branch that starts httpd
  without mod_proxy_cluster, with --init + exec for proper signal
  delivery on graceful restart
- AjpAuthConfigurator: ajpHost parameter for Docker networking
  (containers use network aliases, not localhost), proxy module
  loading with IfModule guards, htpasswd path fallback
- Test computes AJP host/port per mode and uses auth-aware readiness
  polling to verify the full AJP path is up before asserting

Added to main TEST_CLASS so it runs in both Docker and native CI.
@honza-kasik honza-kasik force-pushed the ajp-auth-propagation branch from 1402d75 to 701155e Compare June 2, 2026 20:25
@honza-kasik honza-kasik force-pushed the ajp-auth-propagation branch from 5cc1bd5 to b7e2eb6 Compare June 2, 2026 21:09
@honza-kasik

Copy link
Copy Markdown
Contributor Author

Closing in favor of https://github.com/jboss-eap-qe/tests-native-connectors mod_cluster TS is not a place for non-mod_proxy_cluster based connectors.

@honza-kasik honza-kasik closed this Jun 4, 2026
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.

1 participant