<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <base href="https://issues.shibboleth.net/jira" /> 
        <title>Message Title</title> 
    </head> 
    <body class="jira" style="color: #333; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.429"> 
        <table id="background-table" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #f5f5f5; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
            <!-- header here --> 
            <tr> 
                <td id="header-pattern-container" style="padding: 0px; border-collapse: collapse; padding: 10px 20px"> 
                    <table id="header-pattern" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                        <tr> 
                            <td id="header-avatar-image-container" valign="top" style="padding: 0px; border-collapse: collapse; vertical-align: top; width: 32px; padding-right: 8px"> <img id="header-avatar-image" class="image_fix" src="cid:jira-generated-image-avatar-634a11d9-e21c-4461-acda-bef0754790a7" height="32" width="32" border="0" style="border-radius: 3px; vertical-align: top" /> 
                            </td> 
                            <td id="header-text-container" valign="middle" style="padding: 0px; border-collapse: collapse; vertical-align: middle; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> <a class="user-hover" rel="rdw@iay.org.uk" id="email_rdw@iay.org.uk" href="https://issues.shibboleth.net/jira/secure/ViewProfile.jspa?name=rdw%40iay.org.uk" style="color:#3b73af;; color: #3b73af; text-decoration: none">Rod Widdowson</a> <strong>commented</strong> on <a href="https://issues.shibboleth.net/jira/browse/IDP-680" style="color: #3b73af; text-decoration: none"><img src="cid:jira-generated-image-avatar-644cbf6f-c5e5-4f4e-a032-41deaec132d8" height="16" width="16" border="0" align="absmiddle" alt="Improvement" /> IDP-680</a> 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
            <tr> 
                <td id="email-content-container" style="padding: 0px; border-collapse: collapse; padding: 0 20px"> 
                    <table id="email-content-table" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0; border-collapse: separate"> 
                        <tr> 
                            <!-- there needs to be content in the cell for it to render in some clients --> 
                            <td class="email-content-rounded-top mobile-expand" style="padding: 0px; border-collapse: collapse; color: #fff; padding: 0 15px 0 16px; height: 15px; background-color: #fff; border-left: 1px solid #ccc; border-top: 1px solid #ccc; border-right: 1px solid #ccc; border-bottom: 0; border-top-right-radius: 5px; border-top-left-radius: 5px; height: 10px; line-height: 10px; padding: 0 15px 0 16px; mso-line-height-rule: exactly">
                                 
                            </td> 
                        </tr> 
                        <tr> 
                            <td class="email-content-main mobile-expand " style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #fff"> 
                                <table class="page-title-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                    <tr> 
                                        <td style="vertical-align: top;; padding: 0px; border-collapse: collapse; padding-right: 5px; font-size: 20px; line-height: 30px; mso-line-height-rule: exactly" class="page-title-pattern-header-container"> <span class="page-title-pattern-header" style="font-family: Arial, sans-serif; padding: 0; font-size: 20px; line-height: 30px; mso-text-raise: 2px; mso-line-height-rule: exactly; vertical-align: middle"> <a href="https://issues.shibboleth.net/jira/browse/IDP-680" style="color: #3b73af; text-decoration: none">Re: Deprecate Dependency</a> </span> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td id="text-paragraph-pattern-top" class="email-content-main mobile-expand  comment-top-pattern" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #fff; border-bottom: none; padding-bottom: 0"> 
                                <table class="text-paragraph-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
                                    <tr> 
                                        <td class="text-paragraph-pattern-container mobile-resize-text " style="padding: 0px; border-collapse: collapse; padding: 0 0 10px 0"> 
                                            <p style="margin: 10px 0 0 0">I think my main gripes here are</p> 
                                            <ul> 
                                                <li>
                                                    The whole meaning of the Dependency statement is context dependant. For a SimpleAttribute (and friends) it means "glom all these attribute values together and make them available to me", for ScriptedAttributes (and friends) it means "make the attributes with these names available to me". Note that the divide isn't Attribute/DataConnector: some attribute definitions require a list of values, some a list of attributes; ditto data connectors. This is past praying for: "it is what it is" and (like the whole borked attribute filter language) it mostly makes sense until people try to get cute.
                                                </li> 
                                                <li>
                                                    As a result the whole business 'sourceID' being on the attribute or data connector definition is wrong. We got rid of it where it was pointless as we flattened out the name spaces, but in the cases when it is still required it is nonetheless in the wrong place.
                                                </li> 
                                                <li>
                                                    The name 'Dependency' is (to me) misleading. They are Inputs; The dependencies are the transitive closure of all the inputs. If you (like I might) listed the closure of all dependencies as Dependendencies you'd get a surprise.
                                                </li> 
                                                <li>
                                                    As we know namespaces that definitions and attributes live in are a mess, but I think much of that is unavoidable in terms of this issue.
                                                </li> 
                                            </ul> 
                                            <p style="margin: 10px 0 0 0">There are the following restrictions:</p> 
                                            <ul> 
                                                <li>
                                                    It is (I think) imposible to give ComputedIDDataConnecter the output of a DataConnector as direct input. This is because the data connector doesn't have a sourceID.
                                                </li> 
                                                <li>
                                                    Contrariwise it becomes cumbersome to glom together (into the same simple attribute) the values from two attributes coming from data connectors (the same or different) if they have different names.
                                                </li> 
                                            </ul> 
                                            <p style="margin: 10px 0 0 0">At a code level there is: </p> 
                                            <ul> 
                                                <li>
                                                    Some significant, subtle, and hence fragile hackery to do with the fact that we don't know whether a dependency is for an attribute or a data connector. This late binding has several other subtle side effects which will continue to bite us. For instance bear in mind that the name inside a dependency reference isn't a Spring bean ID, it's a name in a specific namespace. I'm pretty sure that in our cases it is also a spring bean ID, but that's not architectural with the API.
                                                </li> 
                                                <li>
                                                    I'm not convinced that the separation between Attribute Definitions and Data Connectors is in the right place. Also past praying for.
                                                </li> 
                                                <li>
                                                    Again because of the late binding, you cannot know at parse time what to build. You cannot even do so at initialization time. This is because Dependencies belong to Definitions, but the wherewithall to go from dependency name to dependency type is in the resolver which is outside (contains) the Attribute Definition (or Data Connector).
                                                </li> 
                                                <li>
                                                    You must not meddle with an attribute definition or a data connector after initialization (because they are stored in a hashmap - OK so you could create your own hash, but what would you hash?) so fixing up at run time is also to be avoided.
                                                </li> 
                                            </ul> 
                                            <p style="margin: 10px 0 0 0">Scott's proposal of </p> 
                                            <div class="code panel" style="border-width: 1px;; border: 1px solid #ccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #ccc; -moz-border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px; margin: 9px 0">
                                                <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                    <pre class="code-java" style="margin: 10px 0 0 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
<Dependency ref=<span class="code-quote" style="color: #009100">"AttributeDefn"</span>/>
<Dependency ref=<span class="code-quote" style="color: #009100">"DataConnector"</span> sourceID=<span class="code-quote" style="color: #009100">"AttrName[s]"</span>/>
</pre> 
                                                </div>
                                            </div> 
                                            <p style="margin: 10px 0 0 0">can be seen to be similar to my </p> 
                                            <div class="code panel" style="border-width: 1px;; border: 1px solid #ccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #ccc; -moz-border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px; margin: 9px 0">
                                                <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                    <pre class="code-java" style="margin: 10px 0 0 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
<SourceAttribute attributeName=”attributeDefinitionId”/>
<SourceAttribute attributeName=”attributeName” dataConnector=<span class="code-quote" style="color: #009100">"DataConnector"</span> /> 
</pre> 
                                                </div>
                                            </div> 
                                            <p style="margin: 10px 0 0 0">Which I don't like any more and would prefer: </p> 
                                            <div class="code panel" style="border-width: 1px;; border: 1px solid #ccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #ccc; -moz-border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px; margin: 9px 0">
                                                <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                    <pre class="code-java" style="margin: 10px 0 0 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
<InputAttributeDefinition ref=<span class="code-quote" style="color: #009100">"AttributeDefn"</span>/>
<InputDataConnector ref=<span class="code-quote" style="color: #009100">"DataConnectorDefn"</span> attribute=<span class="code-quote" style="color: #009100">"name, namelist, or *"</span>/>
</pre> 
                                                </div>
                                            </div> 
                                            <p style="margin: 10px 0 0 0">But it is ambiguous (in Scott's proposal) whether</p> 
                                            <div class="code panel" style="border-width: 1px;; border: 1px solid #ccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #ccc; -moz-border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px; margin: 9px 0">
                                                <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                    <pre class="code-java" style="margin: 10px 0 0 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
<Dependency ref=<span class="code-quote" style="color: #009100">"Definition"</span>/>
</pre> 
                                                </div>
                                            </div> 
                                            <p style="margin: 10px 0 0 0">is is for an attribute definition or a non-updated data connector until well after parse time (see below - it is actually only available at resolve time).</p> 
                                            <p style="margin: 10px 0 0 0">FWIW write-only design notes for either would be:</p> 
                                            <ul> 
                                                <li>
                                                    Derive a new DataConnectorDependency class from Dependency. Modulo getting the logging of failed wiring correct I think I'd be inclined to make it store the associated DataConnector as a DataConnector (not as a String) and the attribute name(s) as a String. (see footnote * below)
                                                </li> 
                                                <li>
                                                    (in my case only) Derive an AttributeDefinitionDependency from Dependency and (at least theoretically) deprecate the Dependency class
                                                </li> 
                                                <li>
                                                    For now accumulate the dependencies in the Attribute Definitions and Data Connectors as now (saves creating a new API class).
                                                </li> 
                                                <li>
                                                    In the parser, warn about sourceId in the Attribute Definition.
                                                </li> 
                                                <li>
                                                    In my case, warn in the parsers about <Dependency>
                                                </li> 
                                            </ul> 
                                            <p style="margin: 10px 0 0 0">At initialize time:</p> 
                                            <ul> 
                                                <li>
                                                    Just as now you need to touch up the <Dependency> things to give them a source ID if the attribute had one. DataConnectorDependency and AttributeDefitionDependency's would not need this (although I guess we could warn if the ID's mismatched).
                                                </li> 
                                            </ul> 
                                            <p style="margin: 10px 0 0 0">At RunTime</p> 
                                            <ul> 
                                                <li>
                                                    Dependency anslysis (circularity and resolution of Dependants) is unchanged
                                                </li> 
                                                <li>
                                                    In the single attribute, multiple values, case (like SimpleAttribute) 
                                                    <ul> 
                                                        <li>
                                                            Remove the current sourceAttributeId warnings when the input is an Attribute (these are the noisy ones)
                                                        </li> 
                                                        <li>
                                                            Just as now we give an error if an old style <Dependency> for a Data Connector is encountered without a sourceAttributeID in the AttributeDefinition,
                                                        </li> 
                                                        <li>
                                                            Warn if we specified a multi value for attributes (new format either Scott or me) Instead allow multiple lines so 
                                                            <div class="code panel" style="border-width: 1px;; border: 1px solid #ccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #ccc; -moz-border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px; margin: 9px 0">
                                                                <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                    <pre class="code-java" style="margin: 10px 0 0 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
<Dependency ref=<span class="code-quote" style="color: #009100">"DataConnector"</span> sourceID=<span class="code-quote" style="color: #009100">"Attr1"</span>/>
<Dependency ref=<span class="code-quote" style="color: #009100">"DataConnector"</span> sourceID=<span class="code-quote" style="color: #009100">"Attr2"</span>/>
</pre> 
                                                                </div>
                                                            </div> 
                                                            <p style="margin: 10px 0 0 0">not</p> 
                                                            <div class="code panel" style="border-width: 1px;; border: 1px solid #ccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #ccc; -moz-border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px; margin: 9px 0">
                                                                <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                    <pre class="code-java" style="margin: 10px 0 0 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
<Dependency ref=<span class="code-quote" style="color: #009100">"DataConnector"</span> sourceID=<span class="code-quote" style="color: #009100">"Attr2 Attr1"</span>/>
</pre> 
                                                                </div>
                                                            </div>
                                                        </li> 
                                                    </ul> 
                                                </li> 
                                                <li>
                                                    In Scott's case we can warn if we meet an old style <Dependency> for a Data Connector because this has better syntax (this will be noisy, but fixable, potentially with sourceID='*')
                                                </li> 
                                            </ul> 
                                            <p style="margin: 10px 0 0 0">That's about it, although I note that as I write this I haven't faithfully followed Scott's intention, I have ended up making this less ambiguous. This can be made bckwards compatible and now I have it swapped in it is achievable for 3.4 if we want it. Let's discuss on Friday week.</p> 
                                            <p style="margin: 10px 0 0 0">Footnote<img class="emoticon" src="cid:jira-generated-image-static-star_yellow-fe770a4b-cd94-4187-8847-b9a29adcb0b8" height="16" width="16" align="absmiddle" alt="" border="0" /> In a misconfigured case (a data connector depending on itself) we'd spot the error, but it might introduce a circularity. It is unlear to me whether this would be GC-able, so maybe I'd just leave it as being a String and doing the lookup.</p> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td class="email-content-main mobile-expand " style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #fff"> 
                                <table id="actions-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> 
                                    <tr> 
                                        <td id="actions-pattern-container" valign="middle" style="padding: 0px; border-collapse: collapse; padding: 10px 0 10px 24px; vertical-align: middle; padding-left: 0"> 
                                            <table align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                                <tr> 
                                                    <td class="actions-pattern-action-icon-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0px; vertical-align: middle"> <a href="https://issues.shibboleth.net/jira/browse/IDP-680#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none"> <img class="actions-pattern-action-icon-image" src="cid:jira-generated-image-static-comment-icon-4ed8b6a2-4856-496a-9c6d-018b4e795f04" alt="Add Comment" title="Add Comment" height="16" width="16" border="0" style="vertical-align: middle" /> </a> 
                                                    </td> 
                                                    <td class="actions-pattern-action-text-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px"> <a href="https://issues.shibboleth.net/jira/browse/IDP-680#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none">Add Comment</a> 
                                                    </td> 
                                                </tr> 
                                            </table> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </td> 
                        </tr> 
                        <!-- there needs to be content in the cell for it to render in some clients --> 
                        <tr> 
                            <td class="email-content-rounded-bottom mobile-expand" style="padding: 0px; border-collapse: collapse; color: #fff; padding: 0 15px 0 16px; height: 5px; line-height: 5px; background-color: #fff; border-top: 0; border-left: 1px solid #ccc; border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; mso-line-height-rule: exactly">
                                 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
            <tr> 
                <td id="footer-pattern" style="padding: 0px; border-collapse: collapse; padding: 12px 20px"> 
                    <table id="footer-pattern-container" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                        <tr> 
                            <td id="footer-pattern-text" class="mobile-resize-text" width="100%" style="padding: 0px; border-collapse: collapse; color: #999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px">
                                 This message was sent by Atlassian JIRA <span id="footer-build-information">(v7.0.10#70120-<span title="37e3d7a6fc4d580639533e7f7c232c925e554a6a" data-commit-id="37e3d7a6fc4d580639533e7f7c232c925e554a6a}">sha1:37e3d7a</span>)</span> 
                            </td> 
                            <td id="footer-pattern-logo-desktop-container" valign="top" style="padding: 0px; border-collapse: collapse; padding-left: 20px; vertical-align: top"> 
                                <table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                    <tr> 
                                        <td id="footer-pattern-logo-desktop-padding" style="padding: 0px; border-collapse: collapse; padding-top: 3px"> <img id="footer-pattern-logo-desktop" src="cid:jira-generated-image-static-footer-desktop-logo-0f31cf5b-8cd4-46be-8266-bb6dc9f4ee1b" alt="Atlassian logo" title="Atlassian logo" width="169" height="36" class="image_fix" /> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
        </table>   
    </body>
</html>