<?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 AI Explained Simply on Medium]]></title>
        <description><![CDATA[Stories by AI Explained Simply on Medium]]></description>
        <link>https://medium.com/@aiexplainedsimply?source=rss-44dac129275f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_s_haxUh00EIInl_qtEEug.png</url>
            <title>Stories by AI Explained Simply on Medium</title>
            <link>https://medium.com/@aiexplainedsimply?source=rss-44dac129275f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 30 May 2026 06:33:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aiexplainedsimply/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 deploy Go lang application in docker & kubernetes]]></title>
            <link>https://medium.com/@aiexplainedsimply/how-to-deploy-go-lang-application-in-docker-kubernetes-ab264d1f75d4?source=rss-44dac129275f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab264d1f75d4</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[go]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[AI Explained Simply]]></dc:creator>
            <pubDate>Mon, 07 Aug 2023 22:55:07 GMT</pubDate>
            <atom:updated>2023-08-12T03:32:13.334Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*Y2aErbDl8dqkZMJ4FUjEOQ.png" /></figure><p>As potential of Docker &amp; Kubernetes are promising, be it consistency, efficiency, speed, declarative configuration, community adoption and support, &amp; what not, enterprises are shifting their application from VM based to containerized ones.</p><p>Similarly, Go lang has gained a lot popularity in last few years and major enterprises are developing their products in go lang.</p><p>Let’s get started.</p><h3>0. Create a Go lang project</h3><p>Create a directory with name uuid &amp; run go mod init inside id.</p><pre>mkdir uuid<br>cd uuid<br>go mod init</pre><h3>1. Create main.go Go Lang file</h3><p>Create a main.gofile inside uuid folder which uses net/http to make an API call to fetch requests and prints quote, every min.</p><pre>package main<br><br>import (<br> &quot;fmt&quot;<br> &quot;strings&quot;<br> &quot;time&quot;<br><br> &quot;github.com/pborman/uuid&quot;<br>)<br><br>func main() {<br> genUUidFunc := func() {<br>  uuidWithHyphen := uuid.NewRandom()<br>  uuid := strings.Replace(uuidWithHyphen.String(), &quot;-&quot;, &quot;&quot;, -1)<br>  fmt.Println(uuid)<br> }<br><br> for {<br>  genUUidFunc()<br>  time.Sleep(1 * time.Minute)<br> }<br>}</pre><p>Let’s deploy this locally to make sure application is running without any errors. To run this application locally, execute below command.</p><pre>go mod tidy # This command will download all the dependencies that are <br># required in your source files and update go.mod file with that dependency.<br>go run main.go<br># Ctrl + C to end the program</pre><h3>2. Dockerize Go lang application</h3><p>Now, since our uuid application is ready. We will have to create Dockerfile for this app to create docker container image.</p><pre>FROM golang:1.19.8 as builder<br>WORKDIR /workspace<br># Copy the Go Modules manifests<br>COPY go.mod go.mod<br>COPY go.sum go.sum<br># cache deps before building and copying source so that we don&#39;t need to re-download as much<br># and so that source changes don&#39;t invalidate our downloaded layer<br>RUN go mod download<br><br># Copy the go source<br>COPY . .<br><br># Build<br>RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o uuid main.go<br><br># Use distroless as minimal base image to package the manager binary<br># Refer to https://github.com/GoogleContainerTools/distroless for more details<br>FROM alpine:latest<br><br>RUN apk update<br>RUN apk add --no-cache bash curl jq<br>WORKDIR /<br>COPY --from=builder /workspace/uuid .<br>ENTRYPOINT [&quot;/uuid&quot;]</pre><p>In above example, we are using docker multi-stage building to build docker image.</p><p>Docker Build Stage-1</p><ul><li>Use golang 1.19.8 as base image.</li><li>Set the working directory.</li><li>Copy go.mod and go.sum</li><li>Run go mod download to download application dependencies</li><li>Once dependencies are downloaded, copy application source code</li><li>Build application binary</li></ul><p>Docker Build Stage-2</p><ul><li>Use base image as desired (base image is the one in which your application would be running at runtime), I am using alpine image</li><li>Add bash, curl etc, based on your requirements</li><li>Set the working directory</li><li>Copy application binary which we have generated in stage-1</li><li>Define the entry point</li></ul><p>Next step is to run docker build command to create docker image.</p><pre>docker build -t chroottech/golang-uuid:v0.0.1 .</pre><p>In above docker-build command, with -t, we can specify docker image tag with which image will be generated and the context of docker build by specifying . which mean current folder.</p><p>Login to docker registry if you haven’t logged in already.</p><pre>docker login</pre><p>Once you are logged, push your docker image by running below command.</p><pre>docker push chroottech/golang-uuid:v0.0.1</pre><p>Now you have created docker image of your application and you can run it as docker containers or in kubernetes as a pod.</p><h3>4. Run application in docker</h3><p>To run application in docker, we will have to create container with above generated image.</p><pre>(chroot-tech) rishi@chroot uuid $ docker run -it --rm chroottech/golang-uuid:v0.0.1<br>&gt; 6c6536f435094fc58b7721cd5fe1c8e9</pre><p>Your application is running inside docker container.</p><h3>5. Running application in kubernetes cluster</h3><p>We can deploy any application in kubernetes cluster by creating a pod or deployment (K8s maintains lifecycle of pod, if it is deployed as an Deployment)</p><p>Let’s create a manifest.yamlfile to deploy it in kubernetes cluster.</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: chroot-tech-golang-uuid<br>  labels:<br>    app: uuid<br>spec:<br>  replicas: 1<br>  selector:<br>    matchLabels:<br>      app: uuid<br>  template:<br>    metadata:<br>      labels:<br>        app: uuid<br>    spec:<br>      containers:<br>      - name: uuid<br>        image: chroottech/golang-uuid:v0.0.1</pre><p>Once, we have manifest file created, we can deploy this app in kubernetes cluster by running below kubectl command.</p><pre>kubectl apply -f manifest.yaml</pre><p>Once above command is executed successfully, kubernetes will find a node and will schedule this pod and in few mins, image will be pulled and application will start running.</p><pre>(chroot-tech) rishi@chroot uuid $ kubectl get pods<br>NAME                                        READY   STATUS    RESTARTS   AGE<br>chroot-tech-golang-uuid-6jk78c598-xclfz   1/1     Running   0          45s</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*N7CliJoAr0MQKdVfi8spXQ.jpeg" /></figure><p>By now, my go lang application is deployed in kubernetes and your’s will be too. Let me know by comments if you face any issues.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab264d1f75d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to deploy python application in docker & kubernetes]]></title>
            <link>https://medium.com/@aiexplainedsimply/how-to-deploy-python-application-in-docker-kubernetes-1d198f2af2c?source=rss-44dac129275f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d198f2af2c</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[application-deployment]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[AI Explained Simply]]></dc:creator>
            <pubDate>Sat, 05 Aug 2023 05:42:20 GMT</pubDate>
            <atom:updated>2023-08-05T20:13:55.129Z</atom:updated>
            <content:encoded><![CDATA[<p>Since containers are becoming de-facto medium of sharing &amp; deploying artifacts, in this article we’ll explore a streamlined approach to deploying a Python application using Docker and Kubernetes. Let’s dive in!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FcYObRCAb1Fs%3Fstart%3D102%26feature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DcYObRCAb1Fs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FcYObRCAb1Fs%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0040a94b084df254cca2e2688c52b88e/href">https://medium.com/media/0040a94b084df254cca2e2688c52b88e/href</a></iframe><h4>1. Create quotes.py python file</h4><p>Create a quotes.pyfile which uses requeststo make an API call to fetch requests and prints quote, every min.</p><pre>import requests<br>import time<br><br><br>def main():<br>    api_url = &quot;https://zenquotes.io/api/quotes&quot;<br><br>    while True:<br>        response = requests.get(api_url)<br><br>        if response.status_code == 200:<br>            data = response.json()<br>            if data:<br>                first_item = data[0]<br>                print(first_item[&#39;q&#39;])<br>            else:<br>                print(&quot;No items in the response.&quot;)<br>        else:<br>            print(&quot;API request failed with status code:&quot;, response.status_code)<br><br>        time.sleep(60)<br><br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><h4>2. Create requirements.txt file</h4><p>Create a file named requirements.txt in the same directory as your hello.py file, and add the following line to it</p><pre>requests==2.26.0</pre><p>This specifies that you want to use the requests library in version 2.26.0.</p><h4>3. Dockerize python application</h4><p>Now, since our python application is ready. We will have to create Dockerfile for this app to create docker container image.</p><pre>FROM python:3.8<br>WORKDIR /code<br>COPY requirements.txt .<br>ENV PYTHONUNBUFFERED=1<br>RUN pip install -r requirements.txt<br>COPY quotes.py .<br>CMD [ &quot;python&quot;, &quot;./quotes.py&quot; ]</pre><ul><li>Use a Python base image.</li><li>Set the working directory.</li><li>Copy requirements.txt</li><li>Set python buffered to 1 (allows the Python output to be sent straight to the terminal)</li><li>Install dependencies.</li><li>Copy the app code.</li><li>Define the entry point.</li></ul><p>Next step is to run docker build command to create docker image.</p><pre>docker build -t chroottech/python-quotes:v0.0.1 .</pre><p>In above docker-build command, with -t, we can specify docker image tag with which image will be generated and the context of docker build by specifying . which mean current folder.</p><p>Login to docker registry if you haven’t logged in already.</p><pre>docker login</pre><p>Once you are logged, push your docker image by running below command.</p><pre>docker push chroottech/python-quotes:v0.0.1</pre><p>Now you have created docker image of your application and you can run it as docker containers or in kubernetes as a pod.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*is5sPsaqoBA5dvAXf4zFXA.jpeg" /></figure><h4>4. Run application in docker</h4><p>To run application in docker, we will have to create container with above generated image.</p><pre>(chroot-tech) rishi@chroot quotes $ docker run -it --rm chroottech/python-quotes:v0.0.1<br>&gt; Everyone you admire was once a beginner.</pre><p>Your application is running inside docker container.</p><p><em>PS: I am enlightened by above quote. Hope it will make an impact in your life too</em></p><h4>5. Running application in kubernetes cluster</h4><p>We can deploy any application in kubernetes cluster by creating a pod or deployment (K8s maintains lifecycle of pod, if it is deployed as an Deployment)</p><p>Let’s create a manifest.yamlfile to deploy it in k8s.</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: chroot-tech-python-qyotes<br>  labels:<br>    app: quotes<br>spec:<br>  replicas: 1<br>  selector:<br>    matchLabels:<br>      app: quotes<br>  template:<br>    metadata:<br>      labels:<br>        app: quotes<br>    spec:<br>      containers:<br>      - name: quotes<br>        image: chroottech/python-quotes:v0.0.1</pre><p>Once, we have manifest file created, we can deploy this app in kubernetes cluster by running below kubectl command.</p><pre>kubectl apply -f manifest.yaml</pre><p>Once above command is executed successfully, kubernetes will find a node and will schedule this pod and in few mins, image will be pulled and application will start running.</p><pre>(chroot-tech) rishi@chroot quotes $ kubectl get pods<br>NAME                                        READY   STATUS    RESTARTS   AGE<br>chroot-tech-python-qyotes-8cb89c598-bl2sb   1/1     Running   0          23s</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*N7CliJoAr0MQKdVfi8spXQ.jpeg" /></figure><p>By now, my python application is deployed in kubernetes and your’s will be too. Let me know by comments if you face any issues.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d198f2af2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding kind cli with developer’s ]]></title>
            <link>https://medium.com/@aiexplainedsimply/understanding-kind-cli-with-developers-79eb687b5208?source=rss-44dac129275f------2</link>
            <guid isPermaLink="false">https://medium.com/p/79eb687b5208</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[kind]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <dc:creator><![CDATA[AI Explained Simply]]></dc:creator>
            <pubDate>Sat, 29 Jul 2023 23:26:22 GMT</pubDate>
            <atom:updated>2023-07-29T23:26:22.200Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*nzCO38pyKTeYN2Z-Ydh29A.png" /></figure><p>In this article, we will be taking kind to GoLand Operation Theatre and rip it apart by expert <a href="https://medium.com/u/44dac129275f">Chroot Tech</a> 😉 to loop into inner beauty of kind’s code.</p><p><strong>First thing first, what the heck is kind?</strong></p><p>Kind is cli application which creates kubernetes cluster using docker container as kubernetes nodes. Since you know how easy it is to create and dispose off docker containers. It makes kind very developer friendly tool to create kubernetes clusters and test application changes on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*lH6P98da2DmdsfC9Ld_7CQ.gif" /><figcaption>so easy to create and delete clusters in kind.. kind is really kind :)</figcaption></figure><p>Before I start, <strong>hat’s off to the maintainers &amp; contributors of this project</strong> for writing such an awesome tool and making developer’s life easier.</p><p>Github Repo Link: <a href="https://github.com/kubernetes-sigs/kind">https://github.com/kubernetes-sigs/kind</a></p><p>Website: <a href="https://kind.sigs.k8s.io/">https://kind.sigs.k8s.io</a></p><h4>What happens when we run command ‘kind create cluster’?</h4><p>“What a dumb question? that’s a simple one, <strong>isn’t it that</strong> <strong>kind cluster gets created</strong>” 🤔</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5OHMC9AYLgNm1Gf8F5IWhQ.png" /><figcaption>ok!! here’s another one for fun 🤭</figcaption></figure><p>ok.. let’s deep dive</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T3C_wt8HMLCAZi66-0ASew.png" /></figure><p>Kind supports <strong>docker</strong> (no introduction needed) &amp; <strong>Podman</strong> (open source tool to manage, run containers, developed by RedHat along with OpenSource contributors) to create containers which will work as kubernetes node and eventually will start kubernetes cluster within these containers.</p><ol><li>kind cli detects provider type (docker or podman)</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/39774b37bd0233c7e76590acd61b3a41/href">https://medium.com/media/39774b37bd0233c7e76590acd61b3a41/href</a></iframe><p>2. Validate provider settings and check if node container can be created</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/043be376143cc9a05a59a1ab17cd3647/href">https://medium.com/media/043be376143cc9a05a59a1ab17cd3647/href</a></iframe><p>3. Kind code execution then configures default values in kind config and starts cluster creation workflow which involves various actions and create node container is one of it</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3fa7d262ba4d0dc2712921cd235305fd/href">https://medium.com/media/3fa7d262ba4d0dc2712921cd235305fd/href</a></iframe><p>kind cluster create workflow then invoke provider to create container.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/11159327c1e07efc533657094d5569aa/href">https://medium.com/media/11159327c1e07efc533657094d5569aa/href</a></iframe><p>3.a. <strong>Provision Node Container: </strong>Provider interface will call docker or Podman based on what is installed on the host, to create a container with kindest/node image which is pre-created with all necessary files to bootstrap kubernetes services inside that container</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6fed2e7922d2b9c615be68ec53a3286e/href">https://medium.com/media/6fed2e7922d2b9c615be68ec53a3286e/href</a></iframe><p><a href="https://github.com/kubernetes-sigs/kind/blob/main/pkg/cluster/internal/providers/docker/provision.go#L102">kind/pkg/cluster/internal/providers/docker/provision.go at main · kubernetes-sigs/kind</a></p><p>3.b. <strong>Kubeadm-Init Action: </strong>Node container is created with specific image which is pre-created with kubeadm and all required manifests to bootstrap kubernetes cluster. Once container is running, kind cli runs below kubeadm-init command with <a href="https://github.com/kubernetes-sigs/kind/blob/main/pkg/cluster/internal/kubeadm/config.go">this kubeadm config</a> inside that container which starts etcd and api-server inside container.</p><p>Based on node configurations, nodes are tainted.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ed4c5dec7dc6a693f26c1660502379af/href">https://medium.com/media/ed4c5dec7dc6a693f26c1660502379af/href</a></iframe><p>3.c. <strong>Install CNI (Container Network Interface) : </strong>Once kubeadm-init phase is completed, kubernetes cluster gets started and it is accessible but since there is no CNI installed, we can’t use it to deploy any workloads as networking is required to run any pod.</p><p><a href="https://github.com/kubernetes-sigs/kind/blob/main/pkg/cluster/internal/create/actions/installcni/cni.go">kind/pkg/cluster/internal/create/actions/installcni/cni.go at main · kubernetes-sigs/kind</a></p><p>3.d. <strong>Install CSI (Container Storage Interface)</strong>: Once CNI is installed then we can deploy stateless applications inside it which doesn’t persist any data locally and thus doesn’t need any external volume. But, kind also deploys <a href="https://github.com/rancher/local-path-provisioner">local-path-provisioner</a> CSI which provisions volume in host path, which means inside docker node container which was created in step 3.a.</p><p><a href="https://github.com/kubernetes-sigs/kind/blob/main/pkg/cluster/internal/create/actions/installstorage/storage.go">kind/pkg/cluster/internal/create/actions/installstorage/storage.go at main · kubernetes-sigs/kind</a></p><p>4. <strong>Kubeadm Join (Optional): </strong>Once CSI is installed, if there are worker-nodes defined in kind-configuration then kind will run kubeadm-join command in containers created for worker-nodes.</p><p><a href="https://github.com/kubernetes-sigs/kind/blob/main/pkg/cluster/internal/create/actions/kubeadmjoin/join.go">kind/pkg/cluster/internal/create/actions/kubeadmjoin/join.go at main · kubernetes-sigs/kind</a></p><p><strong>Voila!!!! You got yourself a kubernetes cluster in few mins. Isn’t that awesome 👏🏻😇</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*oYSbJcl5r_jaAyXbpnuhHA.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79eb687b5208" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to develop secure web applications]]></title>
            <link>https://medium.com/@aiexplainedsimply/how-to-develop-secure-web-applications-ea65b8d18a32?source=rss-44dac129275f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea65b8d18a32</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[trivy]]></category>
            <category><![CDATA[firewall]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[AI Explained Simply]]></dc:creator>
            <pubDate>Sun, 16 Jul 2023 19:55:53 GMT</pubDate>
            <atom:updated>2023-07-16T19:55:53.758Z</atom:updated>
            <content:encoded><![CDATA[<h4>A touch base on security guidelines of different components in an web application server</h4><p>In today’s digital landscape, where cyber threats are ever-evolving, ensuring the security of data and applications is of paramount importance.</p><p>We developers must adopt robust measures to protect sensitive data and safeguard applications against potential vulnerabilities. In this article, I will dive into essential components in software development and what security measures we can take while developing it.</p><h4>Why do we need secure applications?</h4><p>We all why we need secure applications. Don’t we?</p><p>In brief, keeping sensitive data secret, maintaining privacy, safeguarding against financial losses, compliance, regulations and there are numerous reasons to name here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IUluh70jFXWwS-VIhGqDhw.png" /></figure><p>Let’s talk about different components and what measures, we can take at each component to make tech eco-system secure.</p><h4>Firewalls: How to Protect the Perimeter?</h4><p>Firewalls serve as the first line of defense, protecting applications from unauthorized access and malicious activities. They act as a barrier between an internal network and the external world, monitoring and controlling incoming and outgoing network traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U6q1FijB-p9YoQ0yyhB4Tw.png" /><figcaption>Firewall Blocking Network Intruder Traffic</figcaption></figure><p>If you are an Infrastructure Security Engineer, Firewall Security Engineer or DevOps Engineer, responsible for configuring &amp; maintaining firewalls, then here’s what you can do</p><ul><li>Determine your network requirements, consider factors such as scalability, performance, traceability &amp; select right firewall solutions</li><li>Plan your firewall rule sets according to requirements. <strong>Whitelist</strong> <strong>outbound</strong> and <strong>inbound</strong> connections to <strong>only </strong>those<strong> IPs &amp; DNS</strong> which is <strong>required</strong> by the product. Common rules include allowing specific ports for required services (e.g., HTTP, HTTPS, SSH) and restricting access to sensitive resources</li><li><strong>Regularly update and patch</strong> your firewall but also be fully aware with firewall hardware &amp; software’s new versions and try out all the use-cases before performing any upgrade</li><li><strong>Review firewall</strong> configurations <strong>regularly</strong></li><li><strong>Establish a DMZ</strong> (Demilitarized Zone) to isolate publicly accessible servers or services from your internal network</li><li><strong>Set up VPN</strong>, Enable Intrusion Detection &amp; Logging and Monitoring</li><li>Perform <strong>security testing and audits</strong> to identify any weaknesses or misconfigurations in your firewall network</li></ul><p>Remember, configuring a secure firewall network is an ongoing process. Stay informed about emerging threats, keep up with industry best practices, and <strong>be proactive in addressing security vulnerabilities</strong> to maintain the effectiveness of your firewall configuration.</p><h4>API Gateways: Ensuring Secure Communication</h4><p>API gateways provide a centralized entry point for client applications to interact with backend services and APIs. They play a crucial role in securing application interfaces and managing secure access to APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UN0PAzXhYKkzsU82m7DJdQ.png" /><figcaption>API Gateway Blocking Unwanted Connections</figcaption></figure><ul><li>By implementing strong <strong>Authentication &amp; Authorization</strong> protocols, such as OAuth or JSON Web Tokens (JWT), developers can authenticate and authorize clients securely</li><li>Encryption and Transport Layer Security</li><li>Rate limiting and throttling</li><li>Request filtering and payload validation</li><li>Security Headers and Response Validation</li><li>Versioning and Deprecation</li></ul><h4>Management Server: Ensuring Secure Communication</h4><p>Management servers is a central control point for monitoring, configuring, and securing applications. They provide an interface through which developers can manage security-related aspects of an application efficiently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AnEYvkz8eANWbOIOLlkGKg.png" /><figcaption>Management Server Handling API Requests</figcaption></figure><ul><li>If authentication is handled by Validate Auth &amp; ACL Permissions for each requests if authentication &amp; authorization is done by the backend service</li><li>Input Validation and Sanitization</li><li>User inputs should be considered as parameters instead of executable code</li><li>Use secure session tokens, enable session expiration and session invalidation</li><li>Securely handle File -Apply file type validation, limit file upload sizes, and store sensitive data in secure locations, following industry-standard practices</li><li>Scan artifacts -There are many OpenSource &amp; Proprietary tools like <a href="https://aquasecurity.github.io/trivy/v0.43/">trivy</a>, <a href="https://www.esecurityplanet.com/products/twistlock/">twistlock</a>, to scan artifacts. Configure snyk to scan code changes and libraries during the Pull Request and during build time.</li></ul><pre>(base) rishi@Rishis-MacBook-Pro bin (main) $ trivy image nginx<br>2023-07-15T20:13:00.869-0700    INFO    Vulnerability scanning is enabled<br>2023-07-15T20:13:00.869-0700    INFO    Secret scanning is enabled<br>2023-07-15T20:13:00.869-0700    INFO    If your scanning is slow, please try &#39;--scanners vuln&#39; to disable secret scanning<br>2023-07-15T20:13:00.869-0700    INFO    Please see also https://aquasecurity.github.io/trivy/v0.37/docs/secret/scanning/#recommendation for faster secret detection<br>2023-07-15T20:13:05.019-0700    INFO    JAR files found<br>2023-07-15T20:13:05.020-0700    INFO    Downloading the Java DB...<br>442.94 MiB / 442.94 MiB [------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 30.80 MiB p/s 15s</pre><p>Above snippet is an example of artifact scan using trivy and based on image, trivy downloads <a href="https://github.com/aquasecurity/trivy-java-db">java-db-plugin</a> and scans the image.</p><p>Once image scan is done, it will present the result in desired format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D_DvRVCk3jfgrqM3v13zbA.png" /></figure><p>By this time, we know high level measures which we can take to secure the application.</p><p>In some application, there could be multiple micro-services in management plane, though these could be in internal network, still each service should authenticate with another service when invoking any of the rest endpoints.</p><p>Micro-services may communicate with each other over either one or many communications channels like HTTP, WebSockets, NATS, Message Queue &amp; other ways. Each of these communication channel has different security measures based on the protocol being used for the communication.</p><p>In a nutshell, every component either has to be configured right or has to be developed right to be secure.</p><p>Hope, I was able to touch base on different components and this reminds you of all that you have done to keep your product secure.</p><p>Have a good time, all of you :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea65b8d18a32" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>