Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-233

Byteman is not friends with security managers

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 2.1.3
    • None
    • None
    • None

    Description

      The Byteman agent requires certain permissions to execute; by default if you run within a security manager it will not get these permissions because the default policy does not allow it.

      I would request that Byteman be enhanced to install a delegating Policy during its early bootstrap which grants Byteman itself AllPermission. I am not certain this will allow Byteman to work with -Djava.security.manager set, but for software which installs a SecurityManager programmatically (e.g. AS), it should work fine.

      Here's an example which you could probably use, almost verbatim:

      https://github.com/jbossas/jboss-modules/blob/master/src/main/java/org/jboss/modules/ModulesPolicy.java

      And the code which installs it:

      https://github.com/jbossas/jboss-modules/blob/master/src/main/java/org/jboss/modules/Main.java#L291

      Thanks!

      Attachments

        Activity

          People

            rhn-engineering-adinn Andrew Dinn
            dlloyd@redhat.com David Lloyd
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: