I've searched and found three useful libraries:
1. Apache Ki http://incubator.apache.org/ki/
2. java.security http://java.sun.com/javase/technologies/security/
3. Spring Security http://www.acegisecurity.org/
The one that drives my curiosity the most is Apache Ki. Seems very promising.