elsa-core/test/integration/Elsa.ExternalAuthentication.IntegrationTests
Sipke Schoorstra 80a5892ecd
fix(external-auth): keep the default-roles guard when an update omits the policy (#7996)
* fix(external-auth): keep the default-roles guard when an update omits the policy

A PUT that omitted unlinkedPolicy hit ValidatePolicyAsync's null-policy early
return before the PolicyDefaultRoles guard, so an actor holding only
connections:update could clear a stored create-user policy and silently drop
its default-role assignments (refs #7977, #7992). The candidate role set is
now computed before the early return -- empty when the policy is omitted --
so clearing, adding, or switching a policy all count as changing default
roles. The cheap permission check also runs before the registry-backed role
comparison, so the common permitted path skips building the registry.

Adds integration coverage for the omitted-policy transition in both
directions and for clearing a policy that assigns no roles.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(external-auth): dispose the request message in PutConnectionAsync

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-27 11:45:44 +02:00
..
Broker fix(external-auth)!: wildcard-aware permission grant boundary, and startup smoke tests for both hosts (#7985) 2026-08-25 05:25:29 +02:00
Compatibility refactor(auth)!: retire the legacy permission constants and duplicate descriptor types (#7987) 2026-08-25 06:04:32 +02:00
Connections fix(external-auth): keep the default-roles guard when an update omits the policy (#7996) 2026-08-27 11:45:44 +02:00
Distributed Remove migration for external authentication in EFCore.Sqlite module 2026-07-31 14:31:18 +02:00
Fixtures fix: stop two silent serialization and test-isolation traps (#7969) 2026-08-21 00:36:11 +02:00
Identity feat(auth)!: structured authorization model, phases 1-6 (#7980) 2026-08-24 23:44:55 +02:00
Links refactor(auth)!: retire the legacy permission constants and duplicate descriptor types (#7987) 2026-08-25 06:04:32 +02:00
Operations fix(external-auth)!: wildcard-aware permission grant boundary, and startup smoke tests for both hosts (#7985) 2026-08-25 05:25:29 +02:00
Permissions fix(external-auth)!: wildcard-aware permission grant boundary, and startup smoke tests for both hosts (#7985) 2026-08-25 05:25:29 +02:00
Persistence feat(auth)!: structured authorization model, phases 1-6 (#7980) 2026-08-24 23:44:55 +02:00
Scale Revise external authentication architecture 2026-07-25 02:35:56 +02:00
Security
Sessions fix(external-auth)!: wildcard-aware permission grant boundary, and startup smoke tests for both hosts (#7985) 2026-08-25 05:25:29 +02:00
Elsa.ExternalAuthentication.IntegrationTests.csproj refactor(auth)!: retire the legacy permission constants and duplicate descriptor types (#7987) 2026-08-25 06:04:32 +02:00