I really like the concept of using JAAS to do authorization inside user bundles.

The idea is to let someone do the Authentication part outside the business code. The result of this is a JAAS login context on the thread.

Then inside you can use the code below to get the principals:
Subject subject = Subject.getSubject(AccessController.getContext());
Set<Principal> principals = subject.getPrincipals();

Up to this point this is straight forward. The problem then is that JAAS does not specify a common way to find out if a Principal contains is a user name or a group name. Is there any standard way to get only the roles from the principals or to do an authorization decision?
Any OSGi spec that helps with this perhaps?

Best regards

Christian

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to