1 Reply Latest reply on May 5, 2009 11:36 PM by Anil Saldanha

    How to read application-policy at runtime?

    Christopher Corbell Newbie

      I'm using the default login-config.xml for server policy configuration with JBoss 4.0.5. There's just a single application-policy defined, for Kerberos.

      I'd like to read this policy from within a service method - this is primarily to detect a bad configuration (e.g. an SPN with a hostname/IP component that doesn't match the current host) and give better guidance to the server administrator through logging and a more specific exception that can cue the admin client to put up helpful instructions.

      I could go out and parse the login-config.xml from the filesystem, but presumably there's a way to get a PolicyConfig object or similar representation of the configured policy and inspect its module-option settings in code; I'd prefer to do that.

      Can anyone tell me how to get there from here?