Running the Dynamic Client Registration Conformance Suite for UK

This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Running the Dynamic Client Registration Conformance Suite for UK

WSO2 Open Banking 2.0.0 supports Dynamic Client Registration Conformance suite v1.3.0. 

The Dynamic Client Registration (DCR) conformance certificate provided by Open Banking Implementation Entity (OBIE) verifies that all the DCR-specific functionalities allowed by an open banking solution are as per the guidelines defined by the OBIE specification.

Prerequisites:

  1. Install Docker in your environment.

  2. Download the following components of the WSO2 Open Banking solution:

    1. wso2-obiam-2.0.0.zip (WSO2 Open Banking Identity and Access Management)

    2. wso2-obam-2.0.0.zip (WSO2 Open Banking API Management)

       

  3. Setup the WSO2 Open Banking solution using the instructions given in the following documents:

    1. Configuring Databases for UK

    2. Configuring Open Banking Identity and Access Management for UK

    3. Configuring Open Banking API Management for UK

  4. Configure DCR in the WSO2 Open Banking solution. See Dynamic Client Registration v3.2 for instructions.

This document provides instructions on the following topics:

Configuring the solution to support the DCR Conformance Suite tool

Stop the WSO2 OB IAM and WSO2 OB APIM servers before applying the below changes.

 

  1. Open <WSO2_OB_APIM>/repository/deployment/server/synapse-configs/default/api/_DyanmicClientRegistrationAPI.xml and the following property after the <insequence> tag in both scenarios as follows:

    <resource methods="POST" url-mapping="/register" faultSequence="fault"> <inSequence> <property name="ContentType" value=" application/jwt" scope="axis2"/> <resource methods="DELETE PUT GET" uri-template="/register/{ClientId}" faultSequence="fault"> <inSequence> <property name="ContentType" value=" application/jwt" scope="axis2"/>
  2. Open <WSO2_OB_APIM>/repository/conf/axis2/axis2.xml and add the following <messageFormatters> and <messageBuilders> respectively:

    • messageFormatters:

      <messageFormatters> <!-- Message formatter to support the application/jose content-type for DCR --> <messageFormatter contentType="application/jose" class="org.apache.axis2.format.PlainTextFormatter"/>
    • messageBuilders:

      <messageBuilders> <!-- Message Builder to support the application/jose content-type for DCR --> <messageBuilder contentType="application/jose" class="org.apache.axis2.format.PlainTextBuilder"/>
  3. Restart the WSO2 OB IAM and WSO2 OB APIM servers.

well-known endpoint configuration

Follow the instruction given below:

  1. Stop the WSO2 OB IAM server.

  2. Download and extract the well-known-config-resources.zip.

  3. Copy servlet-1.0-SNAPSHOT.jar in to the <WSO2_OB_IAM_HOME>/repository/components/lib directory.

  4. Copy openid-configuration.json file in to the <WSO2_OB_IAM_HOME>/repository/conf/identity directory. Update the values in openid-configuration.json file according to your requirement.

  5. Register the servlet in <WSO2_OB_IAM_HOME>/repository/conf/tomcat/web.xml file by adding the following elements before the </webapp> tag.

    <servlet> <servlet-name>Discovery</servlet-name> <servlet-class>myPackage.Discovery</servlet-class> </servlet>
    <servlet-mapping> <servlet-name>Discovery</servlet-name> <url-pattern>/oidcdiscovery/.well-known/openid-configuration</url-pattern> </servlet-mapping>
  6. Restart the WSO2 OB IAM server. Go to the following link and see the changes.

    https://<WSO2_OB_IAM_HOST>:8243/.well-known/openid-configuration

Configuring the config.json file

Once you complete the well-known endpoint configuration, change the field values in the config.json file.  A sample config.json is given below:

{ "wellknown_endpoint": <well-known endpoint>, "ssa": <Software Statement Assertion>, "kid": <CERTIFICATE_FINGERPRINT>, "aud": <This is the audience that the ID token is intended for. For example, https://<WSO2_OB_IAM_HOST>:8243/token>, "redirect_uris": ["redirecturi"], "issuer": <SOftwareID>, "private_key": <PrivateKey>, "transport_root_cas": ["cert 1", "cert 2"], "transport_cert": <TransportCertificate>, "transport_key": <TransportKey>, "get_implemented": true, "put_implemented": true, "delete_implemented": true }

Running the DCR Conformance Suite

When running the commands, change <CONFIG_FILE> to the path where you place the config.json mentioned above.

  1. Open a terminal and run the following command to run the complete test suite:

    docker run --rm -it -v <CONFIG_FILE>:/config.json openbanking/conformance-dcr:[TAG] -config-path=/config.json
  2. If you want to run the test suite in the debug mode, run the following command with the -debug flag:

    docker run --rm -it -v <CONFIG_FILE>:/config.json openbanking/conformance-dcr:[TAG] -config-path=/config.json -debug
  3. If you want to run a test case separately, run the following command with the    -filter <test-id> flag:

    docker run --rm -it -v <CONFIG_FILE>:/config.json openbanking/conformance-dcr:[TAG] -config-path=/config.json -filter <test-id>
  4. You can generate a DCR Conformance test report using the following command:

    docker run -p 8080:<PORT> — rm -it -v <CONFIG_FILE>:/config.json openbanking/conformance-dcr -config-path=/config.json -report

     

    Once you run the above command, you can download the report from https://0.0.0.0:8080