2 Replies Latest reply on Apr 10, 2009 11:46 AM by baranowb

    java security in jboss & runtime parsing of java.policy file

    baranowb

      Hi
      Decided to move here from mailing.

      I have been googling and browsing JBoss code in order to see how one can parse java.policy file at runtime and instrument policy collection accordingly.
      I see some code in jboss altering permissions however I did not find any runtime parse.
      Yet with no success. Has anoyone had chance to write something like that?
      Is it possible without writing specific parser (for this case) and iterate over grant/deny entries and instantiate permissions ?

        • 1. Re: java security in jboss & runtime parsing of java.policy
          anil.saldhana

          The Policy parser for the default java.policy is done by the JVM. There is very limited flexibility in altering that.

          If you really want total control, then you will need to write your own policy implementation with its own parsing etc.

          The question I would ask is what are your use cases?

          • 2. Re: java security in jboss & runtime parsing of java.policy
            baranowb

            at runtime or after container starts we have to deploy multiple deployable units (DU - just an abstraction). each component from DU may have element in its descriptor (which we parse and it is available as POJO) which contains string formatted accordingly to rules of policy.file.
            Now upon deploying component we need to load those policies, when component is undeployed we have to remove them.