Skip to content

Fix Extension Management permission validation - #12381

Closed
PooyaKharamesh wants to merge 5 commits into
releases/24.1from
pokharam/corrected-authorization-hardening-24-1
Closed

PooyaKharamesh wants to merge 5 commits into
releases/24.1from
pokharam/corrected-authorization-hardening-24-1

Conversation

@PooyaKharamesh

@PooyaKharamesh PooyaKharamesh commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Fixes missing permission validation in Extension Management.

Related to AB#648158

PooyaKharamesh and others added 2 commits October 6, 2026 10:10
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>
Use the Extension Installation Impl permission error text expected by the regression test.

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.1] 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.1 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.1, which is not a supported branch. It will not be approved or merged — please close it if it is no longer needed.

@alexei-dobriansky

alexei-dobriansky commented Oct 6, 2026 •

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 is targeted and 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 delivery branch and build state.

Suggestions

S1 (🔴 High): Bind the test subscriber manually
The new subscriber is inside a test codeunit, so it must use manual binding. Add EventSubscriberInstance = Manual and bind the subscriber for the tests that need it; the current code fails with AL0501 and 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 current compile failure also prevents validating the regression tests.

Necessity: The authorization hardening is needed, but this backport targets the unsupported releases/24.1 branch. Close this PR or move the fix to a supported branch after correcting the test subscriber.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=12381 round=1 by=alexei-dobriansky at=2026-10-06T22:51:08.4308561Z lastSha=e8cf1be020e4cf142cd2a7bb3f583c846d12984c reviewKey=a24bffbd227977764e629307c3eea77fbe7724df249c789a69dbb6d400c0caa9 suggestions=S1@85d300e6

@PooyaKharamesh
PooyaKharamesh enabled auto-merge (squash) October 7, 2026 10:46
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 application-object 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 compiler blocker is resolved by the code changes, and no new issue is attributable to the round-2 commits. The live build did not reach compilation because workflow initialization failed while downloading a dependency, so it provides no code result for this head. The PR-specific discussion explicitly identifies this exact target branch, releases/24.1, 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.
New observations (commits since round 1)

None - the changes address the previous suggestion and adjust the test subscriber lifecycle.

Risk assessment and necessity

Risk: The authorization check protects tenant-wide extension installation, removal, deployment, and related data-deletion operations. The round-2 commits only repair the test harness; no new code defect was found, but compilation was not independently completed for this head because the workflow stopped during initialization.

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.1, 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=12381 round=2 by=alexei-dobriansky at=2026-10-08T00:10:13.6780783Z lastSha=9a610abb102ed69d2c836d16970b89c045ccc7d8 reviewKey=b13de61f1ee9375957f4d79a2a8791295354e37575a75c863ac6928260b7730e suggestions=S1@85d300e6: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