Skip to main content

Posts

Showing posts with the label Glassfish custom login module

*** NOT ADF - Glassfish custom login module

Step 1) Write your custom module - there are enough examples out there - I used ( http://x-techteam.blogspot.com/2008/03/glassfish-login-module-simple-example.html ) Step 2) Add to login.conf [glassfish location]\glassfish\domains\[domain name]\config yourRealm{     za.co.jaas.realm.YourLoginModule required; }; Step 3) Admin console setup Goto admin console : http://localhost:4848 and Login Goto Cconfigurations\[Your config]\Security\Realms Click new button ClassName: za.co.jaas.realm.YourRealm (choose second custom radio button) Name:     yourRealm Press the ok button BIG BIG NOTE: (Save yourself hours of time) Tick Default Principal To Role Mapping in configurations\[Your config]\Security\ and save stop glassfish REDEPLOY APPLICATION start glasfish NOTE : When writing a startup script please remeber to start db before start of Assfish otherwise you will have some strange funky errors.