You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by "jbonofre (via GitHub)" <gi...@apache.org> on 2026/09/10 16:01:57 UTC
[PR] [karaf-4.4.x] Restrict feature:repo-add -i and feature:repo-remove -u to admin role [karaf]
jbonofre opened a new pull request, #2884:
URL: https://github.com/apache/karaf/pull/2884
## Summary
Backport of #2883 to `karaf-4.4.x`.
- `feature:repo-add -i <url>` and `feature:repo-remove -u <url>` call `FeaturesServiceImpl.addRepository()`/`removeRepository()` with the install/uninstall flag set, which installs (and starts) or uninstalls every feature in the given repository.
- Neither `repo-add` nor `repo-remove` had an entry in the `feature` scope's command ACL, so any SSH user holding only the `viewer` role could reach them and have Karaf install/start an arbitrary attacker-supplied features repository — bypassing the admin-only ACL already enforced on `feature:install`/`feature:uninstall`.
- Adds option-specific ACL rules, mirroring the existing pattern used for `bundle:refresh -f` and similar bundle-scope commands: only the `-i`/`-u` option variants now require `admin`; plain `repo-add`/`repo-remove` (which don't install/uninstall anything) remain open as before, so there's no behavior change beyond closing the escalation path.
- Applied identically in the three places the `feature` ACL is defined on this branch: the standard assembly `feature.xml`, the `instance` `etc` template, and the itest config fixture.
- Adds a regression test (`FeatureSshCommandSecurityTest#testFeatureRepoCommandSecurityViaSsh`) exercising the ACL boundary for both a viewer and an admin user, using a non-existent repository URL so nothing is actually installed/removed.
## Test plan
- [x] `mvn -pl itests/test test-compile` passes
- [ ] Full PaxExam SSH itest suite (`itests/test`) run in CI
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@karaf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [karaf-4.4.x] Restrict feature:repo-add -i and feature:repo-remove -u to admin role [karaf]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2884:
URL: https://github.com/apache/karaf/pull/2884#issuecomment-5622790675
## Test Results
656 files ±0 656 suites ±0 1h 6m 19s ⏱️ -5s
1 007 tests +1 959 ✅ - 4 43 💤 ±0 1 ❌ +1 4 🔥 +4
2 752 runs +2 2 623 ✅ - 7 120 💤 ±0 2 ❌ +2 7 🔥 +7
For more details on these failures and errors, see [this check](https://github.com/apache/karaf/runs/102977102404).
Results for commit 71b359c6. ± Comparison against base commit 47efa803.
[test-results]:data:application/gzip;base64,H4sIAFjpomoC/03PTQ4CIQwF4KsY1i6GMoXgZQxThoQ4P4aBlfHuljigy/eVvtCXCHGZD3G7aNTXizhKzH/Rl+Ry3DcGZY1l4WmuczkMpsX7UYjYLNofPeKTaVRdgotLXewwp7Sn+oYlla22gkE4UysFDarTt1TC0OQs7Uuts/6N9nWNmYMwclJoSY9m0nyGBU/eBdSG3OgwSJq8RCAv3h8mHT0yEAEAAA==
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@karaf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [karaf-4.4.x] Restrict feature:repo-add -i and feature:repo-remove -u to admin role [karaf]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre merged PR #2884:
URL: https://github.com/apache/karaf/pull/2884
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@karaf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org