4 Replies Latest reply on Feb 1, 2005 6:01 PM by kenkyee

    automatically adding application policy in login-config.xml

      Has anyone found a simple way to do this in Ant? Trying to figure out a simple way to deploy an app without telling the user to edit this file manually and add it....

        • 2. Re: automatically adding application policy in login-config.

          Thanks, Scott!

          That was one of my annoyances w/ JBoss; it seemed JBoss could dynamically load an app unless you have a custom app policy w/ its own security context. You guys should make this a default mbean (it's not in the default instance's jboss-service.xml for JBoss 4.0.1). Seems like it would be good standard behavior...

          Is there something similiar w/ jbossmq-destinations-service.xml so you don't have to hand-edit that either?

          ken

          • 3. Re: automatically adding application policy in login-config.

            In that Wiki, I replaced "..." with "jboss:service=DynamicLoginConfig". If I didn't do that, jboss would blow up because it couldn't find a domain for that mbean.

            • 4. can't put login-config.xml into WEB-INF directory in .war fi

              From the description on the Wiki, it sounds like you can put login-config.xml into the WEB-INF directory in your .war file, but JBoss4 doesn't see it when you do that.

              I tried changing the mbean to look like this:

              WEB-INF/login-config.xml
              <!-- The service which supports dynamic processing of login-config.xml
              configurations.
              -->
              <depends optional-attribute-name="LoginConfigService">
              jboss.security:service=XMLLoginConfig

              <!-- Optionally specify the security mgr service to use when
              this service is stopped to flush the auth caches of the domains
              registered by this service.
              -->
              <depends optional-attribute-name="SecurityManagerService">
              jboss.security:service=JaasSecurityManager



              hoping that would let me put the login-config info into my WEB-INF directory, but JBoss4 won't start if I do this.

              So, it looks like it just enables the jboss/server/default/conf/login-config.xml to be parsed dynamically so you don't have to bounce the JBoss4 server.

              Not quite what I was after, unfortunately. I'm trying to find an easy way to update login-config.xml via an Ant build script so I don't have to do it manually. In other words, something like how data sources are handled by adding a *-ds.xml file to the server/default/conf directory would have been ideal (though that dynamic deployer did it).