Skip to content

Fix Extension Management permission validation - #12392

Open
PooyaKharamesh wants to merge 4 commits into
releases/25.5from
pokharam/corrected-authorization-hardening-25-5
Open

PooyaKharamesh wants to merge 4 commits into
releases/25.5from
pokharam/corrected-authorization-hardening-25-5

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 [25.5] Harden extension management authorization Fix Extension Management permission validation Oct 6, 2026
vesakr
vesakr previously approved these changes Oct 6, 2026
@mazhelez

Maria Zhelezova (mazhelez) commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

This backport targets releases/25.5, 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 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
Set EventSubscriberInstance = Manual and bind the codeunit instance before tests that need this authorization override. The current subscriber prevents the test app from compiling.

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 an unsupported release 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=12392 round=1 by=alexei-dobriansky at=2026-10-07T00:07:50.0153736Z lastSha=db0a694018cc36a0067cc9f800f67775f237e194 reviewKey=dc211bc2b12536b4d66705cf01f91ac097f6c897e39d92440bc9aff791d56748 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 the broad application-object read-permission check with explicit tenant-wide SUPER and Exten. Mgt. - Admin assignment checks. 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 the relevant application and test builds pass. However, this backport targets releases/25.5, which is not an accepted merge target.

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 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, and the successful application and test builds remove the previous compile risk.

Necessity: Explicit permission validation is needed because application-object read access is not extension-management authority. This PR should not merge through releases/25.5; the hardening must use an accepted target branch.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=12392 round=2 by=alexei-dobriansky at=2026-10-07T23:21:38.1677055Z lastSha=82ab523e37f39f258c1c318a2ef1ebf2909bbeb1 reviewKey=927896a2fa2920d1c4e2e3a9dd75c2d5e1ba2d836c48cbdc40b98f4732663c6e suggestions=S1@653ec59d:addressed parentRound=1

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

auto-merge was automatically disabled October 14, 2026 14:08

Pull request was closed

@PooyaKharamesh
PooyaKharamesh enabled auto-merge (squash) October 14, 2026 14:08
auto-merge was automatically disabled October 16, 2026 15:13

Pull request was closed

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

This branch was previously deployed

1 inactive deployment
triage — 82ab523e Deployed Oct 16, 2026 by PooyaKharamesh via Classify team ownership #8169
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.

6 participants