users@glassfish.java.net

RE: SSO with Active Directory and Kerberos

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Tue, 21 Jan 2014 08:57:05 -0500

  


> To: users_at_glassfish.java.net
> Subject: Re: SSO with Active Directory and Kerberos
> From: forums_at_java.net
> Date: Tue, 21 Jan 2014 00:02:16 -0600
>
> You need JAAS. 1. a file .java.login.config WindowsLoginJaas {
> com.sun.security.auth.module.NTLoginModule required debug=false; }; 2. In
> your client import javax.security.auth.Subject; import
> javax.security.auth.login.LoginContext; import
> javax.security.auth.login.LoginException; import com.sun.security.auth.*; ...
> System.setProperty("java.security.auth.login.config", "url to above file");
> lc = new LoginContext("WindowsLoginJaas"); lc.login(); lc.getSubject();
> sub.getPrincipals(); ..
.
MG>to implement this scenario:
MG>System.setProperty("java.security.auth.login.config", "url to above file");

MG>$JRE_HOME\jre\lib\security
MG># with -Djava.security.policy=somefile.
MG>#Comment out this line to disable
MG># this feature.
java.security.policy=true

MG>security property file needs to allowSystemProperty (the Security property, policy.allowSystemProperty is set to true),

>
> --
>
> [Message sent by forum member 'moj2ee']
>
> View Post: http://forums.java.net/node/900571
>
>