Skip to content

Cover access list authorization through the external authorize endpoint with integration tests #3922

Description

@howieandersen

Problem
The access list authorization boundary has integration coverage through the internal decision endpoint (ResourceRegistry_DecisionTests) and a single deny case on AccessListAuthorizationController from the prototype slice in PR #3873, but the literal external authorize endpoint (POST authorization/api/v1/authorize) has no access list scenarios at all. The Bruno suite under Authorize/AccessList encodes the intended behavior: AC1 and AC2 Permit, AC3 and AC4 Deny, each with and without a delegation, plus a system user permitted through a resource delegation. None of those outcomes are asserted in-process today.

Goal
The access list Permit and Deny outcomes are asserted through the external authorize endpoint, including the delegation variants and the system user resource-delegation case, as [IntegrationTest]s in Altinn.Authorization.Tests.

Approach
Port the residue identified by the gap report on #3378 after the prototype corrections: only the scenarios that go through the external authorize endpoint, not the AC1 to AC4 equivalents already covered through the internal decision endpoint. Use the Bruno requests under test/Authorize/AccessList as the behavioral spec for request shape and expected outcome. Follow the guard-pair pattern and the seed identities documented in SystemResourceTestData, and the existing external endpoint patterns in ExternalDecisionTest. Policy fixtures stay hand-mirrored stand-ins derived from the Bruno-asserted outcomes, matching the caveat recorded on #3378.

Work

Out of scope

Part of #3378.

Metadata

Metadata

Assignees

Labels

BackendThis is a backend task

Type

Projects

Status
👷In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions