Skip to content

Fix Extension Management permission validation - #12384

Closed
PooyaKharamesh wants to merge 4 commits into
releases/24.4from
pokharam/corrected-authorization-hardening-24-4
Closed

PooyaKharamesh wants to merge 4 commits into
releases/24.4from
pokharam/corrected-authorization-hardening-24-4

Conversation

@PooyaKharamesh

@PooyaKharamesh PooyaKharamesh commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Fixes missing permission validation in Extension Management.

Related to AB#648158

Backport the corrected permission-set checks and regression tests, including the namespace and test compilation repairs from Bug 651703.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PooyaKharamesh
PooyaKharamesh requested review from a team as code owners October 6, 2026 08:18
@github-actions github-actions Bot added AL: System Application Team: Integrations GitHub request for Integrations area labels Oct 6, 2026
@PooyaKharamesh PooyaKharamesh changed the title [24.4] Harden extension management authorization Fix Extension Management permission validation Oct 6, 2026
vesakr
vesakr previously approved these changes Oct 6, 2026
@mazhelez

Copy link
Copy Markdown
Contributor

The releases/24.4 branch is not supported, so this backport is out of scope and will not be merged here.

@mazhelez

Maria Zhelezova (mazhelez) commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

This backport targets releases/24.4, which is not a supported branch. It will not be approved or merged — please close it if it is no longer needed.

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Reject Changes

What this PR does

This change replaces a broad table-read permission check with explicit checks for SUPER or the Exten. Mgt. - Admin permission set. It also adds positive and negative regression tests, including the company-scoped assignment case.

The permission check matches the tenant-wide nature of extension management. However, the new test subscriber does not follow the compiler rule for subscribers in test codeunits, so the test app cannot build.

Problem-solution fit

Fit: Strong

The code directly addresses the missing authorization boundary and covers the main allowed and denied cases. The implementation cannot be accepted in its current build state or target branch.

Suggestions

S1 (🔴 High): Bind the test subscriber manually
The subscriber is inside a test codeunit, so AL0501 requires EventSubscriberInstance = Manual. Add that property and bind the codeunit before the tests that need OnCanManageExtensions; otherwise the test app cannot compile.

Risk assessment and necessity

Risk: Extension installation and removal are tenant-wide administrative operations. A wrong permission decision could allow unauthorized changes or block valid administrators; the test compile failure also prevents validating the regression coverage.

Necessity: The authorization hardening is needed, but this PR targets the unsupported releases/24.4 branch. Close this PR or move the corrected change to a supported servicing branch.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=12384 round=1 by=alexei-dobriansky at=2026-10-06T22:49:34Z lastSha=91320af4677f5c91fe3909d1ac6584474f3adebd reviewKey=23ee6c8b657327e1e5a671059e6e3a7f28e52bd8c091a10bd29e199926b2b135 suggestions=S1@653ec59d

@PooyaKharamesh
PooyaKharamesh enabled auto-merge (squash) October 7, 2026 10:47
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 2

Recommendation: Reject Changes

What this PR does

This change replaces a broad table-read permission check with explicit tenant-wide checks for SUPER or the Exten. Mgt. - Admin permission set. The new commits make the test subscriber manual, bind a stable instance before protected extension operations, and keep the explicit-user permission tests on a separate codeunit instance.

The previous compilation blocker is resolved, and no new issue is evident in the round-2 changes. The PR-specific discussion explicitly identifies this exact target branch, releases/24.4, as unsupported/out of channel and states that it will not be merged. The technically sound fix should not merge through this PR.

Status of previous suggestions
ID Title Status Author response
S1 Bind the test subscriber manually Addressed Added manual subscriber mode and guarded one-time binding before extension-operation tests. The relevant application and test app builds pass.
New observations (commits since round 1)

None - the changes address the previous suggestion and reorder declarations only.

Risk assessment and necessity

Risk: The authorization check protects tenant-wide extension installation, removal, and related data-deletion operations. The round-2 commits only repair the test harness; the successful application and test app builds remove the previous compile risk. The PR-specific discussion explicitly identifies this exact target branch, releases/24.4, as unsupported/out of channel and states that it will not be merged. The technically sound fix should not merge through this PR.

Necessity: Explicit permission validation is needed because application-object read access is not extension-management authority. The PR-specific discussion explicitly identifies this exact target branch, releases/24.4, as unsupported/out of channel and states that it will not be merged. The technically sound fix should not merge through this PR.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=12384 round=2 by=alexei-dobriansky at=2026-10-07T23:39:55.0942337Z lastSha=74a03870893dd396cfa2a91dac9d85a1499a5e9d reviewKey=0ee350ad9657868c26e94ecc452b22ea22d21ca965684d4bba5294f97036b911 suggestions=S1@653ec59d:addressed parentRound=1

@PooyaKharamesh

Copy link
Copy Markdown
Contributor Author

Closing this PR because its target branch is unsupported and will not be merged here. The authorization-hardening change and any remaining review/build follow-up will be fixed in separate PRs targeting supported branches.

1 similar comment
@PooyaKharamesh

Copy link
Copy Markdown
Contributor Author

Closing this PR because its target branch is unsupported and will not be merged here. The authorization-hardening change and any remaining review/build follow-up will be fixed in separate PRs targeting supported branches.

auto-merge was automatically disabled October 11, 2026 08:09

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: System Application Team: Integrations GitHub request for Integrations area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants