[KARAF-3259] Add support for executing of OSGi commands with karaf-maven-plugin - #47
Closed
basovnik wants to merge 1 commit into
Closed
Conversation
basovnik
force-pushed
the
KARAF-3259_client_for_karaf-maven-plugin
branch
2 times, most recently
from
October 3, 2014 14:27
dbf10c5 to
45c86a9
Compare
basovnik
force-pushed
the
KARAF-3259_client_for_karaf-maven-plugin
branch
2 times, most recently
from
January 15, 2015 09:24
9e58871 to
52a1812
Compare
basovnik
force-pushed
the
KARAF-3259_client_for_karaf-maven-plugin
branch
from
January 15, 2015 15:52
52a1812 to
c200216
Compare
jbonofre
added a commit
to jbonofre/karaf
that referenced
this pull request
Sep 8, 2026
The ACL regex example in the handleRegistration Javadoc contained the literal sequence */ (from \..*/]), which closed the block comment early and broke compilation of org.apache.karaf.management.server. Escape the trailing slash as &apache#47; so the comment terminates where intended. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017MZQYyrYzSQHdHeD6AEGXT
jbonofre
added a commit
to jbonofre/karaf
that referenced
this pull request
Sep 8, 2026
The ACL regex example in the handleRegistration Javadoc contained the literal sequence */ (from \..*/]), which closed the block comment early and broke compilation of org.apache.karaf.management.server. Escape the trailing slash as &apache#47; so the comment terminates where intended. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017MZQYyrYzSQHdHeD6AEGXT
jbonofre
added a commit
that referenced
this pull request
Sep 11, 2026
* fix(management): apply the JMX RBAC guard to MBean lifecycle operations The KarafMBeanServerGuard only intercepted invoke, getAttribute(s) and setAttribute(s). createMBean, registerMBean and unregisterMBean went straight to the delegate MBeanServer, so they were not subject to any role check and behaved inconsistently with the rest of the guarded API. Route these three operations through the guard as well: * MBeanInvocationHandler adds them to the guarded operation list. * KarafMBeanServerGuard resolves the required roles from the jmx.acl* configuration by ObjectName and operation name (the target MBean is not, or not yet, registered so no MBeanInfo introspection is done). For createMBean/registerMBean the class name is passed as the operation argument so ACL rules can match on it, e.g. createMBean(java.lang.String)[/javax\.management\.loading\..*/] = admin * A null ObjectName falls back to the generic jmx.acl configuration. * The default jmx.acl.cfg maps createMBean/registerMBean/unregisterMBean to the admin role (the existing "* = admin" already covered them). * Fix Javadoc comment prematurely terminated by regex example The ACL regex example in the handleRegistration Javadoc contained the literal sequence */ (from \..*/]), which closed the block comment early and broke compilation of org.apache.karaf.management.server. Escape the trailing slash as / so the comment terminates where intended. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017MZQYyrYzSQHdHeD6AEGXT --------- Co-authored-by: Jean-Baptiste Onofré <jbonofre@MacBookAir.local> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
jbonofre
added a commit
that referenced
this pull request
Sep 11, 2026
* fix(management): apply the JMX RBAC guard to MBean lifecycle operations The KarafMBeanServerGuard only intercepted invoke, getAttribute(s) and setAttribute(s). createMBean, registerMBean and unregisterMBean went straight to the delegate MBeanServer, so they were not subject to any role check and behaved inconsistently with the rest of the guarded API. Route these three operations through the guard as well: * MBeanInvocationHandler adds them to the guarded operation list. * KarafMBeanServerGuard resolves the required roles from the jmx.acl* configuration by ObjectName and operation name (the target MBean is not, or not yet, registered so no MBeanInfo introspection is done). For createMBean/registerMBean the class name is passed as the operation argument so ACL rules can match on it, e.g. createMBean(java.lang.String)[/javax\.management\.loading\..*/] = admin * A null ObjectName falls back to the generic jmx.acl configuration. * The default jmx.acl.cfg maps createMBean/registerMBean/unregisterMBean to the admin role (the existing "* = admin" already covered them). (cherry picked from commit 87c1426) * Fix Javadoc comment prematurely terminated by regex example The ACL regex example in the handleRegistration Javadoc contained the literal sequence */ (from \..*/]), which closed the block comment early and broke compilation of org.apache.karaf.management.server. Escape the trailing slash as / so the comment terminates where intended. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017MZQYyrYzSQHdHeD6AEGXT --------- Co-authored-by: Jean-Baptiste Onofré <jbonofre@MacBookAir.local> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for executing of OSGi commands with karaf-maven-plugin. Plugin will have next goal client which will work similarly to karaf client.