JAAS configuration save to file

Hi,

I have a configuration file and with java Configuration object I read the jaas configuratino from the module.

Then I change the configuration in program and now I want to save It back to the file. Is there any possibility in java to make this easy.

I hope somebody can help me.

Thanks, Christoph

[331 byte] By [ntsronnya] at [2007-10-2 0:50:51]
# 1

it is true that the Configuration API does not support "write" semantics. in other words, there are no methods to "set" or "create" entries programmatically. it follows, then, that there is no standard method to "save" newly created entries to the back-end data store.

the Configuration class is about accessing a given login configuration - it doesn't get into the business of managing a configuration.

having said that, the developer has the ability to design custom implementations that support programmatic configuration management (as you seem to have done). you would simply need to design a way to create/delete entries, and also a way to save or flush the changes to the back-end store.

if you want to write out entries that conform to the default file-based syntax, it should not be very difficult (the syntax is fairly simple and straightforward).but it is true that there is no existing code you can re-use that would do this for you.

charlie.laia at 2007-7-15 18:01:07 > top of Java-index,Security,Other Security APIs, Tools, and Issues...