<rdf:RDF
    xmlns:s='http://snipsnap.org/rdf/snip-schema#'
    xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    xml:base='http://wiki.marandcustomsolutions.com/rdf'>
    <s:Snip rdf:about='http://wiki.marandcustomsolutions.com/rdf#Development/Java+%26+J2EE/Websphere/Java+2+Security'
         s:cUser='mpecher'
         s:oUser=''
         s:mUser='mpecher'>
        <s:name>Development/Java &amp; J2EE/Websphere/Java 2 Security</s:name>
        <s:content>1 Java 2 Security in WAS:&#xD;&#xA;----&#xD;&#xA;Links:\\&#xD;&#xA;http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rsec_rpolicydir.html\\&#xD;&#xA;http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/csec_rsecmgr2.html\\&#xD;&#xA;&#xD;&#xA;1 Debug Security exceptions in WAS:&#xD;&#xA;The WebSphere Application Server SYSOUT file and the com.ibm.websphere.java2secman.norethrow property are the two primary aids for debugging.&#xD;&#xA;he WebSphere System Log or Trace Files&#xD;&#xA;The AccessControl exception that is logged in the system log or trace files contains the permission violation that causes the exception, the exception call stack, and the permissions granted to each stack frame. This information is usually enough to determine the missing permission and the code requiring the permission.&#xD;&#xA;The com.ibm.websphere.java2secman.norethrow property&#xD;&#xA;When Java 2 security is enabled in WebSphere Application Server, the security manager component creates a java.security.AccessControl exception when a permission violation occurs. This exception, if not handled, often causes a run-time failure. This exception is also logged in the SYSOUT file.&#xD;&#xA;&#xD;&#xA;However, when the Java virtual machine com.ibm.websphere.java2secman.norethrow property is set and has a value of true, the security manager does not create the AccessControl exception. This information is logged.&#xD;&#xA;&#xD;&#xA;To set the com.ibm.websphere.java2secman.norethrow property for the server, go to the WebSphere Application Server administrative console and click Servers &gt; Application Servers &gt; server_name. Under Additional Properties, click Process Definition &gt; Java Virtual Machine &gt; Custom Properties &gt; New. In the Name field, type com.ibm.websphere.java2secman.norethrow. In the Value field, type true.&#xD;&#xA;&#xD;&#xA;{code}&#xD;&#xA;WebSphere Application Server administrative console and click &#xD;&#xA;__Servers &gt; Application Servers &gt; server_name__. &#xD;&#xA;Under Additional Properties, click &#xD;&#xA;__Process Definition &gt; Java Virtual Machine &gt; Custom Properties &gt; New__. &#xD;&#xA;In the __Name__ field, type __com.ibm.websphere.java2secman.norethrow__. &#xD;&#xA;In the __Value__ field, type __true__.&#xD;&#xA;{code}&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;1 .java.policy in wasadmin&apos;s home directory&#xD;&#xA;Having a .java.policy file in the home directory of the WAS user will have the server pick this up!&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;1 was.policy&#xD;&#xA;A was.policy defines an EAR&apos;s java 2 security permissions (for the app) for Webspehere Application Server (WAS).&#xD;&#xA;1.1 permission java.io.FilePermission &quot;${was.install.root}/*&quot;, &quot;read&quot;&#xD;&#xA;This specifically grants code to __read__ the install directory of the app server. The __ \* __ specifies that only this directory is allowed. Speficying a __ - __ instead means in this directory and children as well.</s:content>
        <s:mTime>2006-10-19 16:37:01.0</s:mTime>
        <s:cTime>2006-10-19 11:31:53.0</s:cTime>
        <s:comments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
        <s:snipLinks>
            <rdf:Bag>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/Java &amp; J2EE/Websphere'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/Java &amp; J2EE'/>
                <rdf:li rdf:resource='#snipsnap-index'/>
                <rdf:li rdf:resource='#snipsnap-search'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Entity Relationship Diagram'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/Java &amp; J2EE/Websphere/Java 2 Security/'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Linux/Understanding memory usage'/>
                <rdf:li rdf:resource='#Development'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Version Control Systems/ClearCase/ConfigSpec'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/Java+&amp;+J2EE/Websphere/Java+2+Security/'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Trailer Wiring'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/HTTP Header'/>
                <rdf:li rdf:resource='#snipsnap-help'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/Java &amp; J2EE/Websphere/Portal/Portlet Namespace for JSR168 Portlets'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/Java &amp; J2EE/Websphere/Portal/themes'/>
                <rdf:li>
                    <s:Snip rdf:about='http://wiki.marandcustomsolutions.com/rdf#Development/Java+%26+J2EE/Websphere/Java+2+Security'>
                        <s:attachments
                             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
                    </s:Snip>
                </rdf:li>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/Java &amp; J2EE/Websphere/WebSEAL/WebSEAL Junctions'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/Java &amp; J2EE/Spring'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/Java &amp; J2EE/Websphere/TAM'/>
            </rdf:Bag>
        </s:snipLinks>
    </s:Snip>
</rdf:RDF>

