<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    XACML Best Practices
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/dgradl">Dan Gradl</a> in <i>PicketBox Development</i> - <a href="http://community.jboss.org/message/637524#637524">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>This is a post in a serious of discussions I was starting to get some discussion going on XACML.&#160; I led the implementation of XACML on a large scale using the original SunXACML libraries as the PDP and I am sharing some of my insights as a way to elicit some requirements on the further development of XACML.&#160;&#160; The original post and index to these discussions is <a class="" href="http://community.jboss.org/thread/175091?tstart=0">http://community.jboss.org/thread/175091?tstart=0</a>.&#160; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This topic is meant to be a catchall for items not in the other major categories listed there.&#160; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I am starting with just one of those misc. items this morning, primarily because I ran across this as I was attempting to use JBoss XACML in a way I had used SunXACML.&#160;&#160;&#160; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I found it very useful to leverage PolicyIdReference in PolicySets.&#160; Rather than embed all the policies within the PolicySet, using references to policies, kept things cleaner and more understandable, and it enabled reuse.&#160;&#160; In the RBAC Profile example here: <a class="" href="http://community.jboss.org/docs/DOC-16676">http://community.jboss.org/wiki/XACMLRBACLocator</a>, the policies are directly in the PPS.&#160; I preferred instead to create a set of policies externally and refer to them as references in the PPS.&#160; This enabled me to use them in different roles in different combinations.&#160; More specifically policies were written to target specific resource/action combinations (only), and then assigned them to PolicySets that targetted specific subjects (namely a role).&#160; As far as I can see the JBoss XACML Locators and FinderModules do not handle references.&#160; Everything is treated as a first level policy and it's common to see this warning "INFO: More than one top-level applicable policy for the request".&#160;&#160;&#160; The XACML spec says "the mechanism for resolving a policy reference to the corresponding policy is outside the scope of this specification", so it's up to implementation detail.&#160; However, the way I believe it should work is that those policies referenced should be considered a second-level policy.&#160; As such, they should not be target evaluated in the initial passthrough, only if a top-level PolicySet matches the target and refers to these policies, then the target should be evaluated.&#160; In the SunXACML module there is a StaticRefPolicyFinderModule, and it works just that way.&#160; It will "find" policies only by reference id and not by evaluation, and can be pointed at a different set of policies.&#160;&#160;&#160; So I would place all of my RPS/PPS files in one directory and all of my policies in a separate directory and they would be evaluted if an RPS/PPS matched first and had reference to it.&#160;&#160;&#160; That component is still there but can't be used directly by the JBoss Locators because of some differences.&#160; But I would suggest that there definitely needs to be support for PolicyIdReference capabilities, but would like to solicit feedback on the approach I described.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/637524#637524">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in PicketBox Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2088">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>