Skip to content

frontend: app: Add scriptjs permission to az-auth plugin#755

Open
sniok wants to merge 1 commit into
Azure:headlamp-downstreamfrom
sniok:hl-az-auth
Open

frontend: app: Add scriptjs permission to az-auth plugin#755
sniok wants to merge 1 commit into
Azure:headlamp-downstreamfrom
sniok:hl-az-auth

Conversation

@sniok

@sniok sniok commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Required for #754

Gives permission to the Azure Auth plugin to execute azure-api.js script for authentication

Copilot AI review requested due to automatic review settings July 10, 2026 15:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for the new az-auth (Azure Authentication) plugin across the frontend plugin loader and Electron runtime so it can execute a bundled azure-api.js script via scriptjs with the appropriate permission secret and pre-consented command entry (per the needs of #754).

Changes:

  • Register az-auth in plugin package/path identification so it can be recognized at runtime.
  • Plumb a dedicated runCmd-scriptjs-az-auth/azure-api.js permission secret to the az-auth plugin and expose a restricted pluginRunCommand('scriptjs', ...) for it.
  • Allow Electron to treat az-auth as a valid plugin/bin folder and add startup pre-consent for its scriptjs command.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
frontend/src/plugin/runPlugin.ts Adds az-auth to the identifyPackages mappings (paths + package names).
frontend/src/plugin/index.ts Grants az-auth access to the scriptjs permission secret and injects a scriptjs-only pluginRunCommand.
app/electron/runCmd.ts Adds az-auth command consent entry and a new scriptjs permission secret for azure-api.js.
app/electron/plugin-management.ts Allows az-auth as a valid plugin bin folder.
app/electron/main.ts Pre-seeds run-command consent for az-auth at app startup.

Comment thread app/electron/runCmd.ts Outdated
@sniok
sniok marked this pull request as draft July 10, 2026 18:53
@sniok
sniok force-pushed the hl-az-auth branch 2 times, most recently from c13717d to ad9922b Compare July 13, 2026 15:39
@sniok
sniok marked this pull request as ready for review July 13, 2026 16:17
Copilot AI review requested due to automatic review settings July 13, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

frontend/src/plugin/runPlugin.test.ts:692

  • identifyPackages was extended to recognize the az-auth package, but the test suite only asserts that az-auth is false in other scenarios. Adding at least one positive test (path + name match) would prevent regressions in the new mapping.

  // Tests for aks-desktop package

Comment thread frontend/src/plugin/runPlugin.ts
Comment thread app/electron/plugin-management.ts
Copilot AI review requested due to automatic review settings July 15, 2026 13:04

@skoeva skoeva left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Comment thread frontend/src/plugin/runPlugin.ts
Comment thread frontend/src/plugin/runPlugin.test.ts
Comment thread app/electron/runCmd.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants