The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » GlassFish

Thread: Dynamic certificate realm

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 1 - Last Post: Mar 17, 2009 10:58 PM by: nitkal
kcochrane

Posts: 16
Dynamic certificate realm
Posted: Mar 17, 2009 4:07 AM
  Click to reply to this thread Reply

Hello.

We are currently implementing web services in Glassfish 2.1 and these are secured by requiring a client certificate. This all works well using the @RolesAllowed annotation in the web service and defining the DN of the certificates in the <security-role-mapping> element of the sun-application.xml file.

This is however beginning to cause us some problems :
We need to change this file between development and deployment in order to allow development certificates for testing our code and client certificates in the production environment.
Our users (and therefore certificates) are constantly changing, each time this happens we need to change sun-application.xml.

It would therefore be desirable to define some way for the application to dynamically query the roles that the DN from the certificate will map to, perhaps from a database or LDAP. Does anyone know if something like this would be possible?

Thank You.

nitkal

Posts: 46
Re: Dynamic certificate realm
Posted: Mar 17, 2009 10:58 PM   in response to: kcochrane
  Click to reply to this thread Reply

For dynamic mapping of roles to users, you could override the RoleMapper with an in-memory JACC provider. Please check this forum post for more details:

http://forums.java.net/jive/thread.jspa?messageID=324831




 XML java.net RSS