elsa-core/test/unit/Elsa.ExternalAuthentication.UnitTests
Sipke Schoorstra 168a8c76f0
fix(auth): validate wildcard permission patterns and warn on deny-list stripping (#7997)
* fix(auth): validate wildcard permission patterns and warn on deny-list stripping

Permission.IsValidPattern rejects inert wildcard spellings (such as
"workflows*:delete") that parse but can never match. The grant boundary,
stored-permission, and external-authentication options validators reject them
at authoring time, and PermissionGrantValidator applies the same check to
incoming grants.

ExternalAuthenticationOptionsValidator now warns (never fails) when
DeniedPermissions is non-empty, because any non-empty deny list refuses every
wildcard grant that could reach a denied permission -- including the seeded
administrator role's "*". The validator takes an ILogger, and
AddExternalAuthenticationServices registers logging alongside its other
framework dependencies (TryAdd-based, so host logging configuration wins).
The operational consequence is recorded in the authorization-model migration
guide.

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

* fix(auth): report subtree grants whose verb nothing under them supports

'workflows/*:frobnicate' reached a non-empty subtree and was therefore
treated as resolved, so the startup audit stayed silent about a grant
that cannot authorize anything. Require at least one reached descriptor
to support a concrete verb; verb wildcards keep the reach-only check.

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:54 +02:00
..
Clients Introduce shadow relationship management in identity provider connections 2026-07-31 01:00:36 +02:00
Extensibility Fix external authentication setting field identifiers 2026-07-25 14:07:06 +02:00
Features Fix external authentication connection contracts 2026-07-27 10:07:29 +02:00
Foundational fix(auth): validate wildcard permission patterns and warn on deny-list stripping (#7997) 2026-08-27 11:45:54 +02:00
Notifications Add atomic external identity link replacement 2026-07-26 23:40:17 +02:00
OpenIdConnect Harden external authentication contracts and flows 2026-07-25 03:48:50 +02:00
Permissions refactor(auth)!: retire the legacy permission constants and duplicate descriptor types (#7987) 2026-08-25 06:04:32 +02:00
Previews Harden external authentication contracts and flows 2026-07-25 03:48:50 +02:00
Secrets fix: simplify external authentication secret IDs 2026-08-02 00:22:16 +02:00
Security Revise external authentication architecture 2026-07-25 02:35:56 +02:00
Elsa.ExternalAuthentication.UnitTests.csproj Harden external authentication contracts and flows 2026-07-25 03:48:50 +02:00