e2e-tests: Add tests for the entra_password flow - #1633
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 002-entra-password-mfa-auth #1633 +/- ##
===============================================================
- Coverage 87.54% 86.29% -1.26%
===============================================================
Files 124 25 -99
Lines 8463 1612 -6851
Branches 111 0 -111
===============================================================
- Hits 7409 1391 -6018
+ Misses 998 221 -777
+ Partials 56 0 -56 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dbb447d to
ef3ab43
Compare
|
Good news, the two new tests are passing. So while this could point out to a broker/e2e-vm provisioning misconfiguration, it likely points out to a latent issue in #1520, I'll investigate this further and see if it could be reliably fixed The failing tests are:
Edit: Looking at Edit: Tests are passing now, but the Edit: The root cause was that |
fb41ec0 to
552d04b
Compare
375d3ff to
9bbf3ae
Compare
b050f69 to
9b6d677
Compare
adombeck
left a comment
There was a problem hiding this comment.
Great work, just a few comments
552d04b to
469f980
Compare
The new entra_password flow has no automated coverage. Add an end-to-end test that exercises the register_device=true configuration: the broker authenticates via the Microsoft Broker App, registers the device on first login, and caches the password locally for subsequent offline use. Disabling device_auth ensures the broker auto-selects the single available mode, keeping the test focused on the password+MFA flow without an interactive provider-selection step.
Cover the register_device=false configuration, where the broker uses a configured client_secret to obtain an app-only Graph token for group lookup instead of registering a device. The secret is injected into broker.conf at test setup time rather than baked into the provisioning snapshot, keeping the base image clean for public-client flows. Without the secret the test fails immediately at setup, surfacing a misconfigured CI run as a clear error instead of a silent missing-auth-mode failure.
When client_secret is configured alongside register_device, refresh token requests against the Microsoft Broker App fail with AADSTS700025 — Entra ID rejects secrets on public clients unconditionally. The Graph API credential (cfg.clientSecret) goes to the client-credentials endpoint, not the OIDC token endpoint, so it is separate and unaffected.
9b6d677 to
40e39be
Compare
adombeck
left a comment
There was a problem hiding this comment.
The "Login Entra Password" tests are failing in
and
shouldn't they be skipped when using the google broker?
`entra_password` is an Entra ID-specific broker option, but these tests ran against every broker, including google, where the config keys don't apply and the password+MFA UI never appears. CI runs against the google broker were failing instead of skipping.
e1995bc
into
002-entra-password-mfa-auth
Important
This is a draft PR based on #1520, it will eventually be merged into it
These are new end-to-end tests that verify the new
entra_passwordflow. Two new tests are intended to be added:A test that validates the enrollment path (
register_device=true)sudo command)A test that validates the non-enrollment path (
register_device=falseandclient_secretconfiguration)UDENG-10836