elsa-core/test/unit/Elsa.ExternalAuthentication.UnitTests/Foundational
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
..
BrokerErrorFactoryTests.cs Add external authentication broker 2026-07-24 19:04:26 +02:00
ClientReturnPathValidatorTests.cs Add external authentication broker 2026-07-24 19:04:26 +02:00
ConfigurationIdentityProviderConnectionSourceTests.cs Harden external authentication contracts and flows 2026-07-25 03:48:50 +02:00
ConnectionRevisionCalculatorTests.cs Revise external authentication architecture 2026-07-25 02:35:56 +02:00
DefaultIdentityProviderConnectionRegistryTests.cs Refine test for archived connections in shadow relationships; introduce IsAvailableForAuthentication helper for improved connection filtering logic. 2026-08-02 00:49:26 +02:00
ExternalAuthenticationOptionsTests.cs fix(auth): validate wildcard permission patterns and warn on deny-list stripping (#7997) 2026-08-27 11:45:54 +02:00
ExternalAuthenticationOptionsValidatorTests.cs fix(auth): validate wildcard permission patterns and warn on deny-list stripping (#7997) 2026-08-27 11:45:54 +02:00
ExternalAuthenticationRedactorTests.cs Add external authentication broker 2026-07-24 19:04:26 +02:00
ExternalAuthenticationRoleDeletionDependencyContributorTests.cs fix(external-auth)!: wildcard-aware permission grant boundary, and startup smoke tests for both hosts (#7985) 2026-08-25 05:25:29 +02:00
ExternalAuthenticationServiceCollectionTests.cs refactor(auth)!: retire the legacy permission constants and duplicate descriptor types (#7987) 2026-08-25 06:04:32 +02:00
ExternalAuthenticationSessionAdministrationTests.cs Add external authentication broker 2026-07-24 19:04:26 +02:00
ExternalAuthenticationTestData.cs Revise external authentication architecture 2026-07-25 02:35:56 +02:00
ExternalAuthenticationUserDeletionDependencyContributorTests.cs feat(auth)!: structured authorization model, phases 1-6 (#7980) 2026-08-24 23:44:55 +02:00
HmacExternalAuthenticationHandleHasherTests.cs fix(auth): validate wildcard permission patterns and warn on deny-list stripping (#7997) 2026-08-27 11:45:54 +02:00
IdentityProviderConnectionValidityAssessorTests.cs fix: validate external login methods before discovery 2026-08-02 02:47:28 +02:00
InMemoryExternalAuthenticationSessionStoreTests.cs Fix external authentication review findings 2026-08-02 03:35:39 +02:00
InMemoryExternalIdentityProvisionerTests.cs feat(auth)!: structured authorization model, phases 1-6 (#7980) 2026-08-24 23:44:55 +02:00
InMemoryOneTimeStoresTests.cs Add external authentication broker 2026-07-24 19:04:26 +02:00
InMemoryOperationalStoresTests.cs Add external authentication broker 2026-07-24 19:04:26 +02:00
TestDoubles.cs Revise external authentication architecture 2026-07-25 02:35:56 +02:00
TestSystemClock.cs Add external authentication broker 2026-07-24 19:04:26 +02:00