equal
deleted
inserted
replaced
53 import org.ietf.jgss.GSSContext; |
53 import org.ietf.jgss.GSSContext; |
54 import org.ietf.jgss.GSSCredential; |
54 import org.ietf.jgss.GSSCredential; |
55 import org.ietf.jgss.GSSManager; |
55 import org.ietf.jgss.GSSManager; |
56 import sun.security.jgss.GSSUtil; |
56 import sun.security.jgss.GSSUtil; |
57 import sun.security.krb5.Config; |
57 import sun.security.krb5.Config; |
|
58 import sun.util.logging.PlatformLogger; |
|
59 |
58 import java.util.Base64; |
60 import java.util.Base64; |
59 |
61 |
60 /** |
62 /** |
61 * Basic JGSS/krb5 test with 3 parties: client, server, backend server. Each |
63 * Basic JGSS/krb5 test with 3 parties: client, server, backend server. Each |
62 * party uses JAAS login to get subjects and executes JGSS calls using |
64 * party uses JAAS login to get subjects and executes JGSS calls using |
145 } |
147 } |
146 } |
148 } |
147 |
149 |
148 public static void main(String[] args) |
150 public static void main(String[] args) |
149 throws Exception { |
151 throws Exception { |
|
152 |
|
153 String HTTPLOG = "sun.net.www.protocol.http.HttpURLConnection"; |
|
154 System.setProperty("sun.security.krb5.debug", "true"); |
|
155 PlatformLogger.getLogger(HTTPLOG).setLevel(PlatformLogger.Level.ALL); |
150 |
156 |
151 KDC kdcw = KDC.create(REALM_WEB); |
157 KDC kdcw = KDC.create(REALM_WEB); |
152 kdcw.addPrincipal(WEB_USER, WEB_PASS); |
158 kdcw.addPrincipal(WEB_USER, WEB_PASS); |
153 kdcw.addPrincipalRandKey("krbtgt/" + REALM_WEB); |
159 kdcw.addPrincipalRandKey("krbtgt/" + REALM_WEB); |
154 kdcw.addPrincipalRandKey("HTTP/" + WEB_HOST); |
160 kdcw.addPrincipalRandKey("HTTP/" + WEB_HOST); |