<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Tutorial on Salman's Blog</title><link>https://salmanfs.ca/tags/tutorial/</link><description>Recent content in Tutorial on Salman's Blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 07 Jun 2023 22:49:00 +0000</lastBuildDate><atom:link href="https://salmanfs.ca/tags/tutorial/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Setup Mutual TLS in MuleSoft</title><link>https://salmanfs.ca/posts/how-to-setup-mutual-tls-mulesoft/</link><pubDate>Wed, 07 Jun 2023 22:49:00 +0000</pubDate><guid>https://salmanfs.ca/posts/how-to-setup-mutual-tls-mulesoft/</guid><description>&lt;p&gt;Mutual TLS (mTLS), or 2-way SSL, is a server-to-server communication protocol where both client and server authenticate each other.
In this context, client simply means the party requesting a resource and server is the party serving the client&amp;rsquo;s request.&lt;/p&gt;
&lt;p&gt;2-way SSL differs from 1-way SSL in which only the client authenticates the server. In 1-way SSL, the client is only required to maintain the server&amp;rsquo;s public key in its truststore and the server only needs to maintain its own private key in its keystore.&lt;/p&gt;</description></item><item><title>Developing a Flask App &amp; Deploying on AWS</title><link>https://salmanfs.ca/posts/developing-a-flask-app-deploying-on-aws/</link><pubDate>Sun, 12 Sep 2021 06:13:58 +0000</pubDate><guid>https://salmanfs.ca/posts/developing-a-flask-app-deploying-on-aws/</guid><description>&lt;p&gt;&lt;a href="https://flask.palletsprojects.com/en/2.0.x/"&gt;Flask&lt;/a&gt; is a lightweight Python web framework.
It&amp;rsquo;s lightweight nature makes it a great candidate for creating APIs.
In this tutorial, I&amp;rsquo;m going to cover how to make a simple RESTful API service with Flask and host it on AWS.&lt;/p&gt;
&lt;p&gt;First, we&amp;rsquo;ll make a basic Flask app and use &lt;a href="https://docs.aws.amazon.com/elastic-beanstalk/index.html"&gt;AWS Elastic Beanstalk&lt;/a&gt; to deploy it.
Then, we&amp;rsquo;ll use &lt;a href="https://github.com/zappa/Zappa"&gt;Zappa&lt;/a&gt; to deploy a serverless app to &lt;a href="https://docs.aws.amazon.com/lambda/index.html"&gt;AWS Lambda&lt;/a&gt;. For more information on serverless architectures and how Zappa works, check out the &lt;a href="https://github.com/zappa/Zappa#about"&gt;About&lt;/a&gt; section on their GitHub page.&lt;/p&gt;</description></item><item><title>Quick Reference: Setting up HTTPS in Mule 4</title><link>https://salmanfs.ca/posts/quick-ref-setting-up-https-mule-4/</link><pubDate>Tue, 01 Jun 2021 17:19:00 +0000</pubDate><guid>https://salmanfs.ca/posts/quick-ref-setting-up-https-mule-4/</guid><description>&lt;p&gt;Inputs required:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;keystore file name&lt;/li&gt;
&lt;li&gt;alias&lt;/li&gt;
&lt;li&gt;keypass/password&lt;/li&gt;
&lt;li&gt;encryption key&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Need to generate keystore:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;keytool -genkeypair -dname &lt;span style="color:#e6db74"&gt;&amp;#34;CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown&amp;#34;&lt;/span&gt; -keyalg RSA -sigalg SHA256withRSA -keysize &lt;span style="color:#ae81ff"&gt;2048&lt;/span&gt; -validity &lt;span style="color:#ae81ff"&gt;9999&lt;/span&gt; -keystore &amp;lt;keystore_file_name &lt;span style="color:#f92672"&gt;(&lt;/span&gt;*.jks&lt;span style="color:#f92672"&gt;)&lt;/span&gt;&amp;gt; -alias &amp;lt;alias&amp;gt; -keypass &amp;lt;keypass/password&amp;gt; -storepass &amp;lt;keypass/password&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;keypass/password is sensitive information
needs to be stored in encrypted format in config/properties file&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;java -cp secure-properties-tool.jar com.mulesoft.tools.SecurePropertiesTool string encrypt AES CBC &amp;lt;encryption_key &lt;span style="color:#f92672"&gt;(&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;16&lt;/span&gt; chars&lt;span style="color:#f92672"&gt;)&lt;/span&gt;&amp;gt; &amp;lt;keypass/password&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;output string should be placed in config file inside: &lt;code&gt;&amp;quot;![...]&amp;quot;&lt;/code&gt;&lt;/p&gt;</description></item><item><title>Maven HelloWorld - Create, Compile and Execute a Java Maven Project</title><link>https://salmanfs.ca/posts/maven-helloworld-create-compile-and-execute-a-java-maven-project/</link><pubDate>Sat, 01 Sep 2018 02:49:43 +0000</pubDate><guid>https://salmanfs.ca/posts/maven-helloworld-create-compile-and-execute-a-java-maven-project/</guid><description>&lt;h3 id="create"&gt;Create&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mvn archetype:generate
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will start an interactive process for generating the new project. There will be prompts for the groupId, artifactId, and version (among other things).&lt;/p&gt;
&lt;p&gt;To skip the interactive method, use the following syntax instead:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mvn archetype:generate -DgroupId&lt;span style="color:#f92672"&gt;=&lt;/span&gt;ca.salmanfs.javaPractice -DartifactId&lt;span style="color:#f92672"&gt;=&lt;/span&gt;HelloWorld -DinteractiveMode&lt;span style="color:#f92672"&gt;=&lt;/span&gt;false
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="compile"&gt;Compile&lt;/h3&gt;
&lt;p&gt;Maven built us a basic Java file that prints &amp;ldquo;Hello World!&amp;rdquo;
We can compile that now:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mvn compile
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will execute the Maven build lifecycle phases of &amp;lsquo;validate&amp;rsquo; and &amp;lsquo;compile&amp;rsquo;.
This is what Maven is doing for us:&lt;/p&gt;</description></item></channel></rss>