alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (PrincipalExpansionError.policy)

This example Java source code file (PrincipalExpansionError.policy) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

testprincipal

The PrincipalExpansionError.policy Java example source code

// granted to jtreg
grant codebase "file:/net/koori.sfbay/-" {
    permission java.security.AllPermission;
};

// granted to the test class
grant codebase "file:${test.classes}/" {
    permission javax.security.auth.AuthPermission "modifyPrincipals";
    permission javax.security.auth.AuthPermission "doAs";
    permission java.io.FilePermission "/testFile", "read";
};

// granted to the test action
// -- the test moves the compiled action into the src directory
// -- via the shell script.  this way we can ensure different
// -- codebases for the test and the action
grant codebase "file:${test.src}/",
      principal com.sun.security.auth.SolarisPrincipal "TestPrincipal",
      principal com.sun.security.auth.SolarisPrincipal "${bad.property}" {
    permission java.io.FilePermission "/testFile", "read";
};

Other Java examples (source code examples)

Here is a short list of links related to this Java PrincipalExpansionError.policy source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.