I have been asked to write an application that will allow a user to select a database and have it read and store the ACL (including Roles) into a document. I haven't been able to find any way that let's you scan an ACL and capture the contents like that.
You can access the ACL of a database through the Database class in Java. There is a getAcl()
method for that. Once you have the ACL you can loop through all the entries.
Every AclEntry object has methods to get the access level, roles, etc.