<?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 Manuel Kutscher on Medium]]></title>
        <description><![CDATA[Stories by Manuel Kutscher on Medium]]></description>
        <link>https://medium.com/@soelchma?source=rss-1f944db04596------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*xEAMCCz6pDqZ9BTJQQl9mg.jpeg</url>
            <title>Stories by Manuel Kutscher on Medium</title>
            <link>https://medium.com/@soelchma?source=rss-1f944db04596------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 08:49:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@soelchma/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 add root/intermediate ssl certificates on Linux Ubuntu servers]]></title>
            <link>https://medium.com/@soelchma/how-to-add-root-intermediate-ssl-certificates-manually-on-linux-ubuntu-servers-ced8c04d2a6d?source=rss-1f944db04596------2</link>
            <guid isPermaLink="false">https://medium.com/p/ced8c04d2a6d</guid>
            <category><![CDATA[ssl-certificate]]></category>
            <category><![CDATA[certificate]]></category>
            <category><![CDATA[add-certificate]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[tls-certificate]]></category>
            <dc:creator><![CDATA[Manuel Kutscher]]></dc:creator>
            <pubDate>Wed, 22 Dec 2021 15:58:59 GMT</pubDate>
            <atom:updated>2022-01-02T14:18:05.906Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*m8KkvEXo-5mznLRa.jpeg" /></figure><p>I am pretty sure every developer (no matter how much experience he or she has) had struggled at a point by dealing with ssl certificates. At least this is my experience.</p><p>This article is supposed to help you adding ssl certificates to a Linux Ubuntu server and list them as trusted ones. There are actually two ways of implementing it and I will show you both ways. One is more manually while the other one is more for automation.</p><p>If you want to know more about ssl certificates or just refresh your knowledge have a look at this <a href="https://www.thesslstore.com/blog/root-certificates-intermediate/">article</a>. It explains very well how root and intermediate ssl certificates works.</p><p>But it may happen you have certificates signed by your own organisation which you need to use for internal network communication. In this case you need to add this certificates to you server (and/or client).</p><h3>Why adding ssl certificates?</h3><p>When you are setting up a new virtual machine (e.g. in Azure) running Linux Ubuntu a lot of (common) root and intermediate ssl certificates are already in place. Therefore most of the time your ssl handshake between a client (e.g. browser) and server is going to work because the client which sends the requests has pre-installed the certificates as well and therefore client can trust the requested server.</p><h3>Option 1</h3><p>Check your pre-installed certificates on your Ubuntu server by switching to the following directory (starting from the root directory):</p><pre>$ cd /usr/share/ca-certificates</pre><p><strong>Note:</strong> It may be possible this directory is not existing on your machine for any reason. If that is the case just create it! Of course you are not having any certificates pre-installed but you are going to need it later on.</p><p>On my machine (Azure/Ubuntu 18.04) there is a folder called “mozilla” which already contains 127 .crt files (root and intermediate certificates).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wWBf4-62PoxoDNMkLlfUNg.png" /><figcaption>Preinstalled certificates</figcaption></figure><p>Ok if you have the directory ready we can proceed creating, uploading and adding it to the trused list of certificates.</p><h3>Adding your certificate(s) on the machine and sync them</h3><p>First of all create a folder in the directory mentioned above (/usr/share/ca-certificates). This folder will contain the .crt files we want to add.<br>I named my folder “extra”.</p><pre>$/usr/share/ca-certificates: mkdir extra</pre><p>Looks good so far? Great! Then let’s move forward.</p><p>We are going to create our own self-signed certifictate for this example. You can either do it on your remote server or locally. If you create it locally you need to do an extra step after creation and copy it to the directory via scp.</p><pre>$ openssl req -x509 -newkey rsa:4096 -keyout mykey.pem -out mycert.pem -sha256 -days 365</pre><p>Please enter a passphrase otherwise it won’t work. After you need to fill out the information which are needed (state, organization etc.). The output is .pem file.</p><p>Ok now that we have our .pem file we convert it into a .cert file because that’s what we need:</p><pre>$ openssl x509 -outform der -in mycert.pem -out mycert.crt</pre><p>If you created it locally copy the .cert file from your local pc in your<em> /usr/share/ca-certificates/extra</em> directory on your remote virtual machine.</p><p><strong>Note:</strong> You cannot copy the .cert file via scp from you local pc directly into the <em>/usr/share/ca-certificates/extra</em> directory on your virtual machine because you need root privilege on the remote server. Copy the file into the home directory and then move it via mv (with sudo).</p><p>If you created it on your remote server move the certificate via the <em>mv </em>command to <em>/usr/share/ca-certificates/extra.</em></p><p>Now our .cert file is on the right place and ready! We are almost done!</p><p>Now it’s time to tell Ubuntu that we have a new .cert file that we want to trust and install:</p><pre>$ sudo dpkg-reconfigure ca-certificates</pre><p>This command will open a new window which looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vO9MlL15kyKnyogi4CZGtQ.png" /><figcaption>Package configuration</figcaption></figure><p>We go on with a “yes” and press enter. This is going to open another screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3n7tBWq_bAf41an2FQIp0Q.png" /><figcaption>Package configuration — Certificates</figcaption></figure><p>This screen shows us which .cert files are already installed and trusted (with *). And here we see our self-signed certificate <em>mycert.cert </em>wich is located in the<em> /extra</em> directory. But it’s not install yet so choose the file to be installed by clicking the space bar and then enter. The certificate is now going to be installed and trusted. The outcome on the bash looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OoZo-URmm7QUJP0Pn6PjCw.png" /></figure><p>We can see that 1 certificate was added. Don’t be worry about the warning. It works even you get it. It’s just saying that it contains more that one certificate (because it is the concatenation of all the certificates).</p><p>Now le’s check if the certificate was really added to the list of trusted certificates.</p><p>Change the directory to <em>etc/ssl/certs </em>and look for our certificate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zBlBpXUTTrANbb69yQkrzQ.png" /><figcaption>List of trusted ssl certificates</figcaption></figure><p>It’s there! That’s it :)</p><h3><strong>Option 2</strong></h3><p>Next to option 1 there is another way to add certificates to an Ubuntu server. You may have seen with option 1 you need to do manual steps. But what if you want to automate this process? And here comes option 2!</p><p>Actually the process is almost the same like we did in option 1, but now we are working within another directory:<em> /usr/local/share/ca-certificates</em></p><p>So change into this directory and create another self-signed certificate (change the name).</p><pre>$ openssl req -x509 -newkey rsa:4096 -keyout mykey.pem -out option_2_cert.pem -sha256 -days 365</pre><p>When it’s created convert it again into a .cert file.</p><pre>$ openssl x509 -outform der -in mycert.pem -out option_2_cert.crt</pre><p>The next step is the biggest difference compared to what we have done in option 1 (but actually it’s not :-D).</p><p>Run the following command:</p><pre>$ sudo update-ca-certificates</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nulSxrUz8CWslC7Amr15jw.png" /><figcaption>update ca-certificates</figcaption></figure><p>This command add the certificate without any manual interaction. Therefore you can use it within a CI pipline. And as we can see on the output the certificate was added.</p><p>Now again let’s have a look at <em>etc/ssl/certs </em>directory if the certificate was really added.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sOPqf5d3i9ZBsafzWlWLdA.png" /><figcaption>Trusted certificates</figcaption></figure><p>Perfect, it’s here :)</p><p>That’s it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ced8c04d2a6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enable MFA in Azure without Azure AD Premium]]></title>
            <link>https://medium.com/@soelchma/enable-mfa-in-azure-without-azure-ad-premium-9f4cbf653ac7?source=rss-1f944db04596------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f4cbf653ac7</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[mfa]]></category>
            <category><![CDATA[azure-ad]]></category>
            <category><![CDATA[azure-active-directory]]></category>
            <dc:creator><![CDATA[Manuel Kutscher]]></dc:creator>
            <pubDate>Tue, 03 Aug 2021 19:23:32 GMT</pubDate>
            <atom:updated>2021-08-04T12:07:01.590Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u8xOGRTJWi8IMUmD.jpg" /></figure><p>This is going to be a quick article but I hope it helps you securing your Azure account.</p><p>It is not easy to find out how to enable MFA (Multi-Factor-Authentication) for your Azure account without purchasing Azure AD Premium. But I totally recommend to enable it!</p><p>But actually it is pretty easy!</p><p>Enable the “security defaults” under your Azure AD → Properties → scroll down and click on “Manage Security defaults” → enable them (Yes).</p><p>Security defaults are a set of policies to protect your account in regards to identities. If you enable it like mentioned above the following policies are getting applied.</p><ul><li>Requiring all users to register for Azure AD Multi-Factor Authentication.</li><li>Requiring administrators to perform multi-factor authentication.</li><li>Blocking legacy authentication protocols.</li><li>Requiring users to perform multi-factor authentication when necessary.</li><li>Protecting privileged activities like access to the Azure portal.</li></ul><p>If you want to know more about it look at the official documentation:</p><p><a href="https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/concept-fundamentals-security-defaults">Azure Active Directory security defaults</a></p><p><a href="https://techcommunity.microsoft.com/t5/azure-active-directory-identity/introducing-security-defaults/ba-p/1061414">https://techcommunity.microsoft.com/t5/azure-active-directory-identity/introducing-security-defaults/ba-p/1061414</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f4cbf653ac7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy AWS Lambda (Node.js) with Serverless and read data from S3]]></title>
            <link>https://medium.com/swlh/deploy-aws-lambda-node-js-with-serverless-and-read-data-from-s3-d1272a976287?source=rss-1f944db04596------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1272a976287</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[s3-bucket]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Manuel Kutscher]]></dc:creator>
            <pubDate>Fri, 10 Apr 2020 12:17:50 GMT</pubDate>
            <atom:updated>2021-07-24T13:47:29.050Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V9h24eDDA7sJaJj3a6W2XQ.jpeg" /></figure><p>Finally this is my first contribution here for the Medium community. Because I have gained really a lot of knowledge and practical experience from other people on this platform I want to be a part of it and give something back. And finally say thank you!</p><h3><strong>What are we going to do?</strong></h3><p>With this article I want to share my experience with AWS Lambda in combination with Serverless Framwork<em> </em>and AWS S3. At the end we have a Lambda function reading csv data located in a S3 bucket, convert them into JSON format and provide it via a public REST endpoint. It does not raise the claim to be the best solution rather than show you what my experience was and how I implemented it on my first try.</p><p><strong>Step by step we are going to do the following:</strong></p><ol><li>Create S3 Bucket and upload csv file</li><li>Install Serverless Framework locally on your machine</li><li>Create and configure the Serverless project (Node.js/Express.js)</li><li>Add role and permissions</li><li>Deploy Lambda on AWS</li></ol><p>I assume you already have some experience with AWS and you know the basics like creating a role. If not please have a look at the official AWS documentation.</p><h3><strong>Architecture</strong></h3><p>First let’s have a look at the overall architecture of what we are going to build.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*El3bmwYWseQdXeLO9qMLdQ.png" /><figcaption>Architecture</figcaption></figure><p>As you can see the architecture is actually really simple. The client sends a request to an endpoint provided by the AWS API gateway which forwards it to our Lambda function. Let’s start!</p><h3>1. Create S3 Bucket</h3><p>In this step we are going to create a S3 bucket which contains the .csv file from where we want to read the data. Because I assume you are a little bit familiar with AWS I think you know how to create a S3 bucket. You can do it either with the AWS console or via cli.</p><p>Name the bucket like you want (or can because it has to be unique as you know). I named my bucket ‘MediumBucketLambda’.</p><p>Ok now upload a .csv file to this bucket. I just downloaded a sample file <a href="http://eforexcel.com/wp/downloads-18-sample-csv-files-data-sets-for-testing-sales/">here</a> and renamed it to ‘salesrecords.csv’. <br>Don’t use the biggest one (100 records is enough). The bucket/file doesn’t have to be public available.</p><p><strong>Note: </strong>If you want to you use your own .csv file and you just copy and paste the code later here ensure you have a .csv file separating the data with a comma not a semicolon.</p><h3><strong>2. Install Serverless Framework</strong></h3><p>Because we don’ t want to set up and configure the Lambda and API gateway manually and especially not separately we use the Serverless Framework which is doing all the work for us. Serverless Framework<em> </em>is an open source framework (Serverless Framework Pro costs a monthly fee). What it does it creates a CloudFormation Stack and deploys everything we need to make it run. We just need to specify a single .yaml file.</p><p>First of all we need to install the latest version via npm:</p><pre>$ sudo npm i serverless -g</pre><p>And now run:</p><pre>$ serverless version </pre><p><strong>Note: </strong>Instead of the command ‘severless’ you can also use the shorter command ‘sls’</p><p>You should see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*oqDbNpGsFJ5ahg97z70aCA.png" /><figcaption>Serverles version</figcaption></figure><p>Ok! Now you are ready to use the serverless cli!</p><p>Serverless needs to know to what AWS account you want to deploy your Lambda. We don’t use AWS cli profiles instead we set the IAM user of the AWS account where we want to deploy our Lambda to the serverless config credentials:</p><pre>$ sls config credentials --provider aws --key KEY --secret SECRET</pre><p>As you probably know you get the key and secret from the AWS IAM console.<br>Now every time you deploy something with Serverless this account and IAM user is going to be used.</p><p><strong><em>Note: Please make sure your IAM user has the proper permissions to deploy the Lambda!</em></strong></p><p>Of course if you would work with different AWS accounts and different users and roles where you need to deploy your Lambdas you would managed everything with AWS CLI profiles/credentials (/.aws/credentials and /.aws/config) rather than setting one default account.</p><h3><strong>3. Create and configure serverless project (Node.js/Express.js)</strong></h3><p>After we setup the Serverless cli let’s produce some code. We want to create a function which reads data from a S3 bucket in the same account where the Lambda is deployed.</p><p>Frist create the folder for your project locally:</p><pre>$ mkdir serverless_project</pre><p>Switch into the <em>severless_project</em> directory and run</p><pre>$ sls create --template aws-nodejs</pre><p>This command creates two files:</p><ul><li>handler.js</li><li>serverless.yaml</li></ul><p>First we delete everything what’s in the handler.js and replace it with the following code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4ea5791ce8d76dd1761905206cc3c4ec/href">https://medium.com/media/4ea5791ce8d76dd1761905206cc3c4ec/href</a></iframe><p>What are we doing here?<br>We just creating an Express application and a GET route where we read our file from S3, convert it into JSON and provide it to the client.</p><p>Don’t forget to install the require modules and dependencies for you node app via npm:</p><ul><li>aws-sdk</li><li>csvtojson</li><li>express</li><li>serverless-http</li><li>serverless-iam-roles-per-function</li></ul><p><strong>Note:<br></strong>Change the ‘params’ object attributes (Bucket, Key) to your needs. The ‘Bucket’ attribute is just the name of your bucket you have created and the ‘Key’ is name of the .csv file.</p><p>As you can see the handler.js contains the code of our Lambda function and the serverless.yaml is the main config file for our Lambda deployment. You can configure a lot of things there but don’t worry we just need three sections for our implementation:</p><p><strong>Service:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*2JWGMunUgN1q-TFd_Suo6w.png" /><figcaption>name service</figcaption></figure><p>I will name my service “get-sales-data”. If you want to rename it feel free!</p><p><strong>Provider:</strong></p><p>At the provider section we keep the values for name (aws)<em> </em>and runtime (nodejs10.x).<br>Our serverless.yaml at this section look like this now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*OXtkrEHIrpQGs9Uh5VHOMA.png" /><figcaption>Configure provider</figcaption></figure><p>We will now add some additional properties at the provider section.<br>The first one is ‘stage’<em>. </em>We assume we want to deploy theLambda at ‘dev’ stage.</p><pre>stage:dev</pre><p>The next property is ‘region’. I am going to deploy it in the region ‘eu-west-1’ (Dublin).</p><pre>region:eu-west-1</pre><p>Because I want to know what CloudFormation Stack belongs to my Lambda add the property ‘stackName’ with the value ‘my-lambda-${self:provider.stage}’<em>.</em></p><pre>stackName:<em>myserverless-lambda-${self:provider.stage}</em></pre><p><strong><em>Note:</em></strong><em><br></em>${self:provider.stage} references to the stage value ‘dev’ we defined before. Accordingly my CloudFormation Stack has the name ‘my-lambda-dev’.</p><p>Our serverless.yaml looks like this now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*-ZFqUdnwz_zgFIecRBxmxw.png" /><figcaption>Configure provider</figcaption></figure><p>There is still one property missing here — the AWS Lambda execution role.<br>We will postpone adding the role here to the chapter ‘Prepare and configure roles, permissions and policies in AWS’ where we create the execution role.</p><h4><strong>Function:</strong></h4><p>After we configured the service and provider section in the serverless.yaml we are now setting the properties for the function.</p><p>At the end the ‘functions’ section is supposed to look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UFGSzQ4THcjlHqjsqiDDXg.png" /><figcaption>Configure function</figcaption></figure><p>The handler points to our handler.js file which contains the function to be invoked (we exported it as “server” of what we get back from sls(app)).<br>The trigger for the lambda is a http trigger. Therefore we need an http endpoint. Lambda itself cannot expose an http endpoint so we going to spin up an AWS API gateway which is doing this job for us. It will generate an http endpoint and route incoming requests forward to our lambda. We specified the path<em> </em>attribute with “/” so every time we call the base path of the http endpoint the lambda is going to be invoked. Additionally we enable CORS and set the ‘private’ attribute value to false. If you want to secure your function with an api key set it simply to true. The functions will be invoked with any http method.</p><h3><strong>4. </strong>Add role and permissions</h3><p>For me on of the most tricky part of AWS (after switching from Azure to AWS) was to get familiar with setting the right roles, permissions and policies to make everything work.</p><p>We need a role for our Lambda function which has the permission to access our S3 bucket we have created before. Because this role will be used for this function only the best way to create this role is to do it also with the Serverless Framework.</p><p>To do so, we already installed the prerequsite for that: The “serverless-iam-roles-per-function” npm package. What we need to do to use it is to include it in the serverless.yaml under the “plugin” section right after the “service” section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*frJbV7MSFQWwkP3vxRAStA.png" /></figure><p>With this plugin in place we now can add the role and proper permissions directly under the “function” section were we already defined our function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pF_RrbtFXvUcQLkDl7MM6g.png" /><figcaption>Add IAM role and permissons</figcaption></figure><p>Note: Don’t forget to add your own S3 bucket name.</p><h3>5. Deploy Lambda on AWS</h3><p>Now we are ready do deploy the Lambda on AWS!</p><p>Run the command:</p><pre>$ sls deploy</pre><p>It takes a little bit if everything is build and the CloudFormation is executed (Serverless does nothing else than creating a CloudFormation Stack). If everything works fine you created a Lamba function and an api gateway which exposes your functions. Congrats!<br>You see the http endpoint either in your Terminal/Bash after the deployment is finished or in the AWS Lambda Console clicking on API gateway.</p><p>Call the endpoint with your browser and you should see the .csv data converted to JSON.</p><p>To remove everything (Lambda and IAM role) just execute:</p><pre>$ sls remove</pre><p>And everything you deployed via Severless (defined within the serverless.yaml) will be destroyed.</p><p>You can find the code used within this articel at <a href="https://github.com/soelchma/medium-serverless">GitHub</a>.<br>Feel free to clone/fork it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1272a976287" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/deploy-aws-lambda-node-js-with-serverless-and-read-data-from-s3-d1272a976287">Deploy AWS Lambda (Node.js) with Serverless and read data from S3</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>