Skip to content

fix(extensions): preserve embedded permission policy#898

Merged
jbachorik merged 2 commits into
developfrom
agent/issue-877-embedded-permissions
Jul 14, 2026
Merged

fix(extensions): preserve embedded permission policy#898
jbachorik merged 2 commits into
developfrom
agent/issue-877-embedded-permissions

Conversation

@jbachorik

@jbachorik jbachorik commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • transfer API-JAR services and permission metadata into embedded extension properties
  • fail fat-agent packaging when BTrace-Extension-Permissions is absent instead of silently granting an empty set
  • add repository/bridge parity tests for default denial and explicit policy approval of a privileged embedded extension
  • add TestKit fixtures covering privileged, explicitly empty, and missing permission metadata

Fixes #877

Verification

  • full :btrace-core:test -PtestJavaVersion=11 suite
  • focused EmbeddedExtensionPermissionTest (embedded/filesystem parity, default denial, explicit allow)
  • focused fat-agent TestKit cases for privileged transfer, explicit-empty transfer, and missing-metadata rejection
  • ./gradlew spotlessCheck
  • :btrace-gradle-plugin:compileGroovy

Baseline limitations

The complete :btrace-gradle-plugin:test run reaches five unrelated failures already present on develop: two tests use the removed registry DSL, one expects the removed registry(...) source, and two extension fixtures define a non-abstract ShadowJar incompatible with Gradle 9.5. The current plugin build also pins JUnit 6.1.2 while targeting Java 11, so TestKit verification used a temporary local JUnit 5.14.4 pin and Java 17 test launcher; neither temporary change is included in this PR.


This change is Reviewable

JarOutputStream jarOutput = new JarOutputStream(output, manifest)) {
if (entryName != null) {
jarOutput.putNextEntry(new JarEntry(entryName));
jarOutput.write(contents.getBytes(StandardCharsets.ISO_8859_1));
@jbachorik jbachorik force-pushed the agent/issue-877-embedded-permissions branch from ac732bd to 1f23534 Compare July 13, 2026 19:52
@jbachorik jbachorik changed the base branch from develop to agent/issue-875-doctor July 13, 2026 19:53
@jbachorik jbachorik force-pushed the agent/issue-875-doctor branch from 698f2e6 to 5ab7614 Compare July 14, 2026 20:16
Base automatically changed from agent/issue-875-doctor to develop July 14, 2026 20:45
@jbachorik jbachorik force-pushed the agent/issue-877-embedded-permissions branch from 176824e to d73da4a Compare July 14, 2026 21:32
@jbachorik jbachorik marked this pull request as ready for review July 14, 2026 21:37
@jbachorik jbachorik merged commit 674f09f into develop Jul 14, 2026
17 checks passed
@jbachorik jbachorik deleted the agent/issue-877-embedded-permissions branch July 14, 2026 21:57
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.0] Add regression coverage for embedded extension permission enforcement

1 participant