ukf / ukf-testbed

UK federation tooling testbed
Apache License 2.0
1 stars 1 forks source link

Remove Xalan URLCheck import from excluded rulesets #58

Closed philsmart closed 2 months ago

philsmart commented 4 months ago

We have been excluding the check_saml2meta.xsl and check_mdui.xsl rulesets because they contain the URLChecker which requires Xalan. The 0.10.0 branch in ukf-meta (239) removes the URLChecker from those XSL files, leaving the other tests. I will copy those versions over to the testbed so we can make progress on testing everything other than checks which require the URLChecker.

philsmart commented 4 months ago

We are going to redo this change. Roughly:

  1. Split check_mdui into 5 stages. The existing 3 XSLT stages, and 2 new stages that come from adding the URL checking beans. Comment out the 2 new stages, as for now we can not conditionally run stages, and so 2 of the validators would fail.
  2. Split check_saml2meta into a composite stage composed of 3 stages. The existing XSLT stage, and 2 new stages that come from adding the URL checking beans. Again, comment out the 2 new stages, otherwise 2 of the validators would fail.
  3. Ian is going to look at conditionally running stages on the testbed, if that works, we can uncomment and use the new bean based stages from the non-xylan branches, and the XSLT extensions on the Xalan branches.
    1. Looks like Ian already has a plan for that, see #78
philsmart commented 4 months ago

Note. The 9x (Xalan) branch is using the extra libs: serializer-2.11.0.jar, xalan-2.7.1.jar, ukf-mda-0.9.12, inc-mda-0.9.1.jar. The 9 (non-xalan) branch is using the extra libs: ukf-mda-0.9.12, inc-mda-0.9.1.jar.

philsmart commented 4 months ago

For check_saml2meta, the following beans are used on the 0.10 branch:

<ref bean="check_saml2meta"/>
<!-- below are new URL checking beans -->
<ref bean="check_saml2meta_urlattrs"/>
<ref bean="check_saml2meta_urls"/>
philsmart commented 4 months ago

For check_mdui, the following beans are used on the 0.10 branch:

The composite bean check_mdui will need to be overriden on the 0.10 branch with these.

iay commented 4 months ago

To expand on the conversation we had a couple of days ago, on the 0.10/239 branch I have the following in:

                <ref bean="check_saml2meta"/>
                <ref bean="check_saml2meta_urlattrs"/>
                <ref bean="check_saml2meta_urls"/>

However, I think it would be better to rename the (cut down) XSL test as something like check_saml2meta_xsl and wrap those three in a composite stage. That will change the component IDs in the results (but see below) but we have a way of dealing with that now.

I'll note that the id property of a component is what dictates its component ID for purposes of reporting in errors. That's normally defaulted (by a bean factory post processor) to be the same as the Spring name for the bean. However, you can set it independently if you want to create other effects. For example, in the nested validator case I've done this in the new validate_url: <bean id="validate_url" p:id="url" parent="mda.AsURLStringValidator"> where the Spring ID for the bean is validate_url but the reported component ID is url. That will be decorated with the name of the calling stage to build a composite component ID.

One effect of this is that if we want, we can change the id of the bean from check_saml2int to check_saml2int_xsl but explicitly set its p:id so that the results don't change. Whether this is a good idea or not is probably worth a discussion.