<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chandima Jayawickrama on Medium]]></title>
        <description><![CDATA[Stories by Chandima Jayawickrama on Medium]]></description>
        <link>https://medium.com/@erandanijayawickrama13.ej?source=rss-94cc60d98d7d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LPzFnDyDRtCAMbB9I9igdg.jpeg</url>
            <title>Stories by Chandima Jayawickrama on Medium</title>
            <link>https://medium.com/@erandanijayawickrama13.ej?source=rss-94cc60d98d7d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 22:28:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@erandanijayawickrama13.ej/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Run Eclipse Memory Analyzer (MAT) on Apple M2 Sequoia — Easy Setup Guide]]></title>
            <link>https://medium.com/@erandanijayawickrama13.ej/run-eclipse-memory-analyzer-mat-on-apple-m2-sequoia-easy-setup-guide-31e95807b402?source=rss-94cc60d98d7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/31e95807b402</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[macos-sequoia]]></category>
            <category><![CDATA[heapdump]]></category>
            <category><![CDATA[eclipse-mat]]></category>
            <category><![CDATA[apple-m2]]></category>
            <dc:creator><![CDATA[Chandima Jayawickrama]]></dc:creator>
            <pubDate>Thu, 11 Dec 2025 04:56:47 GMT</pubDate>
            <atom:updated>2025-12-11T04:56:47.778Z</atom:updated>
            <content:encoded><![CDATA[<h3>Run Eclipse Memory Analyzer (MAT) on Apple M2 Sequoia — Easy Setup Guide</h3><p>If you’re a Java developer or DevOps engineer, analyzing memory issues in your applications is crucial. <strong>Eclipse Memory Analyzer (MAT)</strong> is one of the most powerful tools for this purpose.</p><p>On macOS MAT sometimes fails to start due to JVM issues. In this guide, I’ll show you exactly how to install, configure, and run MAT on an Apple M2 Pro.</p><h3>Step 1: Download the Correct MAT Build</h3><p>Download the <strong>ARM64 macOS build</strong>:</p><p><a href="https://www.eclipse.org/downloads/download.php?file=/mat/1.16.1/rcp/MemoryAnalyzer-1.16.1.20250109-macosx.cocoa.aarch64.dmg">MemoryAnalyzer-1.16.1.20250109-macosx.cocoa.aarch64.dmg</a></p><p>⚠️ Make sure you download the `aarch64` build for Apple Silicon. The x86 build will not work natively.</p><p>⚠️ Sometimes, the version 1.16.1 might not work in your machine. You can try using a lower version(MemoryAnalyzer-1.15.0.20231206-macosx.cocoa.aarch64.dmg) instead.</p><p>Install it like any other macOS application.</p><h3>Step 2: Update MemoryAnalyzer.ini</h3><p>After installation, try to open the MAT application, and you will probably observe it crashes. MAT requires a <strong>Java 17 JDK</strong> or higher versions, so we need to configure the JVM manually. To specify the exact Java Virtual Machine (JVM) that Eclipse or MAT should use, update the <strong>-vm</strong> in the <strong>MemoryAnalyzer.ini</strong> file.</p><p>So,</p><ul><li>Go to <strong>Applications &gt; MemoryAnalyzer &gt; Show Package Contents</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LVEmI4mybGByDIpctY2dcw.png" /></figure><ul><li>Open the<br><strong>/Applications/MemoryAnalyzer.app/Contents/Eclipse/MemoryAnalyzer.ini</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q1H-Ajvx-_MhZCBz35PKHA.png" /></figure><p>If <strong>-vm</strong> is not available, add it. If available modify it.</p><pre>-vm<br>/Users/chandimajayawickrama/Documents/JDK/zulu17.56.15-ca-jdk17.0.14-macosx_aarch64/zulu-17.jdk/Contents/Home/bin/java</pre><p>Optionally, it is recommended to set a custom workspace:</p><pre>-data<br>/Users/chandimajayawickrama/Downloads/mat_workspace</pre><p>Also, if your heap dump is largers, you might need to increase heap size. The heap size should be slightly larger than the largest heap dump you plan to open.</p><pre>-Xmx10g</pre><p>So updated the <strong>MemoryAnalyzer.ini </strong>should look like this.</p><pre>-vm<br>/Users/chandimajayawickrama/Documents/JDK/zulu17.56.15-ca-jdk17.0.14-macosx_aarch64/zulu-17.jdk/Contents/Home/bin/java<br>-startup<br>../Eclipse/plugins/org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar<br>--launcher.library<br>../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.aarch64_1.2.1100.v20240722-2106<br>-vmargs<br>--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED<br>-Xmx10g<br>-Dorg.eclipse.swt.internal.carbon.smallFonts<br>-XstartOnFirstThread</pre><h3>Step 4: Launch Memory Analyzer</h3><p>Then, you can go to Applications and open the MemoryAnalyzer app.</p><p><em>Optionally</em>, you can run the MemoryAnalyzer via the terminal</p><pre>cd /Applications/MemoryAnalyzer.app/Contents/MacOS<br>./MemoryAnalyzer</pre><p>Running from the terminal ensures MAT uses the correct JVM.</p><p>Now, you should now see MAT start successfully without errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hPB9PjB8L18n1CxqkxySfg.png" /></figure><p>Hope this helps if you are stuck in using MAT in macos Sequoia. ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31e95807b402" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enable additional logging in WSO2 Micro Gateway(MGW)]]></title>
            <link>https://medium.com/@erandanijayawickrama13.ej/enable-additional-logging-in-wso2-micro-gateway-mgw-9250f249bf1d?source=rss-94cc60d98d7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9250f249bf1d</guid>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[wso2-microgateway]]></category>
            <category><![CDATA[debug]]></category>
            <category><![CDATA[microgateway]]></category>
            <dc:creator><![CDATA[Chandima Jayawickrama]]></dc:creator>
            <pubDate>Sat, 03 Feb 2024 14:46:03 GMT</pubDate>
            <atom:updated>2024-02-14T05:03:33.078Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever come across a requirement to enable the additional logs in WSO2 MGW for troubleshooting purposes and got stuck in the middle of the process cause you couldn’t find the correct configuration you need to do?</p><p>Well, you have come to the right place. I will show you how you can simply enable some additional logs in WSO2 MGW, which might help you troubleshoot an issue in the MGW the next time you are stuck. ;) <em>(oh.. btw, I tried these in WSO2 MGW 3.2.0)</em></p><p>All the below mentioned configurations are done in the <strong>&lt;MGW-RUNTIME-HOME&gt;/conf/micro-gw.conf.</strong></p><h3>Enable DEBUG logs.</h3><p><strong><em>Sample logs</em></strong></p><pre>2024–02–03 18:23:46,271 DEBUG [wso2/gateway/src/gateway/utils] - [APIKeyUtil] [5bffac70–57a2–4de9–99f5-bf8f02faf544] Subscriptions validated.<br>2024–02–03 18:23:46,271 DEBUG [wso2/gateway/src/gateway/utils] - [AuthzFilter] [5bffac70–57a2–4de9–99f5-bf8f02faf544] Processing request via Authorization filter.</pre><p>If you want to enable logs in <strong>DEBUG</strong> mode, then make the log level as DEBUG as shown below. If you want to change the log level<em>( ERROR, WARN etc) </em>, you just have to change the log level in the below configuration.</p><pre>[b7a.log]<br> level = &quot;DEBUG&quot;</pre><h3>Enable TRACE logs.</h3><p>When you enable TRACE logs, a log line as below will be shown at the server startup.</p><pre>ballerina: HTTP trace log enabled</pre><p><strong><em>Sample logs</em></strong></p><pre>[2024–02–03 18:22:11,907] TRACE {http.tracelog.upstream} - [id: 0x36e4159c, L:/192.168.1.49:57161 - R:petstore3.swagger.io/3.226.108.162:443] OUTBOUND SETTINGS: ack=false settings={MAX_HEADER_LIST_SIZE=8192}<br>[2024–02–03 18:22:11,928] TRACE {http.tracelog.upstream} - [id: 0x36e4159c, L:/192.168.1.49:57161 - R:petstore3.swagger.io/3.226.108.162:443] INBOUND SETTINGS: ack=false settings={MAX_CONCURRENT_STREAMS=128, INITIAL_WINDOW_SIZE=65536, MAX_FRAME_SIZE=16777215}</pre><p>TRACE logs are logs similar to the wire logs in the WSO2 default GW.[1] They allow you to read the request and response parameters like the payload, headers etc.</p><p>To enable TRACE logs in the console add the below configuration.</p><pre>[b7a.http.tracelog]<br> console = true</pre><p>Now, if you want to persist these logs into a file but not need to be shown in the console, here’s how you do it.</p><pre>[b7a.http.tracelog]<br> path=&quot;/Users/macuser/Documents/micro-gw/trace.log&quot;</pre><p>If you want to print the logs in the console <strong>&amp;</strong> write to a file, then following is the configuration you need.</p><pre>[b7a.http.tracelog]<br> console = true<br> path=&quot;/Users/macuser/Documents/micro-gw/trace.log&quot;</pre><h3>Enable http access logs.</h3><p>When you enable the http access logs a log line similar to below will be printed in the console at server startup.</p><pre>ballerina: HTTP access log enabled</pre><p><strong><em>Sample logs</em></strong></p><pre>127.0.0.1 - - [03/Feb/2024:18:23:46 +0530] &quot;GET /api/v3/pet/findByStatus?status=available HTTP/2.0&quot; 200 588 &quot;-&quot; &quot;ballerina&quot;</pre><p>If it is a production environment, enabling TRACE or DEBUG logs will not be the best idea. Why? Well, it will eventually cause unnecessary log growth which will cause you to put additional effort in managing the logs.</p><p>http access logs will show you whether a request is reached by the MGW or not.</p><p>If you want the access logs to be printed in the console, you can use the below configuration.</p><pre>[b7a.http.accesslog]<br> console = true</pre><p>If you want the access logs to be persisted in a file, you can use the below configuration.</p><pre>[b7a.http.accesslog]<br> path=&quot;/Users/macuser/Documents/micro-gw/access.log&quot;</pre><p>If you want to see the logs in both console &amp; persisted in a file, then use the below configuration.</p><pre>[b7a.http.accesslog]<br> console = true<br> path=&quot;/Users/macuser/Documents/micro-gw/access.log&quot;</pre><p>Well, that’s about it. Hope this helps someone in need. :)</p><p>Till next time…</p><p>[1] <a href="https://apim.docs.wso2.com/en/3.2.0/administer/logging-and-monitoring/logging/setting-up-logging/#gateway-wire-logs">https://apim.docs.wso2.com/en/3.2.0/administer/logging-and-monitoring/logging/setting-up-logging/#gateway-wire-logs</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9250f249bf1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Log rabbitmq.message.correlation.id — WSO2 MI]]></title>
            <link>https://medium.com/@erandanijayawickrama13.ej/log-rabbitmq-message-correlation-id-wso2-mi-3d77c6b0157c?source=rss-94cc60d98d7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d77c6b0157c</guid>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[rabbitmq]]></category>
            <category><![CDATA[wso2-mi]]></category>
            <category><![CDATA[correlation-id]]></category>
            <category><![CDATA[sequence]]></category>
            <dc:creator><![CDATA[Chandima Jayawickrama]]></dc:creator>
            <pubDate>Sat, 03 Feb 2024 12:36:14 GMT</pubDate>
            <atom:updated>2024-02-03T12:36:14.524Z</atom:updated>
            <content:encoded><![CDATA[<h3>Log rabbitmq.message.correlation.id — WSO2 MI</h3><p>I once came across a requirement where I needed to identify the correlation id in RabbitMQ to send a correct reply to the reply queue. The correlation ID is required to identify a message that comes through one queue and requires a response back via another queue. This ID helps you map the messages and is unique for every request.[1]</p><p>Here is how I logged the correlation id in RabbitMQ in WSO2 MI</p><blockquote>&lt;log level=”custom”&gt;<br><strong>&lt;property name=”RABBITMQ_CORRELATION_ID” expression=”$trp:rabbitmq.message.correlation.id”/&gt; </strong><br>&lt;/log&gt;</blockquote><p>This was tested in WSO2 MI 4.2.0.</p><h4><strong>Sample logs</strong></h4><blockquote>[2023–12–15 21:25:23,658] INFO {LogMediator} — {proxy:AMQPProxy} To: , WSAction: null, SOAPAction: null, MessageID: urn:uuid:1DC91D88FBCA0AE28C1702655723642, Direction: request, Envelope: &lt;?xml version=’1.0&#39; encoding=’utf-8&#39;?&gt;&lt;soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&lt;soapenv:Body&gt;&lt;test&gt;name&lt;/test&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;<br><strong>[2023–12–15 21:25:23,664] INFO {LogMediator} — {proxy:AMQPProxy} RABBITMQ_CORRELATION_ID = urn:uuid:9c55c400–6f80–475a-ad03–24a54eb77240</strong><br>[2023–12–15 21:25:23,681] DEBUG {headers} — http-outgoing-1 &gt;&gt; POST /services/log-proxy HTTP/1.1<br>[2023–12–15 21:25:23,682] DEBUG {headers} — http-outgoing-1 &gt;&gt; activityid: 92e3feaf-5bae-44e4–9fcb-08ae97c49ee0</blockquote><p>Hope this helps anyone who need to find the rabbitmq correlation id. :)</p><p>[1] <a href="https://ei.docs.wso2.com/en/latest/micro-integrator/references/synapse-properties/transport-parameters/rabbitmq-transport-parameters/#:~:text=rabbitmq.message.correlation.id">https://ei.docs.wso2.com/en/latest/micro-integrator/references/synapse-properties/transport-parameters/rabbitmq-transport-parameters/#:~:text=rabbitmq.message.correlation.id</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d77c6b0157c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Logging WSO2 logs an External Database — Apache Log4j2]]></title>
            <link>https://medium.com/@erandanijayawickrama13.ej/logging-wso2-logs-an-external-database-apache-log4j2-af149a5fda3b?source=rss-94cc60d98d7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/af149a5fda3b</guid>
            <category><![CDATA[log4j2]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[jdbc-appenders]]></category>
            <dc:creator><![CDATA[Chandima Jayawickrama]]></dc:creator>
            <pubDate>Thu, 02 Dec 2021 18:47:08 GMT</pubDate>
            <atom:updated>2021-12-02T18:47:08.381Z</atom:updated>
            <content:encoded><![CDATA[<h3>Logging WSO2 logs an External Database — Apache Log4j2</h3><p>Hello everyone,</p><p>Have you ever come across a requirement where you wanted to log your WSO2 logs to an external database? Well, I have, quite recently and this article unfolds a simple scenario that I have tried out to achieve it.</p><p>In this scenario, I will be logging the WSO2 carbon logs to a <a href="https://www.postgresql.org/">PostgreSQL </a>database using JDBC appender[1]. Just so you know, I am no expert in log4j2 or PostgreSQL. ;)</p><p>So without further ado, let’s get started!!! .</p><p>For you to try out the steps in <em>this</em> article you will need to fulfill the below prerequisites.</p><ul><li>Install <a href="https://docs.docker.com/get-docker/">Docker</a> in your environment. [2]</li><li>Have an up and running WSO2 setup. I have used a <a href="https://docs.wso2.com/display/OB200/Try+Local+Setup">WSO2 OBAM &amp; OBIAM 2.0.0 setup</a>.</li></ul><p>Now that we have completed our prerequisites, let us begin!!!! (I have tried this with both MySQL and PostgreSQL locally. In this article, I will discuss about the steps with PostgreSQL.)</p><ol><li>Setup PostgreSQL in your machine.</li><li>Download and add the relevant JDBC driver jar to <em>&lt;PRODUCT-HOME&gt;/repository/components/lib</em></li><li>Modify the <em>&lt;PRODUCT-HOME&gt;/repository/conf/log4j2.properties</em> file.</li><li>Test a flow and check whether data is persisted in the database.</li></ol><p><strong>1.Setup PostgreSQL in your machine.</strong></p><p>To setup PostgreSQL in my local environment, I have used a PostgreSQL docker image from[2].</p><p>First of all pull the docker image.</p><pre>docker pull postgres</pre><p>Once you have the image, you should be able to find this in the list of images in your local environment if you run the below command.</p><pre>docker images</pre><p>Now that we have our docker image, let us spin up a container from this docker image. To do that, run the below command in your terminal</p><pre>docker run --name &lt;container-name&gt; -e POSTGRES_PASSWORD=&lt;your-password&gt; -d postgres</pre><p>For example;</p><pre>docker run --name some-postgres -e POSTGRES_PASSWORD=p@$$w0rd -d postgres</pre><p>The default username for PostgreSQL will be <em>postgres </em>and the password is the one that you have defined in your above command.</p><p>Now to make sure our container is up and running, we can run the below command.</p><pre>docker ps</pre><p>If it up and running you should see the container as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mMI-UgL-skD-wPC7M9P7Jg.png" /><figcaption>Figure 1: Docker container details</figcaption></figure><p>Now that we have our PostgreSQL database server up and running, let us try to connect to this. I have used <a href="https://www.pgadmin.org/download/">pgAdmin 4</a> to connect to the database locally. Once you enter the correct login details, you should be able to log into your database server.</p><p>Now let us open a <em>Query tool</em> (<em>Tools -&gt; Query Tool</em>) in pgAdmin 4 and create a database. For easiness to proceed in this article, we shall create a database that logs the only the <em>timestamp </em>of the logs, and the <a href="https://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/Level.html"><em>log level</em></a>. Of course, you are free to try out the scenarios as per your requirement.</p><ul><li>Database name: CARBON_LOGS_DB</li></ul><pre>CREATE DATABASE CARBON_LOGS_DB;</pre><ul><li>Database table name: WSO2CARBON_LOGS</li></ul><pre>CREATE TABLE IF NOT EXISTS public.WSO2CARBON_LOGS( date_time timestamp, loglevel varchar(20));</pre><p>Now that we have our databases configured, next step is to change the configurations of the WSO2 servers to enable pushing the logs to this database.</p><p><strong>2. Download and add the relevant JDBC driver jar to <em>&lt;PRODUCT-HOME&gt;/repository/components/lib</em></strong></p><p>You need to download the relevant JDBC driver jar from [3]. Download it and add it the <em>&lt;PRODUCT-HOME&gt;/repository/components/lib. (</em>In this article I am trying to log the logs from OBAM server. Hence I will be adding it to the<strong> </strong><em>&lt;OBAM-HOME&gt;/repository/components/lib.)</em></p><p><strong>3. Modify the <em>&lt;PRODUCT-HOME&gt;/repository/conf/log4j2.properties</em> file.</strong></p><p>Now we need to modify the <em>&lt;PRODUCT-HOME&gt;/repository/conf/log4j2.properties </em>file to enable logging the logs to the database using JDBC appender. So, you will need to add the following configuration in your <em>&lt;PRODUCT-HOME&gt;/repository/conf/log4j2.properties. ( </em>Here, I will be adding this to the <em>&lt;OBAM-HOME&gt;/repository/conf/log4j2.properties.) </em>You van refer to [4] for more understanding of the parameters.</p><pre>appender.db.type = JDBC<br>appender.db.name = db<br>appender.db.connectionSource.type= DriverManager<br>appender.db.connectionSource.connectionString = jdbc:postgresql://localhost:5432/carbon_logs_db <em>#This should be the connection URL in your environment</em><br>appender.db.connectionSource.username = postgres <em>#This value should be the database user you set</em><br>appender.db.connectionSource.password = pa$$w0rd <em>#This value should be the password you set</em><br>appender.db.connectionSource.driverClassName = org.postgresql.Driver<br>appender.db.tableName = wso2carbon_logs <em>#This value should be the table name you configured</em><br>appender.db.filter.threshold.type = ThresholdFilter<br>appender.db.filter.threshold.level = DEBUG</pre><pre>appender.db.columnConfigs[0].type = Column<br>appender.db.columnConfigs[0].name = date_time<br>appender.db.columnConfigs[0].isEventTimestamp= true<br>appender.db.columnConfigs[0].isUnicode =false</pre><pre>appender.db.columnConfigs[1].type = Column<br>appender.db.columnConfigs[1].name = loglevel<br>appender.db.columnConfigs[1].pattern = %level<br>appender.db.columnConfigs[1].isUnicode =false</pre><pre>rootLogger.appenderRefs = database<br>rootLogger.appenderRef.database.ref = db</pre><p>Then you need to add the <em>appender </em>in the <em>appenders </em>section in the <em>log4j2.propertie</em>s file. In our example, the value is <em>db</em>.</p><pre>appenders=CARBON_CONSOLE, CARBON_LOGFILE, AUDIT_LOGFILE,……, <strong>db</strong></pre><p>Now that we have done all the configurations and setting up, we can test out a flow and see whether the log data are persisted in the database.</p><p><strong>4. Test a flow and check whether data is persisted in the database.</strong></p><p>I am running a <em>/token</em> call &amp; below is the result I get in my database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2FG3MOnnPSjOBitl0B5ZJg.png" /><figcaption>Figure 2: Logs in the database</figcaption></figure><p>If you have reached up to here, you have successfully configured logging WSO2 logs to an external database… So that’s it for this article. I hope this will be helpful for you.</p><p>Any problems trying out the steps in this article? Do let me in the comments…</p><p>[1] <a href="https://logging.apache.org/log4j/2.0/manual/appenders.html#JDBCAppender">https://logging.apache.org/log4j/2.0/manual/appenders.html#JDBCAppender</a></p><p>[2] <a href="https://www.docker.com/products/docker-desktop">https://www.docker.com/products/docker-desktop</a></p><p>[3] <a href="https://jdbc.postgresql.org/download.html">https://jdbc.postgresql.org/download.html</a></p><p>[4] <a href="https://logging.apache.org/log4j/2.x/manual/appenders.html#JDBCAppender">https://logging.apache.org/log4j/2.x/manual/appenders.html#JDBCAppender</a></p><p>[5] <a href="https://hub.docker.com/_/postgres">https://hub.docker.com/_/postgres</a></p><p>[6] <a href="https://www.postgresql.org/docs/9.1/datatype-datetime.html">https://www.postgresql.org/docs/9.1/datatype-datetime.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af149a5fda3b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WSO2 Open Banking with Oracle]]></title>
            <link>https://medium.com/@erandanijayawickrama13.ej/wso2-open-banking-with-oracle-f6e866e1beff?source=rss-94cc60d98d7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6e866e1beff</guid>
            <category><![CDATA[open-banking]]></category>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[wso2]]></category>
            <dc:creator><![CDATA[Chandima Jayawickrama]]></dc:creator>
            <pubDate>Sun, 19 Apr 2020 15:14:40 GMT</pubDate>
            <atom:updated>2020-04-19T16:44:15.852Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*4HC_rzpXvU9l99fO2LZe5w.jpeg" /></figure><p>WSO2 Open Banking (OB) solution is compatible with popular DBMS like MySQL, MSSQL or Oracle[1]. Setting up MySQL or MSSQL is pretty straight forward &amp; easy. When I tried to setup the WSO2 OB solution with Oracle, I had to read many articles to get an understanding on how to use Oracle databases, which is kinda exhausting.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Ffragrantadmiredindusriverdolphin&amp;display_name=Gfycat&amp;url=https%3A%2F%2Fgfycat.com%2Ffragrantadmiredindusriverdolphin&amp;image=https%3A%2F%2Fthumbs.gfycat.com%2FFragrantAdmiredIndusriverdolphin-size_restricted.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=gfycat" width="364" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c4b9526378c7da97b4a8fbb9b0c2447/href">https://medium.com/media/5c4b9526378c7da97b4a8fbb9b0c2447/href</a></iframe><p>If you are in a hurry to try out the OB solution with Oracle, going through many articles &amp; finding answers may not be the best at the time. So I thought to write this article with what I’ve tried in my local setup hoping it would shed some light on people who are new to Oracle &amp; WSO2 Open Banking 😃</p><p>To follow up <strong>this</strong> article you will need;</p><ul><li>Docker installed in your environment</li><li>WSO2 OBAM &amp; OBKM fresh packs</li><li>A database administration tool (This is not an essential, but it makes your life easier 😉 I will be using <a href="https://dbeaver.com/">DBeaver</a> which is a pretty user friendly tool)</li></ul><p>I have setup WSO2 OB 1.4.0 for UK spec in the following environment.</p><ul><li>Oracle version 12c on a docker container</li><li>Operating System: macOS 10.15.4</li><li>Docker version 18.09.2</li></ul><p>Basically you have following two options for creating schemas.</p><p><strong>Option 1:</strong> Create a single schema &amp; create all the tables related with the WSO2 OB solution in that schema.</p><p><strong>Option 2:</strong> Create seperate schemas for each database (l<em>ike openbank_apimgtdb, openbank_apimgt_statsdb, openbank_openbankingdb etc</em>) &amp; create your database tables in corresponding schema.</p><p>I will be trying out both approaches in this article. But, you are totally free to choose whatever option you like.</p><p><strong>Setting up a Oracle server using a Docker image in the local environment</strong></p><p>First, you will need to have docker installed in your local machine. To install docker in mac you can follow [2]. After successful installation, launch Docker &amp; sign in with your docker credentials. (If you don’t have an account in docker, you can create an account in <a href="https://www.docker.com/">docker official website</a>)</p><p>I have followed [4] to get my docker image. There are lot of docker images for oracle in the docker official website. You are free to choose whatever image you want of the supported oracle versions.</p><p>To pull the docker image run the following command.</p><pre>docker pull truevoly/oracle-12c</pre><p>Then to spin up the docker container;</p><pre>docker run -d -p 8080:8080 -p 1521:1521 truevoly/oracle-12c</pre><p><strong>Connecting to the Oracle database server from DBeaver</strong></p><p>Open DBeaver &amp; connect to the oracle server. If you have used the same docker image that I have used, your credentials will be as follows. If not, you will need to find the corresponding credentials for the docker image you choose.</p><ul><li>Host: localhost</li><li>Port: 1521</li><li>SID: xe</li><li>Username: system</li><li>Password: oracle</li></ul><p><a href="https://drive.google.com/file/d/1muWv931uMPE_1wfxfATSMdNSVYcZD90j/view?usp=sharing">connect_using_dbeaver.mov</a></p><p><strong>Option 1: Creating a single schema</strong></p><p>Open a SQL editor in the DBeaver &amp; execute the following statement to create a schema.</p><pre>CREATE USER SCHEMA_NAME IDENTIFIED BY PASSWORD;<br>Ex: CREATE USER test_wso2openbank IDENTIFIED BY wso2123;</pre><p>By default this created user/schema has no privileges. So you will need to provide the necessary privileges like CREATE, UPDATE, DELETE, SELECT. Remember, you don’t need to provide all the privileges to a user ONLY the required privileges required for that user.</p><p>To grant the privilge to create tables for this schema,</p><pre>GRANT CREATE TABLE TO test_wso2openbank;</pre><p>This will ONLY allow you to create tables, indexes &amp; constraints on them, but you CANNOT insert data. You will encounter errors while inserting data. To avoid this you will need to give your user (in this case<em> “test_wso2openbank”</em>) a tablespace quota with following statement;</p><pre>ALTER USER test_wso2openbank QUOTA UNLIMITED ON USERS;</pre><p>To enable SELECT, INSERT &amp; DELETE on tables of the schema;</p><pre>GRANT SELECT ANY TABLE TO test_wso2openbank;<br>GRANT INSERT ANY TABLE TO test_wso2openbank;<br>GRANT DELETE ANY TABLE TO test_wso2openbank;</pre><p>For the servers to be able to connect to the database you should grant SESSION privilges for the user as follows.</p><pre>GRANT CREATE SESSION TO test_wso2openbank;</pre><p>To create database triggers for this schema;</p><pre>GRANT CREATE ANY TRIGGER TO test_wso2openbank;</pre><p>To create sequences in your schema;</p><pre>GRANT CREATE SEQUENCE TO test_wso2openbank;</pre><p>That is basically what you need to configure in your databases. If we summarize the statements you executed so far, you should get something like below.</p><pre>CREATE USER test_wso2openbank IDENTIFIED BY wso2123;<br>GRANT CREATE TABLE TO test_wso2openbank;<br>ALTER USER test_wso2openbank QUOTA UNLIMITED ON USERS;<br>GRANT SELECT ANY TABLE TO test_wso2openbank;<br>GRANT INSERT ANY TABLE TO test_wso2openbank;<br>GRANT DELETE ANY TABLE TO test_wso2openbank;<br>GRANT CREATE SESSION TO test_wso2openbank;<br>GRANT CREATE ANY TRIGGER TO test_wso2openbank;<br>GRANT CREATE SEQUENCE TO test_wso2openbank;</pre><p>Now you will need to change your <strong>&lt;PRODUCT_HOME&gt;/repository/conf/datasources/master-datasources.xml</strong> &amp; <strong>&lt;PRODUCT_HOME&gt;/repository/conf/datasources/open-banking-datasources.xml </strong>files of both WSO2 OBKM &amp; OBAM servers to use schemas we just created. Remember, you need to change the datasource configuration for all the datasources except WSO2_CARBON_DB. You can keep the WSO2_CARBON_DB as it is. A datasource config should look as follows. You can refer to the sample <a href="https://drive.google.com/file/d/1a1IrsDTMO-xfKpErFEcsHVtP5rpFnyJi/view?usp=sharing"><em>master-datasources.xml</em></a> &amp; <a href="https://drive.google.com/file/d/1c2cG_arz9SMDEQfFuvgCEv6X2lKnCuio/view?usp=sharing"><em>open-banking-datasources.xml</em></a><em> for WSO2_OBKM </em>to get an idea<em>.</em></p><pre>&lt;datasource&gt;<br>&lt;name&gt;WSO2AM_DB&lt;/name&gt;<br>&lt;description&gt;The datasource used for API Manager database&lt;/description&gt;<br>&lt;jndiConfig&gt;<br>&lt;name&gt;jdbc/WSO2AM_DB&lt;/name&gt;<br>&lt;/jndiConfig&gt;<br>&lt;definition type=&quot;RDBMS&quot;&gt;<br>&lt;configuration&gt;<br><strong>&lt;url&gt;jdbc:oracle:thin:test_wso2openbank@localhost:1521/xe&lt;/url&gt;<br>&lt;username&gt;test_wso2openbank&lt;/username&gt;<br>&lt;password&gt;wso2123&lt;/password&gt;<br>&lt;driverClassName&gt;oracle.jdbc.driver.OracleDriver&lt;/driverClassName&gt;</strong>&lt;maxActive&gt;150&lt;/maxActive&gt;<br>&lt;maxWait&gt;60000&lt;/maxWait&gt;<br>&lt;testOnBorrow&gt;true&lt;/testOnBorrow&gt;<br><strong>&lt;!--Use below for oracle--&gt;<br>&lt;validationQuery&gt;SELECT 1 FROM DUAL&lt;/validationQuery&gt;</strong><br>&lt;validationInterval&gt;30000&lt;/validationInterval&gt;<br>&lt;defaultAutoCommit&gt;false&lt;/defaultAutoCommit&gt;<br>&lt;/configuration&gt;<br>&lt;/definition&gt;<br>&lt;/datasource&gt;</pre><p><strong>Option 2: Creating seperate schemas</strong></p><p>Here what you need to do is to repeat the above db queries for all the schemas. You can refer to the <a href="https://docs.google.com/document/d/14A69CvU4kx_6F5wqdte8OGLivjbxJgW3XGyU2rH9z6M/edit?usp=sharing">sample script</a> I used.</p><p>In this option there is only a slight change in the datasource configuration. Earlier we configured the <strong>same username &amp; password</strong> for <strong>all</strong> the datasource configurations. Here, since we are using separate schemas to denote each database, you need to <strong>configure the username &amp; password with the relevant schema name &amp; password</strong>. <strong>Also, the &lt;url&gt; of the datasource should contain the corresponding schema name. </strong>You can refer to the sample <a href="https://drive.google.com/file/d/13ik31U8u0gGhu_VXNYCf1vF9m7hJnK1J/view?usp=sharing"><em>master-datasources.xml</em></a> &amp; <a href="https://drive.google.com/file/d/1EzZqDPoJzzLMdjpt1U1VU0TsK1-zAEw7/view?usp=sharing"><em>open-banking-datasources.xml</em></a><em> for WSO2_OBKM </em>to get an idea<em>.</em></p><pre><strong>&lt;url&gt;jdbc:oracle:thin:&lt;SCHEMA_NAME&gt;@localhost:1521/xe&lt;/url&gt;<br>&lt;username&gt;SCHEMA_NAME&lt;/username&gt;<br>&lt;password&gt;PASSWORD&lt;/password&gt;</strong></pre><p><strong>Note:</strong> Make sure to add the relevant oracle database drivers for the corresponding oracle version at <strong>&lt;PRODUCT_HOME&gt;/repository/components/lib</strong>. (You can find the <a href="https://drive.google.com/file/d/1cLsLC3Vb3Wq0mDpFwFe3rVOepgIL3nsE/view?usp=sharing">ojdbc7.jar</a> here)</p><p>At this point, you have setup the WSO2 OB solution with Oracle &amp; you can try out the flows as documented in WSO2 Open Banking Try Out guides.</p><p>That’s it for this article. Hope you find this article helpful &amp; undertanding to setup your WSO2 Open Banking setup with Oracle. You have any concerns? Do let me know in the comments.</p><p>Reference</p><p>[1] <a href="https://docs.wso2.com/display/compatibility/Tested+DBMSs">https://docs.wso2.com/display/compatibility/Tested+DBMSs</a></p><p>[2] <a href="https://docs.docker.com/docker-for-mac/install/">https://docs.docker.com/docker-for-mac/install/</a></p><p>[3] <a href="https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/GRANT.html#GUID-20B4E2C0-A7F8-4BC8-A5E8-BE61BDC41AC3">https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/GRANT.html#GUID-20B4E2C0-A7F8-4BC8-A5E8-BE61BDC41AC3</a></p><p>[4] <a href="https://github.com/MaksymBilenko/docker-oracle-12c">https://github.com/MaksymBilenko/docker-oracle-12c</a></p><p>[5] <a href="https://docs.oracle.com/cd/E11882_01/server.112/e10897/install.htm#ADMQS002">https://docs.oracle.com/cd/E11882_01/server.112/e10897/install.htm#ADMQS002</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6e866e1beff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DCR Conformance tool for WSO2 Open Banking]]></title>
            <link>https://medium.com/@erandanijayawickrama13.ej/dcr-conformance-tool-for-wso2-open-banking-e7e910b557e0?source=rss-94cc60d98d7d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7e910b557e0</guid>
            <category><![CDATA[dcr]]></category>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[wso2-ope]]></category>
            <category><![CDATA[conformance]]></category>
            <category><![CDATA[open-banking]]></category>
            <dc:creator><![CDATA[Chandima Jayawickrama]]></dc:creator>
            <pubDate>Sat, 28 Mar 2020 13:52:20 GMT</pubDate>
            <atom:updated>2020-03-30T07:19:23.523Z</atom:updated>
            <content:encoded><![CDATA[<h3>DCR Conformance Tool for WSO2 Open Banking</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b7AVnmlb7OcU-kiKPsonHA.png" /><figcaption>Figure 1: Dynamic Client Registration [Source: <a href="https://www.youtube.com/watch?v=EKThn1lAVIA">https://www.youtube.com/watch?v=EKThn1lAVIA]</a></figcaption></figure><p>Dynamic Client Registration (DCR) in Open Banking is a method of onboarding a Third Party Provider (TPP) in Account Servicing Payment Service Provider(ASPSP). The <a href="https://openbanking.atlassian.net/wiki/spaces/DZ/pages/1078034771/Dynamic+Client+Registration+-+v3.2">DCR specification of OBIE</a> defines the API specifications for a TPP to submit a Software Statement Assertion (SSA) to the ASPSP to create Oauth clients. The <a href="https://openbanking.atlassian.net/wiki/spaces/DZ/pages/1193869584/Dynamic+Client+Registration+Conformance">OBIE DCR Conformance certificate</a> verifies that an Open Banking solution has all the DCR functionalities implemented successfully as per the <a href="https://openbanking.atlassian.net/wiki/spaces/DZ/pages/1078034771/Dynamic+Client+Registration+-+v3.2">Dynamic Client Registration Specification</a>. To receive the conformance certificate, an OB solution should pass all the test cases in <a href="https://bitbucket.org/openbankingteam/conformance-dcr/src/develop/">DCR Conformance Tool</a>.</p><p>This article is a simple guide to run the DCR Conformance Tool in WSO2 Open Banking solution. To try out this guide you will need,</p><ul><li>Docker installed in your environment</li><li>DCR configured WSO2 OBKM &amp; OBAM servers</li><li>A config.json file</li><li>A /.well-known endpoint. (I will be using a locally hosted /.well-known endpoint for this)</li></ul><p>I have run the DCR Conformance Tool in the following environment.</p><ul><li>Operating System: macOS 10.15.4</li><li>Database server: MySQL, Server version 5.7.25</li><li>Docker version 18.09.2</li><li>WSO2 OB 1.3.0 for UK spec with DCR v3.2</li><li>DCR Conformance Tool Release v1.0.3</li></ul><h3>Steps</h3><p><strong>Step 1: Configuration changes to support the DCR Conformance Tool</strong></p><ol><li>Download the WSO2 OBAM &amp; WSO2 OBKM 1.3.0 products &amp; configure the products for DCR. Step by step guide to configure your setup with DCR is nicely explained in detail in the documentation [1]. If you follow the documentation correctly, it should be a piece of cake :) After configuring make sure to stop your servers.</li><li>Go to <strong><em>&lt;WSO2-OBAM&gt;/repository/resources/finance/apis/openbanking.org.uk/DynamicClientRegistration/3.2</em></strong> &amp; change the<strong> <em>dcr-dynamic-endpoint-insequence-3.2.xml</em> </strong>by adding the <strong><em>&lt;property name=”ContentType” value=”application/jwt” scope=”axis2&quot;/&gt;</em></strong> as follows. Every time you republish the API, make sure to reload the inSequence file for the changes to be applied.</li></ol><pre>&lt;sequence xmlns=&quot;http://ws.apache.org/ns/synapse&quot; name=&quot;dcr-dynamic-endpoint-insequence-3.2&quot;&gt; <br><strong>&lt;!-- ContentType property for application/jwt--&gt; <br>&lt;property name=&quot;ContentType&quot; value=&quot;application/jwt&quot; scope=&quot;axis2&quot;/&gt;</strong></pre><p>3. If you have already deployed the DCR v3.2 API, you will need to add the property in the _<strong><em>DynamicClientRegistrationAPI_vv3.2.xml</em></strong> synapse file. Go to <strong><em>&lt;WSO2-OBAM&gt;/repository/deployment/server/synapse-configs/default/api</em></strong>. Find the<strong> <em>— DynamicClientRegistrationAPI_vv3.2.xml</em></strong> file. (My synapse file is <strong><em>admin-AT-wso2.com — DynamicClientRegistrationAPI_vv3.2.xml </em></strong>because I had published the API from the <strong>admin@wso2.com </strong>user. If you had published your API with another user, you will see a different username here). Add the property in both the inSequences just after the <strong><em>&lt;inSequence&gt;</em></strong> tag as follows.</p><pre>&lt;resource methods=&quot;POST&quot; url-mapping=&quot;/register&quot; faultSequence=&quot;fault&quot;&gt;<br>&lt;inSequence&gt;<br><strong>&lt;property name=&quot;ContentType&quot; value=&quot; application/jwt&quot; scope=&quot;axis2&quot;/&gt;</strong></pre><pre>--------------------------------------------------------------------</pre><pre>&lt;resource methods=&quot;DELETE PUT GET&quot; uri-template=&quot;/register/{ClientId}&quot; faultSequence=&quot;fault&quot;&gt;<br>&lt;inSequence&gt;<br><strong>&lt;property name=&quot;ContentType&quot; value=&quot; application/jwt&quot; scope=&quot;axis2&quot;/&gt;</strong></pre><p>4. Then, go to <strong><em>&lt;WSO2-OBAM&gt;/repository/conf/axis2</em></strong> &amp; edit the <strong><em>axis2.xml</em></strong> to add the followings under <strong><em>&lt;messageFormatters&gt;</em></strong><em> </em>&amp; <strong><em>&lt;messageBuilders&gt;</em></strong><em> </em>respectively.</p><pre>&lt;messageFormatters&gt;<br>&lt;!-- Message formatter to support the application/jose content-type for DCR --&gt;<br>&lt;messageFormatter contentType=&quot;application/jose&quot;<br> class=&quot;org.apache.axis2.format.PlainTextFormatter&quot;/&gt;</pre><pre>--------------------------------------------------------------------</pre><pre>&lt;messageBuilders&gt;<br>&lt;!-- Message Builder to support the application/jose content-type for DCR --&gt;<br>&lt;messageBuilder contentType=&quot;application/jose&quot;<br> class=&quot;org.apache.axis2.format.PlainTextBuilder&quot;/&gt;</pre><p>5. Now all the configurations are set. Navigate to <strong><em>/bin </em></strong>directory of OBKM &amp; OBAM &amp; startup your servers.</p><p>sh wso2server.sh --&gt; For linux or mac based environments</p><p>wso2server.bat --&gt; For Windows based environments</p><p>6. To test DCR flow manually, refer to the documentation[1]</p><p><strong>Step 2: Hosting the /.well-known endpoint locally</strong></p><p>It is pretty simple. All you need is;</p><ul><li>well-known endpoint configurations in a json file</li><li><a href="https://www.npmjs.com/package/json-server">json-server</a> installed in your machine</li></ul><p>You can refer to the following sample well-known endpoint configuration to setup your well-known endpoint configurations</p><pre>{<br>  &quot;response_types_supported&quot;:[&quot;code id_token&quot;],<br>  &quot;request_parameter_supported&quot;:true,<br>  &quot;request_uri_parameter_supported&quot;:false,<br>  &quot;claims_parameter_supported&quot;:true,<br>  &quot;grant_types_supported&quot;:[&quot;refresh_token&quot;,&quot;client_credentials&quot;,&quot;authorization_code&quot;],<br>  &quot;scopes_supported&quot;:[&quot;openid&quot;,&quot;payments&quot;,&quot;fundsconfirmations&quot;,&quot;accounts&quot;],<br>  &quot;issuer&quot;:&quot;<a href="https://192.168.8.102:9443/oauth2/oidcdiscovery/">https://&lt;WSO2-OBAM&gt;:9443/oauth2/oidcdiscovery/</a>&quot;,<br>  &quot;authorization_endpoint&quot;:&quot;<a href="https://192.168.8.102:8243/authorize">https://</a><a href="https://192.168.8.102:9443/oauth2/oidcdiscovery/">&lt;WSO2-OBAM&gt;</a><a href="https://192.168.8.102:8243/authorize">:8243/authorize</a>&quot;,<br>  &quot;userinfo_endpoint&quot;:&quot;<a href="https://192.168.8.102:8243/userinfo">https://</a><a href="https://192.168.8.102:9443/oauth2/oidcdiscovery/">&lt;WSO2-OBAM&gt;</a><a href="https://192.168.8.102:8243/userinfo">:8243/userinfo</a>&quot;,<br>  &quot;token_endpoint_auth_signing_alg_values_supported&quot;:[&quot;PS256&quot;],<br>  &quot;claims_supported&quot;:[&quot;openbanking_intent_id&quot;,&quot;iss&quot;,&quot;acr&quot;],<br>  &quot;userinfo_signing_alg_values_supported&quot;:[&quot;PS256&quot;],<br>  &quot;jwks_uri&quot;:&quot;This is the value of the org_jwks_endpoint in your SSA&quot;,<br>  &quot;subject_types_supported&quot;:[&quot;pairwise&quot;],<br>  &quot;id_token_signing_alg_values_supported&quot;:[&quot;PS256&quot;],<br>  &quot;token_endpoint_auth_methods_supported&quot;:[&quot;private_key_jwt&quot;],<br>  &quot;registration_endpoint&quot;:&quot;<a href="https://192.168.8.102:8243/open-banking/v3.2/register">https://</a><a href="https://192.168.8.102:9443/oauth2/oidcdiscovery/">&lt;WSO2-OBAM&gt;</a><a href="https://192.168.8.102:8243/open-banking/v3.2/register">:8243/open-banking/v3.2/register</a>&quot;,<br>  &quot;tls_client_certificate_bound_access_tokens&quot;:true,<br>  &quot;request_object_signing_alg_values_supported&quot;:[&quot;PS256&quot;],<br>  &quot;token_endpoint&quot;:&quot;<a href="https://192.168.8.102:8243/token">https://</a><a href="https://192.168.8.102:9443/oauth2/oidcdiscovery/">&lt;WSO2-OBAM&gt;</a><a href="https://192.168.8.102:8243/token">:8243/token</a>&quot;<br>}</pre><p>To install json-server run the following command in the terminal.</p><pre>npm install -g json-server</pre><p>Next to host the /.well-known endpoint, navigate to the location where your <em>well-known.json</em> file is &amp; run the following command.</p><pre>json-server — watch well-known.json --host &lt;IP_ADDRESS&gt; --port &lt;PORT&gt;</pre><pre><strong>sample command: </strong><br>json-server --watch well-known.json --host 192.168.8.102 --port 8000</pre><p><strong>Step 3: Configuring the config.json file</strong></p><p>The <a href="https://drive.google.com/drive/folders/1mSjXwddhv2nLFkHJ9UBRPv7UN_AwvDKX"><em>config.json</em></a> file contains the following fields. You just need to fill the fields with values relevant with your test environment.</p><pre>{<br>&quot;wellknown_endpoint&quot;: &quot;https://&lt;HOSTNAME&gt;:&lt;PORT&gt;/well-known&quot;,<br>&quot;ssa&quot;: &quot;&quot;,<br>&quot;kid&quot;: &quot;&quot;,<br>&quot;aud&quot;: &quot;&quot;,<br>&quot;issuer&quot;: &quot;&quot;,<br>&quot;redirect_uris&quot;: [&quot;&quot;],<br>&quot;private_key&quot;: &quot;&quot;,<br>&quot;transport_root_cas&quot;: [&quot;&quot;],<br>&quot;transport_cert&quot;: &quot;&quot;,<br>&quot;transport_key&quot;: &quot;&quot;,<br>&quot;get_implemented&quot;: <strong>true</strong>,<br>&quot;put_implemented&quot;: <strong>true</strong>,<br>&quot;delete_implemented&quot;: <strong>true<br></strong>}</pre><ul><li>wellknown-endpoint: This is the Open ID Connect well-known endpoint used to get the openid-configurations. It is recommended to use a separately hosted well-known endpoint, rather than using the default /.well-known endpoint(<a href="https://localhost:8243/.well-known/openid-configuration">https://localhost:8243/.well-known/openid-configuration</a>) In my scenario, it is the locally hosted /.well-known endpoint in the previous step.</li><li>ssa: The SSA you will be using to run the test suite.</li><li>kid: kid value to identity your key pair</li><li>aud: This is the intended audience that the client is being registerd with. Typically the unique identifier of the organisation.</li><li>issuer: This a unique identifer for the TPP/Client organisation. This will be the value of <strong>software_id </strong>in the SSA, which is provided by the Open Banking directory.</li><li>redirect_uris: This is the value of <strong>software_redirect_uris</strong> in the SSA</li><li>private_key: This is th private key associated with client</li><li>transport_root_cas: This is the root CAs for transport cert</li><li>transport_cert: This is the transport cert associated with client</li><li>transport_key: Private key for transport</li><li>get_implemented, put_implemented, delete_implemented: These fields are to enable the GET, PUT &amp; DELETE test scenarios in the test suite. They have boolean values.</li></ul><p><strong>Running the DCR Conformance Tool</strong></p><p>At this point, I hope you have your OBKM &amp; OBAM servers up &amp; running, the /.well-known endpoint is hosted. Open another terminal &amp; run the following command to run the DCR Conformance Tool. This will run the complete test suite (with all the POST, GET, PUT &amp; DELETE if you have configured the config.json accordingly.) Please note that you will also need to change the config.json file at the <em>&lt;HOME&gt;/.docker</em> to the config.json file we’ve just configured.</p><p>From here onwards I will be referring the location of the config.json file as &lt;DCR-HOME&gt;. (This is NOT the location of the &lt;HOME&gt;/.docker/config.json file)</p><pre>docker run --rm -it -v [CONFIG FILE]:/config.json openbanking/conformance-dcr:[TAG] -config-path=/config.json<br>--------------------------------------------------------------------<strong>sample command: </strong><br>docker run --rm -it -v &lt;DCR-HOME&gt;/config.json:/config.json openbanking/conformance-dcr:v1.0.3 -config-path=/config.json</pre><p>To run the test suite with debug mode on, run the command with <strong>-debug</strong> flag as follows.</p><pre>docker run --rm -it -v [CONFIG FILE]:/config.json openbanking/conformance-dcr:[TAG] -config-path=/config.json -debug<br>--------------------------------------------------------------------<strong>sample command:<br></strong>docker run --rm -it -v &lt;DCR-HOME&gt;/config.json:/config.json openbanking/conformance-dcr:v1.0.3 -config-path=/config.json -debug</pre><p>If you wish to run a seperate test case alone, you can do it by running the test suite with the <strong>-filter &lt;test-id&gt;</strong> flag as follows.</p><pre>docker run --rm -it -v [CONFIG FILE]:/config.json openbanking/conformance-dcr:[TAG] -config-path=/config.json -filter &lt;test-id&gt;<br>--------------------------------------------------------------------<strong>sample command:<br></strong>docker run --rm -it -v &lt;DCR-HOME&gt;/config.json:/config.json openbanking/conformance-dcr:v1.0.3 -config-path=/config.json -filter DCR-001</pre><p>To generate the DCR conformance test report you can run the following command to generate the report.</p><pre>docker run -p 8080:&lt;PORT&gt; — rm -it -v [CONFIG FILE]:/config.json openbanking/conformance-dcr -config-path=/config.json -report<br>--------------------------------------------------------------------<br><strong>sample command:<br></strong>docker run -p 8080:8080 — rm -it -v &lt;DCR-HOME&gt;/config.json:/config.json openbanking/conformance-dcr:v1.0.3 -config-path=/config.json -report</pre><p>After the test suite is run, you can download the test report from <a href="https://0.0.0.0:8080/">https://0.0.0.0:8080</a>. You will get a report similar to the attached[3].</p><p><strong>Note:</strong> Sometimes, when running the Conformance Tool, you may encounter test case failure issues due to timeout. If this happens &amp; you need to run the Conformance Tool again, simply delete the application with the corresponding application name from the /store portal (<em>https://&lt;OBAM&gt;:9443/store</em>) &amp; run the Conformance Tool again.</p><p>I hope you find the above steps helpful &amp; understanding to run the DCR Conformance Tool on your own. If you have any grey areas, please let me know in the comments.</p><p>Reference</p><p>[1] <a href="https://docs.wso2.com/display/OB130/Dynamic+Client+Registration+v3.2">https://docs.wso2.com/display/OB130/Dynamic+Client+Registration+v3.2</a></p><p>[2] <a href="https://openbanking.atlassian.net/wiki/spaces/DZ/pages/1078034771/Dynamic+Client+Registration+-+v3.2">https://openbanking.atlassian.net/wiki/spaces/DZ/pages/1078034771/Dynamic+Client+Registration+-+v3.2</a></p><p>[3] <a href="https://drive.google.com/open?id=1kL1zX8DJDzaAuMuBTbj0jQ7V-wO-Fb7b">https://drive.google.com/open?id=1kL1zX8DJDzaAuMuBTbj0jQ7V-wO-Fb7b</a></p><p>[4] <a href="https://bitbucket.org/openbankingteam/conformance-dcr/src/develop/QUICK-START.md">https://bitbucket.org/openbankingteam/conformance-dcr/src/develop/QUICK-START.md</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7e910b557e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>