* This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * @summary Frivolous ClassCastExceptions thrown by SubjectCodeSource.implies * Note: if you want to see the java.security.debug output, * you can not simply set the system property. * you must run this test by hand and pass -Djava.security.debug=... // in case we run standalone // do principal-only tests "Comparator.Principal.Policy");
// do comparator-only tests "Comparator.Comparator.Policy");
"Comparator.Combined.Policy");
// this principal is not in policy - should not match any policy grants // this principal is not in policy - should not match any policy grants // this principal is not in policy - should not match any policy grants // security check against one principal should pass // should not match BAR grant entry in policy // security check against two principals should pass // should not match FOOBAR grant entry in policy // should not match FOOBAR grant entry in policy // security check against one comparator should pass // should not match BAR grant entry in policy // security check against two comparators should pass for FOO // security check against two comparators should pass for BAR // security check should fail against FOOBAR // security check against principal followed by comparator should pass // should not match BAR grant entry in policy // security check against comparator followed by principal should pass // should not match FOO grant entry in policy // security check against principal-principal-comparator should pass // should not match WORLD grant entry in policy // security check against principal-principal-comparator should pass // should not match HELLO grant entry in policy