<?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 João Vitor de Assis on Medium]]></title>
        <description><![CDATA[Stories by João Vitor de Assis on Medium]]></description>
        <link>https://medium.com/@joaov.assis?source=rss-b1c477868eaa------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*HanRBXiEGYKPWtRq</url>
            <title>Stories by João Vitor de Assis on Medium</title>
            <link>https://medium.com/@joaov.assis?source=rss-b1c477868eaa------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 20:03:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@joaov.assis/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[How to Propagate OpenTelemetry Context in WSO2 Micro Integrator]]></title>
            <link>https://medium.com/@joaov.assis/how-to-propagate-opentelemetry-context-using-wso2-micro-integrator-c4801943eaa1?source=rss-b1c477868eaa------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4801943eaa1</guid>
            <category><![CDATA[opentelemetry]]></category>
            <category><![CDATA[wso2-micro-integrator]]></category>
            <category><![CDATA[integration]]></category>
            <dc:creator><![CDATA[João Vitor de Assis]]></dc:creator>
            <pubDate>Sun, 31 May 2026 20:26:04 GMT</pubDate>
            <atom:updated>2026-05-31T20:27:15.969Z</atom:updated>
            <content:encoded><![CDATA[<p>OpenTelemetry is extremely valuable for obtaining a complete view of entire integration flows, enabling powerful insights such as identifying bottlenecks, latency issues, and failure points. At the same time, WSO2 Micro Integrator (MI) is an excellent tool for building and running both simple and complex integration flows.</p><p>Fortunately, Micro Integrator has full support for OpenTelemetry, automatically creating contexts and spans for mediators and exporting them to observability platforms such as Jaeger or Zipkin.</p><p>But what happens if the services calling MI — and the services being called by MI — already use OpenTelemetry and create their own contexts and spans? Is it possible to connect all of them into a single distributed trace to achieve full end-to-end observability?</p><p>Yes, it absolutely is! Below, you will learn exactly how to do it.</p><h3>Setting up OpenTelemetry in MI in the first place</h3><p>You can find the complete setup instructions in <a href="https://mi.docs.wso2.com/en/latest/observe-and-manage/classic-observability-traces/monitoring-with-opentelemetry-mi/">this official documentation of MI</a>. The steps are much simpler than it may initially seem.</p><h3>Propagating Context from a Service Calling MI</h3><p>When a service that already uses OpenTelemetry calls MI, you may want MI to continue the existing trace instead of creating an entirely new one.</p><p>To achieve this, the calling service must send the following HTTP header:</p><pre>traceparent: &lt;context&gt;</pre><p>This header is part of the OpenTelemetry Trace Context specification and follows this structure:</p><pre>traceparent: {version}-{trace-id}-{parent-span-id}-{trace-flags}</pre><p>By sending this header, MI continues the existing distributed trace instead of generating a new root context.</p><h3>Propagating context to a service being called by MI.</h3><p>If the downstream service also supports OpenTelemetry, it should already be capable of interpreting the <strong>traceparent</strong> header according to the OpenTelemetry specification.</p><p>Therefore, before calling the downstream service from MI, you can explicitly propagate the current trace context by setting the <strong>traceparent</strong> header within the integration flow.</p><p>You can do this by adding such as the following:</p><pre>&lt;property name=&quot;prop.temp.traceId&quot; expression=&quot;$ctx:jaeger_trace_id&quot;/&gt;<br>&lt;property name=&quot;prop.temp.spanId&quot; expression=&quot;$ctx:jaeger_span_id&quot;/&gt;<br>&lt;property name=&quot;prop.temp.traceparent.string&quot; expression=&quot;fn:concat(&#39;00-&#39;, get-property(&#39;prop.temp.traceId&#39;), &#39;-&#39;, get-property(&#39;prop.temp.spanId&#39;), &#39;-01&#39;)&quot;/&gt;<br>&lt;header name=&quot;traceparent&quot; scope=&quot;transport&quot; expression=&quot;get-property(&#39;prop.temp.traceparent.string&#39;)&quot;/&gt;</pre><p>Although the expressions contain the term <strong>jaeger</strong>, this mechanism is not Jaeger-specific. It works with any OpenTelemetry-compatible observability platform.</p><h3>Conclusion</h3><p>By propagating OpenTelemetry contexts correctly, you can achieve full end-to-end distributed tracing across all services involved in an integration flow.</p><p>This allows Micro Integrator to become seamlessly integrated into your observability ecosystem, providing a unified trace view across upstream services, MI mediations, and downstream services.</p><p>The result is significantly improved visibility, troubleshooting capabilities, and performance analysis for complex distributed systems.</p><p>Thanks, and I hope this helps! 🙂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4801943eaa1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[mTLS Between Micro Integrator and Backend]]></title>
            <link>https://medium.com/@joaov.assis/mtls-between-micro-integrator-and-backend-0e122c7caf76?source=rss-b1c477868eaa------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e122c7caf76</guid>
            <category><![CDATA[ssl-certificate]]></category>
            <category><![CDATA[backend-integration]]></category>
            <category><![CDATA[tlm]]></category>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[wso2-micro-integrator]]></category>
            <dc:creator><![CDATA[João Vitor de Assis]]></dc:creator>
            <pubDate>Tue, 31 Mar 2026 00:10:41 GMT</pubDate>
            <atom:updated>2026-03-31T00:10:41.801Z</atom:updated>
            <content:encoded><![CDATA[<p>Mutual TLS (mTLS) adds an extra layer of security by requiring both sides of a connection to authenticate. Here’s how to configure WSO2 Micro Integrator to use it with specific backends.</p><h3>1. Set up certificates</h3><h4>1.1 Client Certificate (used by MI to authenticate to backend)</h4><p>As you know, the backend server will require an MI public certificate imported in the backend’s truststore to be able to stabibilish mTLS.</p><p>For this, you can either use a certificate from the MI’s default Keystore, or from a new Keystore which you can create. Both approaches are described below.</p><p><strong>1.1.1 Default Keystore<br></strong>MI comes with a default Keystore, which already has a private key and a certificate.<br>- Directory: <em>&lt;MI-HOME&gt;/repository/resources/security/</em><strong>wso2carbon.jks</strong><em><br></em>- The default password is:<em> wso2carbon</em></p><p>In order to get the default MI public certificate, you can execute the following:</p><pre>keytool -exportcert -keystore wso2carbon.jks -alias wso2carbon -file wso2public-cert.crt</pre><p><strong>1.1.2 New Keystore</strong><br>Instead of using the default Keystore, you can create a new one specifically by following the steps described below:</p><p>You can create a new private key and a certificate with the following command:</p><pre>openssl req -newkey rsa:2048 -nodes -keyout domain.key -x509 -days 365 -out domain.crt</pre><p>After this, you can use the following two commands to pack the key and the certificate into a PKCS#12 Keystore:</p><pre>openssl pkcs12 -export -out certificate-store.pfx -inkey domain.key -in domain.crt</pre><p>Then, you can use the following command to convert it into a JKS Keystore:</p><pre>keytool -importkeystore -srckeystore certificate-store.pfx -destkeystore mutual-ssl.jks -srcstoretype pkcs12 -deststoretype JKS</pre><h4>1.2 Trusted Certificate (used by MI to trust the backend)</h4><p>After getting your hands on a certificate from the backend, you can import it into the MI’s default Truststore.<br>- Directory: <em>&lt;MI-HOME&gt;/repository/resources/security/</em><strong>client-truststore.jks</strong><em><br></em>- The default password is:<em> wso2carbon</em></p><pre>keytool -import -alias certalias -file &lt;public key name&gt;.pem -keystore client-truststore.jks -storepass wso2carbon</pre><h3>2. <strong>Edit deployment.toml </strong>(&lt;MI-HOME&gt;/conf)</h3><p><em>[transport.http]</em><br><em> sender.ssl_profile.file_path = “conf/sslprofiles/senderprofiles.xml”</em><br><em> sender.ssl_profile.read_interval = 600000</em></p><p><strong>read_interval</strong> is in milliseconds (600000 = 10 minutes, for example). The MI will automatically re-read the profile file at this interval without requiring a restart. Must be greater than 1 minute (60000ms).</p><h3><strong>3. Create the directory and profile file</strong></h3><p>Create the folder <strong><em>&lt;MI-HOME&gt;/conf/sslprofiles</em></strong> and inside it the <strong>senderprofiles.xml</strong>:</p><pre>&lt;parameter xmlns:svns=&quot;http://org.wso2.securevault/configuration&quot; name=&quot;customSSLProfiles&quot;&gt;<br>     &lt;profile&gt;<br>         &lt;servers&gt;backend.com:3000&lt;/servers&gt;<br>         &lt;KeyStore&gt;<br>              &lt;Location&gt;repository/resources/security/keystore.jks&lt;/Location&gt;<br>              &lt;Type&gt;JKS&lt;/Type&gt;<br>              &lt;Password&gt;password&lt;/Password&gt;<br>              &lt;KeyPassword&gt;password&lt;/KeyPassword&gt;<br>         &lt;/KeyStore&gt;<br>         &lt;TrustStore&gt;<br>              &lt;Location&gt;repository/resources/security/truststore.jks&lt;/Location&gt;<br>              &lt;Type&gt;JKS&lt;/Type&gt;<br>              &lt;Password&gt;password&lt;/Password&gt;<br>         &lt;/TrustStore&gt;<br>     &lt;/profile&gt;<br>&lt;/parameter&gt;</pre><p><strong>Replace the following with your actual values:</strong></p><ul><li><strong>backend.com:3000</strong> → the hostname and port of the specific backend you want mTLS with<br> • <strong>keystore.jks</strong> → the filename of the keystore<br> • <strong>truststore.jks</strong> → the filename of the truststore<br> • <strong>password</strong> (KeyStore) → the keystore password<br> • <strong>password</strong> (KeyPassword) → the password of the private key inside the keystore<br> • <strong>password</strong> (TrustStore) → the truststore password</li></ul><p><strong>Note:</strong> It is recommended to use hostnames in the &lt;servers&gt; field rather than IP addresses, to avoid DNS lookup latency.</p><h3><strong>4. Restart the MI</strong></h3><p>The profile will be loaded on startup. From that point on, any call to <strong>backend.com:3000</strong> will use mTLS with the dedicated certificates, and all other backends remain unaffected.</p><p>Any further updates to <strong>senderprofiles.xml</strong> will be picked up automatically based on the <strong>read_interval</strong> configured in step 2, without requiring a restart.</p><p>Thanks, and I hope this helps! 🙂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e122c7caf76" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Encrypted Secrets in API Policies of API Manager]]></title>
            <link>https://medium.com/@joaov.assis/using-encrypted-secrets-in-api-policies-of-api-manager-a15e8e52cb68?source=rss-b1c477868eaa------2</link>
            <guid isPermaLink="false">https://medium.com/p/a15e8e52cb68</guid>
            <category><![CDATA[wso2-api-manager]]></category>
            <category><![CDATA[encryption]]></category>
            <category><![CDATA[secrets]]></category>
            <dc:creator><![CDATA[João Vitor de Assis]]></dc:creator>
            <pubDate>Fri, 23 Jan 2026 23:59:58 GMT</pubDate>
            <atom:updated>2026-01-26T15:38:06.475Z</atom:updated>
            <content:encoded><![CDATA[<p>Being able to use encrypted secrets in <a href="https://apim.docs.wso2.com/en/4.5.0/manage-apis/design/api-policies/overview/">API Policies</a> of API Manager opens up even more opportunities to implement secure and flexible integrations.</p><p>This blog explains how encrypted secrets can be securely added to <strong>WSO2 API Manager versions 2.x through 4.x</strong> and retrieved at runtime during API policy execution.</p><h3>Adding Encrypted Secrets to API Manager</h3><h4>1. Configure Secure Vault</h4><ul><li>Go to <strong>&lt;APIM_HOME&gt;/bin</strong> directory and execute the following command (if Secure Vault has not been configured yet):</li></ul><pre>./ciphertool.sh -Dconfigure</pre><ul><li>You will be prompted to enter the <strong>primary keystore password</strong>, which is <strong>wso2carbon</strong> by default.</li></ul><p>Once completed, Secure Vault will be configured and ready to use.</p><h4><strong>2. Encrypting the Secret</strong></h4><ul><li>From the same <strong>&lt;APIM_HOME&gt;/bin</strong> directory, run the following command:</li></ul><pre>./ciphertool.sh -Dorg.wso2.CipherTransformation=RSA/ECB/OAEPwithSHA1andMGF1Padding</pre><ul><li>Once executed, you will be prompted to enter the primary keystore password, and right afterwards, the value you want to encrypt.</li></ul><p>After providing these inputs, the tool will output the <strong>encrypted value</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*0OpbARhUt1ZBuB2f1ah5GQ.png" /></figure><h4>3. Adding the Encrypted Value to Secure Vault</h4><ul><li>Log in to the <strong>Carbon Console</strong>: <a href="https://{host}/carbon">https://{host}/carbon</a></li><li>Navigate to: <strong>Registry → Browse</strong></li><li>Go to the following path: <strong>/_system/config/repository/components/secure-vault</strong></li><li>Add a new property using the encrypted value obtained in the previous step.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l8AGAjqBx82n7zZZPI2gnw.png" /></figure><h3>Retrieving the Decrypted Value in API Policies</h3><p>The encrypted secret can be retrieved at runtime using the following expression:<br><strong>wso2:vault-lookup(‘alias_you_used’)</strong></p><h4>Example:</h4><pre>&lt;property name=&quot;resolved-secret&quot; expression=&quot;wso2:vault-lookup(&#39;testalias&#39;)&quot;/&gt;</pre><p>This allows the API policy to securely access the decrypted value without exposing sensitive information.</p><p>Thanks, and I hope this helps! 🙂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a15e8e52cb68" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>