<?xml version="1.0"?>
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="picketlink25"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
    <metadata>
        <description>
            This ruleset provides analysis of applications that Picketlink STS and may require
            individual attention when migrating to JBoss EAP 7.2.
        </description>
        <dependencies>
            <addon id="org.jboss.windup.rules,windup-rules-javaee,3.0.0.Final" />
            <addon id="org.jboss.windup.rules,windup-rules-java,3.0.0.Final" />
        </dependencies>
        <sourceTechnology id="eap" versionRange="(,7.1]" />
        <targetTechnology id="eap" versionRange="[7,8)" />
        <tag>picketlink</tag>
    </metadata>
    <rules>
        <rule id="picketlink25-00000">
            <when>
                <javaclass references="org.picketlink.identity.federation.api.wstrust.WSTrustClient.issueToken{*}">
                    <location>METHOD_CALL</location>
                </javaclass>
            </when>
            <perform>
                <hint title="Picketlink STS token format change" effort="1" category-id="mandatory">
                    <message>
                        JBoss EAP 7.2 PicketLink STS issues tokens with a different format, which may require changes in applications such as EJB clients.  
                        Please refer to the JBoss EAP 7.2 Migration Guide section with respect to this migration issue, and how to resolve it.
                    </message>
                    <link href="https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.2/html/migration_guide/application_migration_changes#migrate_ejb_client_code_to_eap_72" title="JBoss EAP 7.2 Migration Guide"/>
                    <tag>picketlink</tag>
                </hint>
            </perform>
        </rule>
    </rules>
</ruleset>
