1 /* |
1 /* |
2 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 6853328 7172701 |
26 * @bug 6853328 7172701 8194486 |
27 * @run main/othervm OkAsDelegateXRealm false |
27 * @summary Support OK-AS-DELEGATE flag |
|
28 * @library /test/lib |
|
29 * @run main jdk.test.lib.FileInstaller TestHosts TestHosts |
|
30 * @run main/othervm -Djdk.net.hosts.file=TestHosts OkAsDelegateXRealm false |
28 * KDC no OK-AS-DELEGATE, fail |
31 * KDC no OK-AS-DELEGATE, fail |
29 * @run main/othervm -Dtest.kdc.policy.ok-as-delegate OkAsDelegateXRealm true |
32 * @run main/othervm -Djdk.net.hosts.file=TestHosts |
|
33 * -Dtest.kdc.policy.ok-as-delegate OkAsDelegateXRealm true |
30 * KDC set OK-AS-DELEGATE for all, succeed |
34 * KDC set OK-AS-DELEGATE for all, succeed |
31 * @run main/othervm -Dtest.kdc.policy.ok-as-delegate=host/host.r3.local OkAsDelegateXRealm false |
35 * @run main/othervm -Djdk.net.hosts.file=TestHosts |
|
36 * -Dtest.kdc.policy.ok-as-delegate=host/host.r3.local |
|
37 * OkAsDelegateXRealm false |
32 * KDC set OK-AS-DELEGATE for host/host.r3.local only, fail |
38 * KDC set OK-AS-DELEGATE for host/host.r3.local only, fail |
33 * @run main/othervm -Dtest.kdc.policy.ok-as-delegate=host/host.r3.local,krbtgt/R2,krbtgt/R3 OkAsDelegateXRealm true |
39 * @run main/othervm -Djdk.net.hosts.file=TestHosts |
|
40 * -Dtest.kdc.policy.ok-as-delegate=host/host.r3.local,krbtgt/R2,krbtgt/R3 |
|
41 * OkAsDelegateXRealm true |
34 * KDC set OK-AS-DELEGATE for all three, succeed |
42 * KDC set OK-AS-DELEGATE for all three, succeed |
35 * @summary Support OK-AS-DELEGATE flag |
|
36 */ |
43 */ |
37 import java.io.FileOutputStream; |
44 import java.io.FileOutputStream; |
38 import java.io.IOException; |
45 import java.io.IOException; |
39 import java.security.Security; |
46 import java.security.Security; |
40 import javax.security.auth.callback.Callback; |
47 import javax.security.auth.callback.Callback; |