Skip to content

[KARAF-3259] Add support for executing of OSGi commands with karaf-maven-plugin - #47

Closed
basovnik wants to merge 1 commit into
apache:masterfrom
basovnik:KARAF-3259_client_for_karaf-maven-plugin
Closed

[KARAF-3259] Add support for executing of OSGi commands with karaf-maven-plugin#47
basovnik wants to merge 1 commit into
apache:masterfrom
basovnik:KARAF-3259_client_for_karaf-maven-plugin

Conversation

@basovnik

@basovnik basovnik commented Oct 3, 2014

Copy link
Copy Markdown

Add support for executing of OSGi commands with karaf-maven-plugin. Plugin will have next goal client which will work similarly to karaf client.

@basovnik
basovnik force-pushed the KARAF-3259_client_for_karaf-maven-plugin branch 2 times, most recently from dbf10c5 to 45c86a9 Compare October 3, 2014 14:27
@basovnik
basovnik force-pushed the KARAF-3259_client_for_karaf-maven-plugin branch 2 times, most recently from 9e58871 to 52a1812 Compare January 15, 2015 09:24
@basovnik
basovnik force-pushed the KARAF-3259_client_for_karaf-maven-plugin branch from 52a1812 to c200216 Compare January 15, 2015 15:52
@asfgit asfgit closed this in 3e58261 Dec 18, 2015
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 &#47; 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 &#47; 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>
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.

1 participant