test/sun/security/tools/policytool/ChangeUI.html

Print this page
rev 7285 : 8015274: TEST_BUG: Step2: After selecting 'View Warning Log', it is empty instead of FileNotFound.
8015276: TEST_BUG: The 'ptool.test' can't be saved in the 'tmp' folder.
8016158: Instruction is not clear on how to use keytool to create JKS store in case
   1 <html>
   2 <body>
   3 
   4 <applet width=100 height=100 code=ChangeUI.class>
   5 </applet>
   6 
   7 <b>ATTENTION:</b> policytool now contains no platform-specific codes anymore and
   8 should behaves exactly the same across all platforms. This also means:
   9 <ol>
  10     <li>You may only need to test it on one platform</li>
  11     <li>You can create policy files for a platform which is different than
  12     the platform you are running policytool on</li>
  13 </ol>
  14 
  15 This is a multi-stage test.  Click on "done" when you have completed
  16 reading these instructions.<br><br>
  17 
  18 First, policytool will be invoked.<br><br>
  19 <ol start="0">
  20 <li>If testing on Windows, create a temporary directory. (Example: C:\foo\tmp)

  21 <li>Add new policy entry
  22 <li>Add permission:
  23     <pre>
  24     Type                   Target name     Actions
  25     FilePermission         c:\\foo\\bar    read
  26     </pre>
  27     <ol>
  28         <li>Press OK</li>
  29         <li>Confirm the file name warning dialog appears</li>
  30         <li>Choose Retain, confirm the permission edit dialog is closed</li>
  31         <li>Double click the newly created FilePermission entry to edit it</li>
  32         <li>Press OK</li>
  33         <li>Confirm the file name warning dialog appears</li>
  34         <li>Choose Edit, confirm the permission edit dialog is still opened</li>
  35         <li>change Target name to c:\foo\bar</li>
  36         <li>Press OK, no warning dialog is shown</li>
  37     </ol>
  38 <li>Add permission:
  39     <pre>
  40     Type                   Target name


  46         <li>Confirm the target name is still "me@SOMEWHERE" "you@SOMEWHERE"</li>
  47         <li>Press OK</li>
  48     </ol>
  49 <li>Confirm there are 2 entries in the permission list
  50 <li>Press Done
  51 <li>Double click the new policy entry to edit it
  52 <li>Add permission:
  53     <pre>
  54     Type
  55     AllPermission
  56     </pre>
  57 <li>Add a new Principal, say, KerberosPrincipal with Principal Name as aaa
  58 <li>Confirm there is 1 entry in the Principals list
  59 <li>Confirm there are 3 entries in the permission list
  60 <li>Press cancel
  61 <li>Double click the policy entry to edit it
  62 <li>Confirm there are ZERO entries in the Principals list
  63 <li>Confirm there are 2 entries in the permission list
  64 <li>Press cancel
  65 <li>Save as "/tmp/p"<br>
  66 If testing on Windows, save in the temporary directory created in Step 0.
  67 (Example: Save as "C:\foo\tmp\p.policy")
  68 <li>Confirm that the file /tmp/p (or C:\foo\tmp\p.policy) looks like
  69 <pre>
  70 /* AUTOMATICALLY GENERATED ON Tue Jul 19 16:27:30 CST 2005*/
  71 /* DO NOT EDIT */
  72 
  73 grant {
  74   permission java.io.FilePermission "c:\\foo\\bar", "read";
  75   permission javax.security.auth.kerberos.DelegationPermission "\"me@SOMEWHERE\" \"you@SOMEWHERE\"";
  76 };
  77 </pre>
  78 </ol>
  79 <br><br>
  80 
  81 Press "Pass" if ... press "Fail" otherwise.<br><br>
  82 
  83 </body>
  84 </html>
   1 <html>
   2 <body>
   3 
   4 <applet width=100 height=100 code=ChangeUI.class>
   5 </applet>
   6 
   7 <b>ATTENTION:</b> policytool now contains no platform-specific codes anymore and
   8 should behaves exactly the same across all platforms. This also means:
   9 <ol>
  10     <li>You may only need to test it on one platform</li>
  11     <li>You can create policy files for a platform which is different than
  12     the platform you are running policytool on</li>
  13 </ol>
  14 
  15 This is a multi-stage test.  Click on "done" when you have completed
  16 reading these instructions.<br><br>
  17 
  18 First, policytool will be invoked.<br><br>
  19 <ol start="0">
  20 <li>Find (or create) a temporary directory that you have write access to.
  21 (Example: 'C:\foo\tmp' on Windows or '/tmp' on other systems)
  22 <li>Add new policy entry
  23 <li>Add permission:
  24     <pre>
  25     Type                   Target name     Actions
  26     FilePermission         c:\\foo\\bar    read
  27     </pre>
  28     <ol>
  29         <li>Press OK</li>
  30         <li>Confirm the file name warning dialog appears</li>
  31         <li>Choose Retain, confirm the permission edit dialog is closed</li>
  32         <li>Double click the newly created FilePermission entry to edit it</li>
  33         <li>Press OK</li>
  34         <li>Confirm the file name warning dialog appears</li>
  35         <li>Choose Edit, confirm the permission edit dialog is still opened</li>
  36         <li>change Target name to c:\foo\bar</li>
  37         <li>Press OK, no warning dialog is shown</li>
  38     </ol>
  39 <li>Add permission:
  40     <pre>
  41     Type                   Target name


  47         <li>Confirm the target name is still "me@SOMEWHERE" "you@SOMEWHERE"</li>
  48         <li>Press OK</li>
  49     </ol>
  50 <li>Confirm there are 2 entries in the permission list
  51 <li>Press Done
  52 <li>Double click the new policy entry to edit it
  53 <li>Add permission:
  54     <pre>
  55     Type
  56     AllPermission
  57     </pre>
  58 <li>Add a new Principal, say, KerberosPrincipal with Principal Name as aaa
  59 <li>Confirm there is 1 entry in the Principals list
  60 <li>Confirm there are 3 entries in the permission list
  61 <li>Press cancel
  62 <li>Double click the policy entry to edit it
  63 <li>Confirm there are ZERO entries in the Principals list
  64 <li>Confirm there are 2 entries in the permission list
  65 <li>Press cancel
  66 <li>Save as "/tmp/p"<br>
  67 (Or use the temporary directory mentioned in Step 0 if it's not '/tmp'.
  68          For example, "C:\foo\tmp\p" on Windows)
  69 <li>Confirm that the file created in the previous step looks like
  70 <pre>
  71 /* AUTOMATICALLY GENERATED ON Tue Jul 19 16:27:30 CST 2005*/
  72 /* DO NOT EDIT */
  73 
  74 grant {
  75   permission java.io.FilePermission "c:\\foo\\bar", "read";
  76   permission javax.security.auth.kerberos.DelegationPermission "\"me@SOMEWHERE\" \"you@SOMEWHERE\"";
  77 };
  78 </pre>
  79 </ol>
  80 <br><br>
  81 
  82 Press "Pass" if ... press "Fail" otherwise.<br><br>
  83 
  84 </body>
  85 </html>