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

Byteman is not friends with security managers

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.1.3
    • Component/s: None
    • Labels:
      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!

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                adinn Andrew Dinn
                Reporter:
                dmlloyd David Lloyd
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: