<?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 Sandeep Kumar on Medium]]></title>
        <description><![CDATA[Stories by Sandeep Kumar on Medium]]></description>
        <link>https://medium.com/@siddhivinayak-sk?source=rss-356acb1877de------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NtXnPLptmpKGy4lbJXCuOA.jpeg</url>
            <title>Stories by Sandeep Kumar on Medium</title>
            <link>https://medium.com/@siddhivinayak-sk?source=rss-356acb1877de------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 12:34:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@siddhivinayak-sk/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[DevToys: Swiss Army Knife for developers]]></title>
            <link>https://siddhivinayak-sk.medium.com/devtoys-swiss-army-knife-for-developers-aeff1848bb47?source=rss-356acb1877de------2</link>
            <guid isPermaLink="false">https://medium.com/p/aeff1848bb47</guid>
            <category><![CDATA[devtools]]></category>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[debug]]></category>
            <dc:creator><![CDATA[Sandeep Kumar]]></dc:creator>
            <pubDate>Thu, 19 Dec 2024 13:36:04 GMT</pubDate>
            <atom:updated>2026-11-01T10:23:26.791Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Software development has different stages, each stage requires different set of tools. There are various set of tools are available for different purpose required at different work while development.</p><p>As a developer, while writing code, debugging or investigating issue in application, use of tools like Json to xml, json format/validate, Base64 encoder/decoder, JWT tools, Epoc Timestamp read, Hash, UUID generate, URL encode/decode an so on. There are different tools available from different vendors for these purpose. Also, some of tools are available as plugin in IDEs. But these requires, setup these tools and switching between different applications while development which make development tedious.</p><p>Of course, we have all the tools available and I can remember different plugins in Notepad++ which I was regularly using since long time. Also, sometimes, online tools are used but those are prone to leak of precious technical data so we prefer using local tools.</p><p>By considering these all, we need a suite of common development tools which works on local machine for data security and developer does not have to setup or switch to different applications while writing/debugging/investigating code. Couple of years back, I came across a tool name <strong>DevToys</strong> which provides set of common tools we usually need while writing code.</p><h3>About DevToys</h3><p>DevToys is a software suit which provides various common tools &amp; utilities as single executable. The utilities are kept lightweight compare to their full version. It has been designed by considering developer’s challenges while writing code or investigating issues in code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*42PhUWCyD4LIHYRSZMxRqA.png" /><figcaption>DevToys Application</figcaption></figure><p>It has been <a href="https://github.com/DevToys-app/DevToys/blob/main/LICENSE.md">licensed under MIT</a> means you can use it freely and distribute with same license. Since it is does everything locally (as per current version), there is no chance of precious technical data leakage.</p><p>Below are list of features of this tool suite:</p><ul><li>Single application for common tools required while writing/debugging/investigation code</li><li>Opensource and cross-platform (Windows, Linux and macOS)</li><li>Go faster with smart detection: This is quite attractive feature, which something is copied, based-on content on clipboard, it selects the appropriate tool to be used</li><li>Integration with system: Designed to embrace its operating system and provides various features related format, theme, responsive UI, rich editor etc.</li><li>It can be easily used with terminal as command</li><li>It provides around 30 tools and more are available as third-party tools</li></ul><p>Its installation is quite simple with binaries available on <a href="https://devtoys.app/download">link</a>.</p><p>You can simply download installer and install. Alternatively, choco , homebrew or zip version can be used to setup it (based on availability for the OS).</p><h3>Use Case</h3><p>There are different use-cases for this DevTools as per different tool and utility. We will cover few of them:</p><p><strong>Converters</strong></p><ol><li><strong>JSON &lt;&gt; XML:</strong> It is used to convert from JSON to XML or XML to JSON.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S1ku6Ps2ss2bAsYmrU81lg.png" /><figcaption>JSON &lt;&gt; XML</figcaption></figure><p><strong>2. Unix Timestamp Converter</strong>: It converts Unix timestamp (EPOC) to human readable form or vice-versa.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2NEg37ZYgqSHQXaKvCWKZQ.png" /><figcaption>Unix Timestamp Converter to human readable format</figcaption></figure><p><strong>3. Number Base Converter</strong>: Convert number base among Decimal, Hexadecimal, Binary, Octal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z1YiFV1tZIXkVKzEKbDF1A.png" /><figcaption>Number Base Converter</figcaption></figure><p><strong>4. Cron Parser</strong>: Parse cron expression and get next schedules as well</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nf-Y7OWYUXakHnZf0pyTDA.png" /><figcaption>Cron Parser</figcaption></figure><p><strong>Encoders and Decoders</strong></p><ol><li><strong>Certificate Decoder:</strong> With current version of tool, only certificate decoder is available but I hope other tools around certificate will be availabe in future</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tUdNcAipdK6OsbXsWl5QqA.png" /><figcaption>Certificate Decoder</figcaption></figure><p><strong>2. HTML Encoder / Decoder</strong>: Encode/decode HTML content</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y2k8eP7VKRhLdLEm4BIPSQ.png" /><figcaption>HTML Encoder / Decoder</figcaption></figure><p>3. <strong>URL Encoder / Decoder</strong>: Encode / decoder URLs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OQXFzdHdWcoRH63pAX0whA.png" /><figcaption>URL Encoder / Decoder</figcaption></figure><p>4. <strong>Base64 Text Encoder / Decoder</strong>: Encode text into Base64 or vice-versa</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AXg32KLNAi23KmoSEOhLcA.png" /><figcaption>Base64 Text Encoder / Decoder</figcaption></figure><p><strong>5. Base64 Image Encoder / Decoder</strong>: Encode image into Base64 and vice-versa</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hD3_sGeB5cECoXysS_filQ.png" /><figcaption>Base64 Image Encoder / Decoder</figcaption></figure><p><strong>6. Gzip Compress / Decompress</strong>: Compress text using Gzip or decompress</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bCkoBxIVFtcfI2bKrs0itQ.png" /><figcaption>Gzip Compress / Decompress</figcaption></figure><p><strong>7. JWT Encoder / Decoder</strong>: It is similar to <a href="https://jwt.io/">jwt.io</a> and provides JWT encode and decode tool</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rJA8PilNEha3IKRKgGn7MQ.png" /><figcaption>JWT Encoder / Decoder</figcaption></figure><p><strong>Formatters</strong></p><ol><li><strong>JSON Formatter</strong>: It beautify JSON and make readable</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kXYXGdiNEKknR-oDMo_4XA.png" /><figcaption>JSON Formatter</figcaption></figure><p><strong>2. SQL Formatter</strong>: Format the SQL with different standards like PL/SQL, MsSQL etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mh9JKRC4zK8bJxBhq46Spw.png" /><figcaption>SQL Formatter</figcaption></figure><p><strong>3. XML Formatter</strong>: Format and beautify XML document</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hm1LqVmJcgw-UXhwM8mJ7g.png" /><figcaption>XML Formatter</figcaption></figure><p><strong>Generators</strong></p><ol><li>Hash: It generate hash of given text input into different standard e.g. MD5, SHA1, SHA256, SHA512</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JFcKv7cAsQh6C6o3rdgs4A.png" /><figcaption>Hash Generation</figcaption></figure><p><strong>2. Password Generator</strong>: Generate password with different combinations</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YtS4jV1jFLUoPkiBp1BzFg.png" /><figcaption>Password Generator</figcaption></figure><p><strong>3. UUID Generator</strong>: Generate UUID with given input</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w-CAMLcSiliV6SPKoWqAEA.png" /><figcaption>UUID Generator</figcaption></figure><p><strong>4. Lorem Ipsum Generator</strong>: Generate dummy text which is usually used for testing purpose</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bHhD1N8A7U-yb7b78sn-zg.png" /><figcaption>Lorem Ipsum Generator</figcaption></figure><p><strong>5. Checksum Generator</strong>: Generate checksum for given file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-xjfPbT3c_GGsvbXXfXtiA.png" /><figcaption>Checksum Generator</figcaption></figure><p><strong>Text</strong></p><ol><li><strong>Text Escape / Un-escape</strong>: It helps to get escaped text of given input text</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PLFzGKJr5o6gmc8X1NLWHQ.png" /><figcaption>Text Escape / Un-escape</figcaption></figure><p><strong>2. Text Case Converter &amp; Inspector:</strong> Convert text cases as well as provides details about cases of given text</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zQ3Rc4ASVvbX6KYRrQIMqQ.png" /><figcaption>Text Case Converter &amp; Inspector</figcaption></figure><p><strong>3. REGEX Tester</strong>: It provides regular expression testing tool</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BKNiDu90J6jwAj6t31leTw.png" /><figcaption>REGEX Tester</figcaption></figure><p><strong>4. Text Comparer:</strong> Tool to compare textual content</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y27F3Ve3BFXjuUKKoCcb4Q.png" /><figcaption>Text Comparer</figcaption></figure><p><strong>5. XML Validator:</strong> Validate XML document against given schema file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6pETUvhT-QrWXjA7DiytPQ.png" /><figcaption>XML Validator</figcaption></figure><p><strong>6. Markdown Preview:</strong> It render markdown files</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qmdwI2J6-8YNGdwofkdFAg.png" /><figcaption>Markdown Preview</figcaption></figure><p><strong>Graphic</strong></p><ol><li><strong>Color Picker &amp; Contrast:</strong> Simple color picker</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YMnd-BCSt3T5X-lxOZifpA.png" /><figcaption>Color Picker &amp; Contrast</figcaption></figure><p><strong>2. Image Converter:</strong> Convert Image format</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CjXZ0jfdkv8-dcvieSxPHQ.png" /><figcaption>Image Converter</figcaption></figure><p>There is also setting menu where font, language, theme etc. can be configured as per need:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L3T6pc6x7e7hogt9FMFwow.png" /><figcaption>DevToys Settings</figcaption></figure><h3>Conclusion</h3><p>DevToys is very useful suit of tools &amp; utilities for developers. Now while working with code, there is no need to switch between different application for different tooling. It makes life much easier as it auto-switch tab based on content on clipboard. It is also available in CLI form so developer has terminal, it can be used as command very easily.</p><p>Additionally, since everything is on local, there is no threat of data leakage as well.</p><h3>References</h3><ul><li><a href="https://devtoys.app/">DevToys</a></li><li><a href="https://github.com/DevToys-app/DevToys">DevToys GitHub</a></li><li><a href="https://devtoys.app/download">DevToys Installation</a></li></ul><p>If you enjoyed this article, consider <a href="https://buymeacoffee.com/siddhivinayak.sk">buying me a coffee</a>. Your support helps me create and share more. ☕</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aeff1848bb47" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Gateways: Netflix OSS Zuul vs Spring Cloud Gateway]]></title>
            <link>https://siddhivinayak-sk.medium.com/api-gateways-netflix-oss-zuul-vs-spring-cloud-gateway-8b12a1089f87?source=rss-356acb1877de------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b12a1089f87</guid>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[zuul]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[spring-cloud-gateway]]></category>
            <category><![CDATA[spring-cloud]]></category>
            <dc:creator><![CDATA[Sandeep Kumar]]></dc:creator>
            <pubDate>Thu, 06 Oct 2022 12:38:57 GMT</pubDate>
            <atom:updated>2026-11-01T10:24:05.210Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>An API Gateway is a L7 network traffic gateway which provides simplest yet effective way to route the APIs based on configuration and provide various cross-cutting concerns to APIs like security, monitoring &amp; metrics, and resiliency.</p><p>An API Gateway can provide features:</p><ul><li><strong>Security </strong>— There could be various types of security mechanism can be implemented at Gateway level like:</li></ul><p><em>A. Authorization: The API authorization is cross-cutting concern which enables protection to APIs against unauthorized access. It can be implemented in various ways like: JSON Web Token (JWT) / JSON Web Encryption (JWE) token based authorization, TLS Certificate based authorization, Basic Key and Secret based authorization etc.</em></p><p><em>B. Rate Limiting: A Rate Limiting is a mechanism which is used to prevent Distributed Denial of Service (DDoS) attack. In DDoS attack an attacker uses Bots/Automated Agents to generate huge number of traffic on APIs. It will be prevented by putting rate limiting on API to prevent from server and its resources.</em></p><p><em>C. Intrusion Protection: Intrusion protection is mechanism which are implemented to prevent from Brute Force Attacks (BFAs). In BFAs, the attacker generate the access key / secret / password and tries to access the API in hope to guess the correct secret.</em></p><p><em>D. Cross-Site Scripting (XSS) Protection: In XSS attack, the attacker uploads malicious script code as part of API input and tries to steal / disturb the API servers with malicious code.</em></p><p><em>E. Others: There are several other types of protections can easily be implemented at Gateway level like Mutual SSL, Hostname validation, Request Input Validation / SQL Injection Protection etc.</em></p><ul><li><strong>Traffic Routing</strong> — Traffic routing is most important responsibility of API Gateways. The routing are performed based on Traffic filtering which is preformed by using Predicates. Means, all traffic will land to API Gateway, based on configured predicates traffics are filtered and routed to configured destination. There could be various two types of routing:</li></ul><p><em>A. Static Routing : In Static Routing, routes are pre-configured in API Gateway configuration like if traffic comes for context </em><em>/product/* it will redirect to </em><em>product-service/* . There could be other type of static router based on header or other request parameters.</em></p><p><em>B. Dynamic Routing: Dynamic Routing works on algorithm where target is decided dynamically based on written algorithm. Example, Edge routing works on request Geo location e.g. if traffic origin is in US, it will route traffic to US instance of application service so that it can be served speedily. One more example of dynamic routing is, if a service is failing continuously, routing traffic to it can be prevented and routed to responsive API backend.</em></p><ul><li><strong>Common Activities</strong> — The API Gateways are also used for common activities like common cross-cutting concerns (those actions which are required to perform for all APIs. Below are some common activities:</li></ul><p><em>A. Common Exception Handling: A common exception handling is required to maintain the standardization across the APIs and to maintain single point of maintenance.</em></p><p><em>B. CORS Validation: The origin validation can be implemented at API Gateway level.</em></p><p><em>C. Request / Response Enhancement: There could be requirement to enhance request or response in application. Like add trace id in requests before routing to API backend service so that failure can be tracked in case of request is served by multiple services.</em></p><ul><li><strong>Monitoring &amp; Insight</strong> — API Gateways can implement monitoring and insight logic very easily. Each access can be logged, the time taken to serve a request can be logged and various other type of metrics can be obtained.</li></ul><p>API Gateways are very useful and makes easy development of APIs by handling cross-cutting concerns at it own level.</p><p>Below is a typical placement of API Gateway in micro-services based application:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*mt27Kzsph5_WpmYSLIJT1w.png" /><figcaption>Figure 1: Depicts placement and uses of API Gateways</figcaption></figure><p>There are various API Gateways are available from different vendors which can be used. For Java based developers, there are two famous API Gateways (Spring Cloud Gateway and Netflix OSS Gateway) are available which are open-source and can be configured very easily and used. Both supports rich set of features and can be extended with custom functionality using Java. We will be comparing both in subsequent section.</p><h3>Netflix OSS Gateway vs Spring Cloud Gateway</h3><p>Before going to compare both, let’s collect important information about these gateways:</p><p><strong>Netflix OSS Gateway</strong></p><p>Zuul — Zuul is an API Gateway developed by Netflix Open Source Software (OSS). It is the primary Gateway for Netflix which has also been provided as open-source project. Zuul was initially developed on Servlet 2.5 which was a good gateway solution for Servlet based / blocking APIs.</p><p>Zuul has also be upgraded with its new version called Zuul 2 which was based on Netty Server supporting reactive request processing model. Below is diagram for Zuul 2 architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*aJJku-G-ksp3Ky0L8HISqg.png" /><figcaption>Figure 2: Depicting Zuul2 Gateway Architecture</figcaption></figure><p>Zuul 2 has great support for reactive programming with below features:</p><ul><li>supports rich set of filters and self-service routing — provides creating rules on any criteria in the request URL, path, query params or headers.</li><li>full support of HTTP/2 connections</li><li>Mutual TLS support — can implement TLS and secure traffic</li><li>Tracks life-cycle events of each request — events can be attached for request request and actions can be performed on events.</li><li>intelligent load-balancing — able to route around failures, slowness, GC issues to increase resiliency, availability and quality of service. It will be provided along with discovery service which keeps tracking of health of business services. 1. Cold Instances — An new instance will be routed with reduced amount of traffic for some time, until they are warmed up. 2. Detect 5xx response code and error rate from each origin services and if error rate is high, it is considered service is in trouble and taken actions to reduce traffic. 3. Zuul observes signals about service utilization and based on utilization metrics, the traffic are throttled for the overloaded service.</li><li>configurable routing — the routes can be created by YAML based configuration</li></ul><p>Below are the features which are implemented in Zuul 2 but yet to be provided as open source:</p><ul><li>Websocket and SSE support</li><li>Throttling and rate-limiting</li><li>Brownout filters — for disabling certain CPU intensive when Zuul is overloaded</li></ul><p><strong>Spring Cloud Gateway</strong></p><p>The Spring Cloud Gateway is relatively new project which has been developed under ‘<a href="https://spring.io/projects/spring-cloud">Spring Cloud</a>’ projects umbrella. It is inspired by Zuul Gateway and developed based on reactive programming on top of Spring WebFlux. It provides various features like:</p><ul><li>Rich set of predicate and filter support — provides various predicates like: path, cookie, time, header, host, method, query, remote address, weight etc. Similar to predicates, it provide number of filters like: Add/Set/Remove/Map Request/Response Headers, Set response code, Redirect, Rewrite etc. filters</li><li>Circuit breakers — supports circuit-breakers based on time and re-direct on failure</li><li>TLS &amp; SSL — TLS and SSL can be configured for Gateway and httpClient inside the Gateway</li><li>Route Metadata — Routes can be configured with metadata which further can be utilized for processing</li><li>Easy integration with discovery service and load balancing</li><li>Easy metrics with Actuator</li><li>Easy cache implementation</li></ul><p>Below diagram depicts Spring Cloud Gateway architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*bgLHnBup8lyjwF83E1If9g.png" /><figcaption>Figure 3: Spring Cloud Gateway &amp; its components depiction with request &amp; response flow</figcaption></figure><p>Follow the GitHub link for Spring Cloud Gateway Implementation in Kotlin: <a href="https://github.com/siddhivinayak-sk/kotlin-projects/tree/master/sk-gateway">https://github.com/siddhivinayak-sk/kotlin-projects/tree/master/sk-gateway</a></p><p>Let’s compare on various factors:</p><ul><li>Origin: Zuul has been developed by Netflix OSS as open-source project, very earlier with Servlet 2.5 support as Zuul 1. Now, Netflix OSS team also provided Zuul 2 which is based on Netty and support reactive model. Spring Cloud Gateway has been developed by Spring team and inspired by Zuul based on Spring WebFlux which supports reactive programming from beginning.</li><li>Filter &amp; Predicate: Both supports rich set of filters and predicates. However, there are some filters like Rate Limiter yet to be delivered by Zuul 2 as open-source.</li><li>Performance: Based on comparison and result, Zuul has respectively higher performance. <a href="https://engineering.opsgenie.com/comparing-api-gateway-performances-nginx-vs-zuul-vs-spring-cloud-gateway-vs-linkerd-b2cc59c65369">Refer link</a>.</li><li>Spring Adaptation: Since Spring Cloud itself providing a gateway, Zuul has been removed from Spring Gateway component list. Now start.spring.io is listing Spring Cloud Gateway as gateway component.</li><li>Communication technology support: WebSocket &amp; SSE support yet to be provided by Zuul 2. While Spring Cloud Gateway provides full-support for these.</li></ul><p>Apart from the above points both serves same purpose. Both can be enriched by adding custom filters, predicates and functionalities.</p><h3>Conclusion</h3><p>API Gateways are essential tool to implement cross-cutting concerns especially in micro-services based application. It provides predicate and rules based traffic routing along with additional processing capabilities.</p><p>Both Netflix OSS Zuul and Spring Cloud Gateway provide similar routing and filter support. Both (with Zuul 2) supports reactive programming model and non-blocking API calls.</p><p>Although, Zuul 2 has good support, SSE and WebSocket support yet to be provided (as per its documentation).</p><h3>References</h3><ul><li>Netflix OSS Zuul — <a href="https://github.com/Netflix/zuul">https://github.com/Netflix/zuul</a></li><li>Netflix OSS Zuul Wiki — <a href="https://github.com/Netflix/zuul/wiki">https://github.com/Netflix/zuul/wiki</a></li><li>Spring Cloud Gateway — <a href="https://spring.io/projects/spring-cloud-gateway">https://spring.io/projects/spring-cloud-gateway</a></li><li>Build a Gateway — <a href="https://spring.io/guides/gs/gateway/">https://spring.io/guides/gs/gateway/</a></li><li>Spring Cloud Gateway in Detail — <a href="https://cloud.spring.io/spring-cloud-gateway/reference/html/">https://cloud.spring.io/spring-cloud-gateway/reference/html/</a></li><li>Spring Cloud Gateway Example: <a href="https://github.com/siddhivinayak-sk/kotlin-projects/tree/master/sk-gateway">https://github.com/siddhivinayak-sk/kotlin-projects/tree/master/sk-gateway</a></li></ul><p>If you enjoyed this article, consider <a href="https://buymeacoffee.com/siddhivinayak.sk">buying me a coffee</a>. Your support helps me create and share more. ☕</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b12a1089f87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubeseal & SealedSecret: Make your ‘secrets’ secure in SCM by using ‘sealed secret’]]></title>
            <link>https://siddhivinayak-sk.medium.com/kubeseal-sealedsecret-make-your-secrets-secure-in-scm-by-using-sealed-secret-4631bcb39bf8?source=rss-356acb1877de------2</link>
            <guid isPermaLink="false">https://medium.com/p/4631bcb39bf8</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubeseal]]></category>
            <category><![CDATA[kubernetes-secret]]></category>
            <category><![CDATA[application-security]]></category>
            <category><![CDATA[sealed-secret]]></category>
            <dc:creator><![CDATA[Sandeep Kumar]]></dc:creator>
            <pubDate>Thu, 06 Oct 2022 08:27:37 GMT</pubDate>
            <atom:updated>2026-11-01T10:24:25.004Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In applications, a ‘secret’ is a sensitive data which has been used in application and it requires ‘implied level of security’ to protect the secrets for example: passwords, keys and token etc. Almost every web application needs secrets to perform business cases. From application development perspective, usually some design principal followed; most advocated design principal is “Keep low degree of coupling and high degree of cohesion” means reduce dependencies while write code among components. To adopt this design principal, the configurations are externalized from the code and kept in separate flat files called ‘configuration files’ like: YAML, properties, conf files etc. This externalization of configuration also brings idea of storing secrets apart from the code.</p><p>There are several ways of storing such secrets e.g. for Java based application ‘Key Stores’ can be used to store secrets, Key Vaults can be used in Cloud, Encrypted configurations can be used. Below are important ways to store secrets:</p><ul><li>Flat File based Configuration: It is very conventional way of storing secrets, keys in flat file based configuration files like conf, YAML, properties files etc. In this way of storing secrets are highly prone to attack as secrets are stored in plain flat file based configuration files.</li><li>Encrypted Configuration: It adds just an additional process over Flat File based configuration. The content stored in configuration file is encrypted which implements the security for secrets, keys, certs stored in configuration file. There are certain frameworks available for implementing encrypted configuration like Jsypt. <a href="https://siddhivinayak-sk.medium.com/azure-key-vault-with-java-spring-boot-and-jasypt-58f012688a2">Read more about Jsypt implementation</a>.</li><li>Keystore: Java provides a local storage of secrets, keys, certificates by using a file based secure storage mechanism called ‘keystore’. It allows to store secrets, keys, certificates very easily with keytool and Java APIs.</li><li>Key Vaults: A specialized application build only for storing secrets, keys, certificates called ‘Key Vaults’. Key Vaults are available from different vendors. Each Cloud provider has a Key Vault product which provides secure storage for secrets e.g. Azure provides ‘Azure Key Vault’. Some Vaults also supports hardware backed data encryption security mechanism (called Hardware Security Module — HSM) to provide additional security level for secrets and keys.</li></ul><p>Similar to Vaults, Kubernetes (also called K8s) also provides an object to store opaque secrets, certs and private keys. However, it is not considered much secure compared to specialized vaults because Kubernetes secrets are by default stored unencrypted in API server’s underlying data store (etcd). Anyone with API access can retrieve and modify a Kubernetes secret. Also, these secrets can be used in by different objects like Pods (by mounting to path similar to Kubernetes ConfigMap).</p><p>In Kubernetes, the objects (K8s objects like ConfigMap, Secrets, Deployment, Pod etc.) created by YAML based declarative configuration. And Source Code Management (SCM) tools like Git, SVN etc. are used to store the source codes &amp; declarative configurations (e.g. K8s YAMLs) for the application source code to maintain the version control, code sharing, release &amp; tagging. In this case, the declarative configuration (K8s YAML) for creating Kubernetes Secrets also need to be stored in SCM. This will expose the ‘secret’ to all the users who have access to code in SCM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BSWtMq8374Ajts4pvLHq6w.png" /><figcaption>Figure 1: Depicts Secret stored in SCM as declarative YAML which is used to create Secrets in K8s Cluster</figcaption></figure><p>Although, this is not problem in case of lower environments (like Development, SIT, UAT) but for higher environment like Production this also need to be protected from everyone (including developers, testers etc.). This will create a requirement of having a mechanism to protect the secrets stored in SCMs.</p><p>To solve this requirement, Bitnami Lab provides a utility called ‘SealedSecret &amp; Kubeseal’. SealedSecret / Kubeseal &amp; its use case has been discussed in subsequent section.</p><h3>About SealedSecret &amp; Kubeseal</h3><p><strong>SealedSecret &amp; Kubeseal</strong> is an extension on Kubernetes Secret by Bitnami Labs as <strong>Sealed-Secret</strong> component. It adds an additional encryption layer on secret declarative YAML configuration which then can stored to any SCM. The immediate accessor will not get the actual secret’s value by reading it.</p><p>The <strong>Sealed-Secret</strong> is installed in K8s cluster and serve the secret encryption flow. The flow is very simple, encrypt the secret and create a new K8s object called <strong>SealedSecret.</strong></p><p><strong>SealedSecret</strong>: A SealedSecret is an object in Kubernetes (available once Bitnami Labs Sealed-Secret installed) which is extension on K8s Secret and which stores encrypted Secrets.</p><p>The Kubeseal has below two major components:</p><ul><li>kubeseal Utility: It is an utility which is used for creating SealedSecret declarative YAML form K8s Secret declarative YAML. It is distributed for different OSs and used as client while creating SealedSecret YAML.</li><li>sealed-secret-controller Server-Side Component: It is a server-side component which is installed on Kubernetes cluster. Normally, it is installed in kube-system namespace but can be installed on other namespaces as well. It can be installed by using Helm. When it is installed, other K8s components are also created e.g. A K8s deployment, replicaset, service and pod.</li></ul><p>Below diagram covers the complete flow of Kubeseal / SealedSecret:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*M973W90zDWnVSasVF40rVQ.png" /><figcaption>Figure 2: Complete Flow of SealedSecret / Kubeseal</figcaption></figure><p>Below are steps involved in creating SealedSecret and store in Source Code Management (SCM) tool:</p><p>First K8s Secret declarative YAML is created -&gt; Then Kubeseal utility is used to encrypt it (it internally fetch the public key from sealed-secret-controller and encrypt the values in YAML) and create a new format called SealedSecret -&gt; This SealedSecret declarative YAML is stored in SCM.</p><p>Whenever Secret need to be created at the K8s Cluster, need to perform below steps:</p><p>The declarative YAML for SealedSecret is checked out from SCM -&gt; Create object in Cluster using kubectl create -f &lt;YAML file&gt; -&gt; A sealedsecret object is created (using kubectl get sealedsecret command, it can be enquired) -&gt; When it is created in K8s, the sealed-secret-controller decrypt the SealedSecret and create K8s Secret with original values (in decrypted form).</p><p>Since encrypted Secret values (in form of SealedSecret) stored in SCM, if anyone accessed the SCM, no problem he/she does not have the actual secret value.</p><p>Here, sealed-secret is using Public/Private key for encryption and decryption of secret values. Which is created as Secret in K8s and used in Sealed-Secret-Controller.</p><p>Additionally, the sealing key rotation is also supported in SealedSecret.</p><p>SealedSecret can also support scopes:</p><ul><li>cluster-wide — It defines the scope of sealedsecret wheresealedsecret can be used across the namespaces in cluster</li><li>namespace-wide — It defines the scope of sealedsecret where sealedsecret for namespaces. sealedsecret created for one namespace cannot be used to another namespace.</li></ul><p>The implementation has been discussed in subsequent section.</p><h3>Use Case</h3><p>To create a use case of SealedSecret &amp; Kubeseal, we need to have a Kubenetes (k8s) Cluster. If you have a full-fledged cluster then ok else can install Docker Desktop or minikube to spin off single node cluster for testing purpose. So ensure you have a cluster and kubectl installed and targeting to the cluster.</p><p><strong>Kubeseal</strong></p><p>Install the kubeseal utility from where you wanted to connect to the K8s Cluster. Ideally same machine where kubectl installed.</p><p>Kubeseal is available for multiple platforms like:</p><ol><li>Download kubeseal from <a href="https://github.com/bitnami-labs/sealed-secrets/releases/tag/v0.18.5">Link</a> which is appropriate to you machine. [<em>Note: Download latest release</em>]</li><li>Place at the path so that it can be accessible form command prompt. [<em>Note: environment variables can be used to set path</em>]</li></ol><p>Apart from binary download, it can be installed from:</p><p>Using Homebrew:</p><pre>brew install kubeseal</pre><p>Using MacPorts on MacOS:</p><pre>port install kubeseal</pre><p>Using NixPkgs on Nix environment:</p><pre>nix-env -iA nixpkgs.kubeseal</pre><p>On Linux:</p><pre>wget <a href="https://github.com/bitnami-labs/sealed-secrets/releases/download/">https://github.com/bitnami-labs/sealed-secrets/releases/download/</a>&lt;release-tag&gt;/kubeseal-&lt;version&gt;-linux-amd64.tar.gz<br>tar -xvzf kubeseal-&lt;version&gt;-linux-amd64.tar.gz kubeseal<br>sudo install -m 755 kubeseal /usr/local/bin/kubeseal</pre><p><strong>Sealed-Secret</strong></p><p>The Bitnami Labs has provided Helm package to install SealedSecret. To install SealedSecret on K8s cluster, we will be using Helm package manager.</p><p>First check the latest release of Sealed-Secret from release page: <a href="https://github.com/bitnami-labs/sealed-secrets/releases">https://github.com/bitnami-labs/sealed-secrets/releases</a></p><p>Add Bitnami Labs’s Helm chart repository to your local helm:</p><pre>helm repo add sealed-secrets <a href="https://bitnami-labs.github.io/sealed-secrets">https://bitnami-labs.github.io/sealed-secrets</a></pre><pre>helm repo update</pre><p>Install Sealed-Secret by running below Helm command:</p><pre>helm install sealed-secrets -n kube-system --set-string fullnameOverride=sealed-secrets-controller sealed-secrets/sealed-secrets</pre><p>The above command will install the Sealed-Secret. After installation, below command can be used to check the deployment status:</p><pre>helm list -n kube-system</pre><pre>or</pre><pre>helm status -n kube-system sealed-secrets</pre><p>It will show result like:</p><pre>NAME: sealed-secrets<br>LAST DEPLOYED: Thu Oct  6 12:52:20 2022<br>NAMESPACE: kube-system<br>STATUS: deployed<br>REVISION: 1<br>TEST SUITE: None<br>NOTES:<br>** Please be patient while the chart is being deployed **</pre><pre>You should now be able to create sealed secrets.</pre><pre>1. Install the client-side tool (kubeseal) as explained in the docs below:</pre><pre><a href="https://github.com/bitnami-labs/sealed-secrets#installation-from-source">https://github.com/bitnami-labs/sealed-secrets#installation-from-source</a></pre><pre>2. Create a sealed secret file running the command below:</pre><pre>kubectl create secret generic secret-name --dry-run=client --from-literal=foo=bar -o [json|yaml] | \<br>    kubeseal \<br>      --controller-name=sealed-secrets-controller \<br>      --controller-namespace=kube-system \<br>      --format yaml &gt; mysealedsecret.[json|yaml]</pre><pre>The file mysealedsecret.[json|yaml] is a commitable file.</pre><pre>If you would rather not need access to the cluster to generate the sealed secret you can run:</pre><pre>kubeseal \<br>      --controller-name=sealed-secrets-controller \<br>      --controller-namespace=kube-system \<br>      --fetch-cert &gt; mycert.pem</pre><pre>to retrieve the public cert used for encryption and store it locally. You can then run &#39;kubeseal --cert mycert.pem&#39; instead to use the local cert e.g.</pre><pre>kubectl create secret generic secret-name --dry-run=client --from-literal=foo=bar -o [json|yaml] | \<br>    kubeseal \<br>      --controller-name=sealed-secrets-controller \<br>      --controller-namespace=kube-system \<br>      --format [json|yaml] --cert mycert.pem &gt; mysealedsecret.[json|yaml]</pre><pre>3. Apply the sealed secret</pre><pre>kubectl create -f mysealedsecret.[json|yaml]</pre><pre>Running &#39;kubectl get secret secret-name -o [json|yaml]&#39; will show the decrypted secret that was generated from the sealed secret.</pre><pre>Both the SealedSecret and generated Secret must have the same name and namespace.</pre><p>Now Sealed-Secret and Kubectl installed. Next need to create SealedSecret on the K8s cluster.</p><ol><li>Create a K8s Secret declarative YAML. Run below command to create it:</li></ol><pre>kubectl create secret generic mysecret-1 --dry-run=client --from-literal=dbpassword=password -o yaml</pre><p>It will generate content which need to be saved in a YAML file:</p><pre>apiVersion: v1<br>data:<br>  dbpassword: cGFzc3dvcmQ=<br>kind: Secret<br>metadata:<br>  creationTimestamp: null<br>  name: mysecret-1</pre><p>Note: <em>Mark the value of secret in previous command, it was a literal ‘password’ but when Secret YAML is generated value is encoded in Base64. When creating manually, make sure the value is in Base64 in Secret declarative YAML.</em></p><p>2. Generate SealedSecret YAML using SecretYAML by using kubeseal utility. Below command can be run to generate SealedSecret YAML:</p><pre>kubeseal --controller-name=sealed-secrets-controller --controller-namespace=kube-system --format yaml --secret-file mysecret-1.yaml &gt; mysealedsecret-1.yaml</pre><p>Or</p><pre>kubeseal --controller-name=sealed-secrets-controller --controller-namespace=kube-system --format yaml --secret-file mysecret-1.yaml --sealed-secret-file mysealedsecret-1.yaml</pre><p>It will create a file named mysealedsecret-1.yaml with below content (the declarative YAML for SealedSecret):</p><pre>apiVersion: bitnami.com/v1alpha1<br>kind: SealedSecret<br>metadata:<br>  creationTimestamp: null<br>  name: mysecret-1<br>  namespace: default<br>spec:<br>  encryptedData:<br>    dbpassword: AgATNyCUi2FN59/bjWVc+KoWwZ97RPaYvQU/UWny02Ucjuhkrb8bC27ans9Q3eqFQwcQ3YOw5LcPA/H3tej5Bh2C+bHybkqH5uVW6I+zSQlsgsbhJ6M2aMxPC5kC0X5NFNcOjqwg7C0HNFcO5ri0y9TiTnRYKEpPNDC6aIEQPgAAzO8hxznPfjTnIZUNkHHlyIMfWTZ3fxylkDApLRkE7yyTcAkpt3ahOyOUNBu/Q6uoFRjYawFDZnzmkuCLElBnCNvXUgrEHKHLzyVXgH2eohf3H6mDqwEYw531o+qDHMd4B7UwWMQxcYajrV9GNpNxy6Or1cSNBm8D1Z4JnJCRQoMOYoh4NF+R9HxOLD24Pv8gyNQ/HFpCdimm9YKd0MlYfmgGasRFIX/q1lfTkzIhdb+J4LvQTcRkvB6JzPwB9YDGlRgSsoYBoDAMGx8Ehl2pxFymWn79A8WrfYABYFW+wo6W5xCVszr6nc1MGHwS2P+chKtRF0vpYbNW70ShO55HE8a9IlGZG6xTHtPA4WoCKvcy1TEuwuwq1KuWxzoMHSqvNbmnKB2Kj68W7+nn+sXEnJDC1h8AAUYVnnq8TUVgJUjaJ4Dc/9D6u7pdxuMl9McYfpnwSl3EGjT+CmlP6ps8AZokTKCZl+ZsBXScLrvdAZLobYeESW5UxczdBwcCVpBN9L+kmfn+E3uNVnlSNAc9hxggxW7PfQLYGQ==<br>  template:<br>    data: null<br>    metadata:<br>      creationTimestamp: null<br>      name: mysecret-1<br>      namespace: default</pre><p><strong>You can see the value has been encrypted using public key available in Cluster and it will only be decrypted by cluster so it is safe to store in SCM.</strong></p><p>Now, we have SealedSecret declarative YAML file which can be used to create SealedSecret in K8s.</p><p>3. Create SealedSecret in K8s. Run below command to create Sealed Secret in K8s:</p><pre>kubectl create -f mysealedsecret-1.yaml</pre><p>Note: <em>Sealed-Secret-Controller has been created in </em><em>kube-system namespace but </em><em>SealedSecret has been created without namespace explicitly means it has been created for </em><em>default namespace.</em></p><p>Along with SealedSecret creation in K8s, the controller also created Secret with original value.</p><p>Let’s enquire the SealedSecret by below command:</p><pre>kubectl get sealedsecret</pre><pre>Result:<br>NAME         AGE<br>mysecret-1   3m26s</pre><p>Enquire K8s Secret by below command:</p><pre>kubectl get secret</pre><pre>Result:<br>NAME         TYPE     DATA   AGE<br>mysecret-1   Opaque   1      4m16s</pre><p>Check the content of mysecret-1 K8s Secret by running below command:</p><pre>kubectl get secret mysecret-1 -o yaml</pre><p>It will result:</p><pre>apiVersion: v1<br>data:<br>  dbpassword: cGFzc3dvcmQ=<br>kind: Secret<br>metadata:<br>  creationTimestamp: &quot;2022-10-06T07:44:38Z&quot;<br>  name: mysecret-1<br>  namespace: default<br>  ownerReferences:<br>  - apiVersion: bitnami.com/v1alpha1<br>    controller: true<br>    kind: SealedSecret<br>    name: mysecret-1<br>    uid: e5606492-a8e3-449b-a9c5-9a1e27685f74<br>  resourceVersion: &quot;797829&quot;<br>  uid: 2af5efd6-d076-4ad5-91ec-b697fe8af110<br>type: Opaque</pre><p>Now this Secret can be used in application’s Pod.</p><p>Additionally, one can fetch the cert using kubeseal :</p><pre>kubeseal --controller-name=sealed-secrets-controller --controller-namespace=kube-system --fetch-cert &gt; mycert.pem</pre><p>It will generate a file named mycert.pem whcih contains Base64 version of certificate. It can also be used to generated SealedSecret from K8s secrets by using kubeseal :</p><pre>kubeseal --controller-name=sealed-secrets-controller --controller-namespace=kube-system --format yaml --secret-file mysecret-1.yaml --sealed-secret-file mysealedsecret-1.yaml --cert mycert.pem</pre><p>That’s all!</p><h3>Conclusion</h3><p>Security is a collective responsibility so each stakeholder should think by keeping security in mind. So even the source code repository is private for developers it should not contain secrets in plain text (un-encrypted).</p><p>SealedSecret is a good extension on Kubernetes Secret which make the secret’s values encrypted which can be stored easily in any Source Code Management (SCM) tool like GitHub, BitBucket, GitLab, SVN etc. Since values are encrypted and can only be decrypted by the Cluster’s sealed-secret-controller it is also possible to make source repository as public.</p><h3>Reference</h3><ul><li>SealedSecret GitHub — <a href="https://github.com/bitnami-labs/sealed-secrets">https://github.com/bitnami-labs/sealed-secrets</a></li><li>Download Kubeseal — <a href="https://github.com/bitnami-labs/sealed-secrets/releases/tag/v0.18.5">https://github.com/bitnami-labs/sealed-secrets/releases/tag/v0.18.5</a></li></ul><p>If you enjoyed this article, consider <a href="https://buymeacoffee.com/siddhivinayak.sk">buying me a coffee</a>. Your support helps me create and share more. ☕</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4631bcb39bf8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Distroless Image in Docker and Kubernetes Environment]]></title>
            <link>https://siddhivinayak-sk.medium.com/distroless-image-in-docker-and-kubernetes-environment-918aee6116dc?source=rss-356acb1877de------2</link>
            <guid isPermaLink="false">https://medium.com/p/918aee6116dc</guid>
            <category><![CDATA[distroless]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-image]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Sandeep Kumar]]></dc:creator>
            <pubDate>Thu, 29 Sep 2022 10:19:01 GMT</pubDate>
            <atom:updated>2026-11-01T10:24:40.330Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>A ‘distroless’ image is just a ‘simple containerized application image’ with <strong>slimmed Linux distribution</strong>, application runtime and application binary.</p><p>Use of ‘Distroless’ images is growing rapidly. There are various reasons being circulated as cause for getting it more popular rapidly. Some of the popular reasons are:</p><ul><li><strong>enhanced security </strong>— Images are considered more secure with distroless with lower attack surface</li><li><strong>lightweight</strong> — The distroless images are slimmed therefore it is lightweight in size</li><li><strong>cost saving </strong>— since size is less, it will require less memory to store which turned to cost saving</li></ul><p>There are many developers, architects and organization is advocating for distroless and there are many in oppose. Sharing own experience with distroless with this article.</p><h3>About Distroless</h3><p>To run application, at least below components are required:</p><ul><li>application binary with dependencies — an application may be created by choosing any programming language based on development requirement and capabilities. For example, Java with Spring Framework for creating REST based application</li><li>runtime — based on the programming language used for application development, runtime is required to run the application</li><li>operating system (OS) / containerized OS platform — an OS platform is required to host the runtime and application which either may be standalone OS or containerized OS platform based on OS image</li></ul><p>But it is fact that when an image is created, it contains not only necessary artifacts/binaries, it contains several unnecessary tools and binaries. Typically, an image looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*x06lZNaVl07cNZM9NcNa0w.png" /><figcaption>Figure 1: Typical contents of application image</figcaption></figure><p>Now, idea is to remove unnecessary artifacts and binaries to reduce the size of image and improve security.</p><blockquote><em>Let’s understand ‘how removing unnecessary artifacts &amp; binaries will improve security’?</em></blockquote><blockquote>It is very simple, more components will require more code, binaries &amp; functionalities which increase attack surface and changes of high vulnerabilities. In simple words, less code means less effort, less chances to failure, less functionality exposure which can exploit by attackers.</blockquote><p>It is too hard to remove unnecessary binaries/artifacts completely from the appli</p><p>To reduce the unnecessary artifacts/binaries, there are two ideas:</p><ul><li>Lightweight Linux Image like Alpine — Alpine Linux distribution is considered one of the lightest Linux distribution which is around 4 MB in size. There are several lightweight Linux distributions are available along with runtime as well</li><li>Distroless — a distroless is extremely slimmed Linux distribution which contains runtime and application only, nothing else. Google has introduced this term ‘distroless’ and publishing various distroless image for different runtime.</li></ul><p>Although, the both concepts are very much same and targeting to same results: lighten the image and decrease attack surface. The size is somehow also associated with loading performance, small size will definitely take less time to boot up.</p><p>A distroless image looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*FvmzTZZdW_NUSe5ecXuVgA.png" /><figcaption>Figure 2: A distroless application image</figcaption></figure><blockquote>Note: It is important to understand that size does not have direct relationship with security and vulnerabilities. It may be possible that smaller software in size may have more vulnerabilities than a bigger size software which has been written carefully by taking security concerns in mind.</blockquote><blockquote>It is also important that security issues are not identified at once. Issues are identified over the time in various situations and exploration so reducing vulnerabilities only linked with how it being fixed.</blockquote><h3>Use Case</h3><p>To use distroless, one can use ‘Google published distroless’ images as base image for the application.</p><p>There are may such distroless available for different runtime like Java, Python, Go, R etc.</p><p>To demonstrate distroless, two examples will be discussed here:</p><p><strong>Prerequisite</strong>:</p><ul><li>Docker must be available because docker is being used for creating docker image using distroless based image</li></ul><p><strong>Java disroless image</strong></p><ol><li>Create a Java file with name HelloJava.java with below content:</li></ol><pre>package examples;</pre><pre>class HelloJava {</pre><pre>public static void main(String...args) throws Exception {<br>  System.out.println(&quot;Hello Java&quot;);<br>  Thread.sleep(2000);<br>  System.out.println(&quot;Hello Java - end&quot;);<br> }</pre><pre>}</pre><p>2. Create a Dockerfile with below contents:</p><pre>FROM openjdk:11-jdk-slim-bullseye AS build-env<br>COPY . /app/examples<br>WORKDIR /app<br>RUN ls /<br>RUN javac examples/*.java<br>RUN jar cfe main.jar examples.HelloJava examples/*.class</pre><pre># FROM gcr.io/distroless/java11-debian11:latest<br>FROM gcr.io/distroless/java11-debian11:debug<br>COPY --from=build-env /app /app<br>WORKDIR /app<br>CMD [&quot;main.jar&quot;]</pre><p>3. Run below command to create docker image:</p><pre>docker build -t javaapp/hellojava:latest .</pre><p>4. To run this image run below command:</p><pre>docker run javaapp/hellojava:latest </pre><p><strong>Node distroless image</strong></p><ol><li>Create package.json with below contents:</li></ol><pre>{<br> &quot;name&quot;: &quot;docker_web_app&quot;,<br> &quot;version&quot;: &quot;1.0.0&quot;,<br> &quot;main&quot;: &quot;server.js&quot;,<br> &quot;dependencies&quot;: {<br>  &quot;express&quot;: &quot;^4.16.1&quot;<br> }<br>}</pre><p>2. Create server.js with below contents:</p><pre>const express = require(&#39;express&#39;)</pre><pre>const app = express()<br>app.get(&#39;/&#39;, (req, res) =&gt; {<br> res.send(&#39;Hello There&#39;)<br>})</pre><pre>app.listen(8080, &#39;0.0.0.0&#39;)</pre><p>3. Create Dockerfile with below contents:</p><pre>FROM node:10.17.0 AS build-env<br>ADD . /app<br>WORKDIR /app<br>RUN npm install<br>RUN npm ci --only=production</pre><pre>FROM gcr.io/distroless/nodejs<br>COPY --from=build-env /app /app<br>WORKDIR /app<br>CMD [&quot;server.js&quot;]</pre><p>4. Run below command to create docker image:</p><pre>docker build -t nodeapp/server-app:latest .</pre><p>5. To run this image run below command:</p><pre>docker run nodeapp/server-app:latest -p 8080:8080</pre><p>It will start node app on port 8080 which can be tested as curl http://localhost:8080/</p><p>These images will not have additional OS and runtime commands and binaries therefore exec will not be running even shell.</p><p>You can try below command will fail and will not launch shell:</p><pre>docker exec -ti nodeapp/server-app:latest /bin/sh</pre><p>Also, docker image size can be checked by exporting image.</p><p>These distroless images can also be deployed in Kubernetes environment without any issue.</p><h3>Conclusion</h3><p>Distroless docker images are just way to lighten the application image by removing unnecessary binaries, artifacts and functionalities.</p><p>Since unnecessary components are removed, its size will be less and attack surface will be smaller. And there is a chance for reduces vulnerabilities as well.</p><p>There are different ways to make application image lighter like using Alpine Linux distributions and similar security benefits can also be achieved with Alpine very easily therefore people are distributed in segments for ‘distroless image benefits and usages’.</p><p>May developers, architects, devsecops consider distroless beneficial but many are in oppose of it. Have worked on both type of images and can say there is no difference in both. It just way how we implement nothing else. For each ways (lightweight image and distroless image), similar size and security benefits can be achieved easily.</p><p>Additionally, felt that distroless becomes challenging while bug investigation for example, suppose traffic need to be check whether it is landing in Pod or not, it becomes tough when distroless image has been used because it does not have any tool like curl, wget, telnet client etc.</p><h3>Reference</h3><ul><li>Google Container Tools — Distroless — <a href="https://github.com/GoogleContainerTools/distroless">https://github.com/GoogleContainerTools/distroless</a></li><li>Distroless: not a solution for security — <a href="https://www.redhat.com/en/blog/why-distroless-containers-arent-security-solution-you-think-they-are">https://www.redhat.com/en/blog/why-distroless-containers-arent-security-solution-you-think-they-are</a></li><li>Which container to use — <a href="https://itnext.io/which-container-images-to-use-distroless-or-alpine-96e3dab43a22">https://itnext.io/which-container-images-to-use-distroless-or-alpine-96e3dab43a22</a></li><li>Distroless: hype or true value — <a href="https://hackernoon.com/distroless-containers-hype-or-true-value-2rfl3wat">https://hackernoon.com/distroless-containers-hype-or-true-value-2rfl3wat</a></li></ul><p>If you enjoyed this article, consider <a href="https://buymeacoffee.com/siddhivinayak.sk">buying me a coffee</a>. Your support helps me create and share more. ☕</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=918aee6116dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BusyBox: The developer’s ‘Swiss Army Knife for Embedded Linux’]]></title>
            <link>https://siddhivinayak-sk.medium.com/busybox-the-developers-swiss-army-knife-for-embedded-linux-98c312ac5843?source=rss-356acb1877de------2</link>
            <guid isPermaLink="false">https://medium.com/p/98c312ac5843</guid>
            <category><![CDATA[swiss-army-knife]]></category>
            <category><![CDATA[busybox]]></category>
            <category><![CDATA[docker-busybox]]></category>
            <category><![CDATA[linux-utilities]]></category>
            <category><![CDATA[developer-tools]]></category>
            <dc:creator><![CDATA[Sandeep Kumar]]></dc:creator>
            <pubDate>Fri, 23 Sep 2022 12:10:45 GMT</pubDate>
            <atom:updated>2026-11-01T10:25:11.352Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>When we do investigation on Unix/Linux based systems we may need various tools and utilities like ‘wget’ to make HTTP call, gzip, unzip, sed etc. In this scenario, an OS is required with these utilities, but it is heavy weight and complete OS may not be available due to environment constraint like application running in Kubernetes with Distroless images.</p><p>To make available required utilities in such restricted environment, we can use Busybox which is a single executable for several utilities. It makes developers life easy in may situation where different utilities are required.</p><h3>About BusyBox</h3><p>BusyBox is a software suit which provides various common Unix utilities as single executable. The utilities are kept lightweight compare to their full version. It has been designed specially to make BusyBox light weight and to provide complete environment of small/embedded systems.</p><p>It has been <a href="https://busybox.net/license.html">licensed under GPLv2</a> means you can use it freely and distribute with source. it has been designed modular to make it easy to include or exclude commands at compile time. So you can checkout it’s source and compile and build own BusyBox with selected/excluded components.</p><p>BusyBox provides single executable for around 300 common commands therefore the developer has dubbed it “The Swiss Army Knife of Embedded Linux” reason “Swiss Army Knife” is known for many utilities in single knife.</p><p>BusyBox is available for many Unix based systems and there are may product using it. <a href="https://busybox.net/products.html">Some of them are</a>: buildroot, OpenWrt, Zdisk, Mindi etc. It is also available as <a href="https://hub.docker.com/_/busybox">docker image</a> which can easily be run into docker environment by using below command:</p><pre>docker run -it --rm busybox</pre><pre>Note: It will open shell where you can run commands </pre><p>It has also other image variants like:busybox:uclib uclib via Buildroot, busybox:glibc glibc from Debian and busybox:musl musl from alpine.</p><p>It is also available with <a href="https://busybox.net/live_bbox/live_bbox.html">Bellard.org’s JsLinux</a> which is used to boot Linux by using Javascript for browser. One can open webpage and use the utility commands from web browser.</p><p>BusyBox is also available for Windows, one can download Busybox from <a href="https://frippery.org/files/busybox/busybox.exe">frippery.org</a> and use it on Windows machine. Place the executable into Path and run it like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0mtNSsBe9PFkbFdPyoOObw.png" /></figure><p>You can run sh on Busybox and then run commands like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ryf-nmibjDYj5bg1gjuU7g.png" /></figure><p>BusyBox is also available for Ubuntu. You can install it by running below command:</p><pre>sudo apt install busybox -y</pre><p>Once installed, run Busybox:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RYQY20SvBC1hWYBTGg--UA.png" /></figure><p>Busybox can run on Kubernetes as well. Just need to run below command:</p><pre>kubectl run -n default -i --tty busybox --image=busybox:latest -- /bin/sh</pre><p>Similarly, BusyBox is available for several platform including Android and other Unix based embedded systems.</p><p>It is just magic box for developers who are investigating systems for different reasons for finding bugs, inspecting network communication and there may be many more reasons.</p><p>Below are list of commands typically available with BusyBox:</p><pre>[, [[, acpid, adjtimex, ar, arch, arp, arping, ash, awk, basename, bc, blkdiscard, blockdev, brctl, bunzip2, bzcat, bzip2, cal, cat, chgrp, chmod, chown, chpasswd,<br> chroot, chvt, clear, cmp, cp, cpio, cttyhack, cut, date, dc, dd, deallocvt, depmod, devmem, df, diff, dirname, dmesg, dnsdomainname, dos2unix, du, dumpkmap,<br> dumpleases, echo, egrep, env, expand, expr, factor, fallocate, false, fatattr, fgrep, find, fold, free, freeramdisk, fsfreeze, fstrim, ftpget, ftpput, getopt, getty,<br> grep, groups, gunzip, gzip, halt, head, hexdump, hostid, hostname, httpd, hwclock, i2cdetect, i2cdump, i2cget, i2cset, id, ifconfig, ifdown, ifup, init, insmod,<br> ionice, ip, ipcalc, ipneigh, kill, killall, klogd, last, less, link, linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread, losetup, ls,<br> lsmod, lsscsi, lzcat, lzma, lzop, md5sum, mdev, microcom, mkdir, mkdosfs, mke2fs, mkfifo, mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more, mount, mt, mv,<br> nameif, nc, netstat, nl, nologin, nproc, nsenter, nslookup, nuke, od, openvt, partprobe, paste, patch, pidof, ping, ping6, pivot_root, poweroff, printf, ps, pwd,<br> rdate, readlink, realpath, reboot, renice, reset, resume, rev, rm, rmdir, rmmod, route, rpm, rpm2cpio, run-init, run-parts, sed, seq, setkeycodes, setpriv, setsid, sh,<br> sha1sum, sha256sum, sha512sum, shred, shuf, sleep, sort, ssl_client, start-stop-daemon, stat, strings, stty, svc, svok, swapoff, swapon, switch_root, sync, sysctl,<br> syslogd, tac, tail, tar, taskset, tee, telnet, test, tftp, time, timeout, top, touch, tr, traceroute, traceroute6, true, truncate, tty, ubirename, udhcpc, udhcpd,<br> uevent, umount, uname, uncompress, unexpand, uniq, unix2dos, unlink, unlzma, unshare, unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, w, watch, watchdog,<br> wc, wget, which, who, whoami, xargs, xxd, xz, xzcat, yes, zcat</pre><h3>Use Case</h3><p>To demonstrate Busybox, let’s install BusyBox on Ubuntu:</p><p>Use below command to install BusyBox on Ubuntu:</p><pre>sudo apt install busybox -y</pre><pre>Then run below command:</pre><pre>busybox sh</pre><p>Download Busybox executable from <a href="https://frippery.org/files/busybox/busybox.exe">Link</a> and set path from environment variable or run below command on cmd:</p><pre>set path=%path%;&lt;absolute path of directory where busybox.exe placed&gt;</pre><pre>Let&#39;s placed busybox.exe in c:\busybox then, open cmd and run below line:</pre><pre>set path=%path%;c:\busybox</pre><pre><br>Then run below command:<br>c:/&gt; busybox sh</pre><p>Run below command to run Busybox on docker:</p><pre>docker pull busybox:latest</pre><pre>docker run -it --rm busybox </pre><p>Run below command to run Busybox on Kubernetes:</p><pre>kubectl run -n default -i --tty busybox --image=busybox:latest -- /bin/sh</pre><p>Once Busybox opened command prompt like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*Fne4biUGNIKIt-wHFD7Ykg.png" /></figure><p>Run utility commands like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*DfHD0Q_SMA9E_E_3bvkG6A.png" /></figure><h3>Conclusion</h3><p>Busybox is very useful suit of utilities which can be used to various Unix based systems. It is a single component which allows you to perform various utility commands. It is very useful especially in when developers are investigating the environment while find bug causes in those cases where no full-OS versions are available like distroless image has been used for running processes.</p><p>Since it provides several utility commands as single executable, it has been dubbed as “Swiss Army Knife for Embedded Linux” by its developer. It is too useful and thus embedded with various Linux distributions.</p><h3>References</h3><ul><li>BusyBox — <a href="https://busybox.net/">https://busybox.net/</a></li><li>BusyBox Docker Official Image — <a href="https://hub.docker.com/_/busybox">https://hub.docker.com/_/busybox</a></li><li>BusyBox Source — <a href="https://git.busybox.net/busybox/">https://git.busybox.net/busybox/</a></li><li>Bellard.org — <a href="https://bellard.org/">https://bellard.org/</a></li></ul><p>If you enjoyed this article, consider <a href="https://buymeacoffee.com/siddhivinayak.sk">buying me a coffee</a>. Your support helps me create and share more. ☕</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98c312ac5843" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Kubernetes IDE: K8s Lens]]></title>
            <link>https://siddhivinayak-sk.medium.com/the-kubernetes-ide-k8s-lens-4d90a134a36b?source=rss-356acb1877de------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d90a134a36b</guid>
            <category><![CDATA[k8slens]]></category>
            <category><![CDATA[kubectl]]></category>
            <category><![CDATA[lenses]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[k8s]]></category>
            <dc:creator><![CDATA[Sandeep Kumar]]></dc:creator>
            <pubDate>Fri, 23 Sep 2022 03:30:29 GMT</pubDate>
            <atom:updated>2026-11-01T10:25:25.057Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Kubernetes (also known as k8s) is open-source system for production-grade container orchestration which automates container deployment, scaling and management of containerized application. It was designed by Google but now it is managed by Cloud Native Computing Foundation (CNCF). It orchestrate the containers’ runtime which are compliant with Container Runtime Interface (CRI) like Docker, Containerd and CRI-O. Kubernetes has been delivered for local, on-premise, private cloud and public cloud. The major cloud providers like AWS, GCP, Azure, IBM, Oracle, RetHat, VMware etc. offers Kubernetes-based platforms or Infrastructure as-a Service (IaaS) which allows to deploy Kubernetes.</p><p>Kubernetes provides two clients to manage the components deployed on Kubernetes control plane:</p><ol><li><a href="https://kubernetes.io/docs/reference/kubectl/">Kubectl CLI</a> — Kubectl is a CLI tool available for different OS like Linux, Windows and macOS. It provides a set of commands and switches to manage the K8s components e.g. to enquire running pods run kubectl -n mynamespace get pod</li><li><a href="https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/">Kubernetes Dashboard UI </a>—It is a web-based user interface which is also installed in K8s only. It provides interactive interface which can be used for information and K8s component management</li></ol><p>Although K8s already provides two ways to interact with K8s cluster to manage K8s components. But both are not very user friendly. Since Kubernetes is a complex orchestration platform which provides a huge number of features so it has a large number of commands provided by kubectl which need to remembered by the users. Similarly, the K8s Dashboard UI has limitations.</p><p>Most of the Cloud providers provide their own user interface to manage the K8s cluster like Azure provides own web-based interface which can be used to monitor and manage K8s cluster. Similarly, an independent client is also required for those users who want to manage K8s cluster from local machine with a very interactive user interface.</p><p>K8s Lens is ‘<a href="https://github.com/lensapp/lens/blob/master/LICENSE">freeware</a>’ product (Note: now, paid version also available with additional features and support) which provides a desktop application to manage the K8s cluster.</p><h3>About Lens</h3><p>K8s Lens is a desktop application available for OS like Windows, Linux, macOS. It has been offered as open-source product by <a href="https://www.mirantis.com/">Mirantis</a> and used by hundred thousands of users.</p><p>Lens provides user interface to see the cluster and its components and K8s resources.</p><p>It provides following features/resource management from GUI:</p><ol><li><strong>Cluster management </strong>— Add/modify cluster, monitor cluster</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3hQZoTukZjTlI-gcmlFyDw.png" /></figure><p>2. <strong>Node Management</strong> - Monitor, modify nodes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hOSNHQSAJDmusmhtpJqlBg.png" /></figure><p>3. <strong>Workload Management</strong> — It provides sub-menus for different workload resources like Pods, Deployments, StatefulsSets, ReplicaSets, Jobs, CronJobs. Each sub-menus provides list and monitoring of resources and can be restarted, modified easily with buttons and editors</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P056kebXazwKR2-53E8sjA.png" /></figure><p>4. <strong>Config Management</strong> —It provides sub-menus for configuration related resources like ConfigMap, Secrets, Resource Quotas, Limit Ranges, HPA etc. These resources can be monitored and modified</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j1WC0a8_ri3RF1LMxqjGPQ.png" /></figure><p>5. <strong>Network Management</strong> —It provides sub-menus for Network related resources like services, Endpoints, Ingress, Network Policies, Port Forwarding etc. It also list, monitoring and modifying user interfaces</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZBeqqb_Z8BLX-NFg8w6tJQ.png" /></figure><p>6. <strong>Storage Management</strong> —It provides sub-menus for managing storage related resources like Persistent Volume Claim, Persistent Volume and Storage class. It also provides editing and listing of resources</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QDN6EX9UxOP9ul7qJYqT6g.png" /></figure><p>7. <strong>Namespace Management</strong> — Namespaces can be listed and edited</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XQchQ5EhQ89GSl4sCh5kqw.png" /></figure><p>8. <strong>Event Management</strong> — List the events</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wp2UY84XGV_c2NKQFZ9Rog.png" /></figure><p>9. <strong>Helm Chart and Release Management</strong> — It list the available charts (based on added repositories) which can be installed, uninstalled from the user interface buttons</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iKA227b-fWe6R-kyqTuVfQ.png" /></figure><p>10. <strong>Access Control</strong> — It provides sub-menus for access control resources like services accounts, cluster roles, roles, Cluster role binding, role binding, Pod security policies</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NLnL_-mn6ehUsGaiRkY35g.png" /></figure><p>11. <strong>Custom Resource Management</strong> — It provides listing and modification of custom resources in K8s</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m7GTFqZsl95EKijIDpPv9A.png" /></figure><p>Lens provides a ‘paid’ service called ‘Team Workspace’ which can be used to create team workspace and invite and add team members. Team allows to manage cluster remotely by its members from Internet hosted service.</p><p>Additional features also provided by Mirantis as part of Lens supported products like:</p><p><strong>Lens </strong><a href="https://k8slens.dev/teamwork.html"><strong>Teamwork</strong></a><strong> </strong>— Team spaces can be created, invited team members and manage cluster very smoothly.</p><p><a href="https://k8slens.dev/security.html"><strong>Lens Security </strong></a>— It provides container image scanning and CVE scanning.</p><p><a href="https://k8slens.dev/kubernetes.html"><strong>Lens Kubernetes </strong></a>— It provides advance Kubernetes distro fully integrated with Lens</p><p><a href="https://k8slens.dev/support.html"><strong>Lens Support</strong></a> — Support for Lens services</p><h3>Use Case</h3><p>To use K8s Lens, you must have Kubernetes cluster as prerequisite.</p><blockquote>To setup Kubernetes Cluster for testing, you can download ‘Minikube’ or ‘Docker for Desktop’ and setup Kubernetes cluster.</blockquote><p>We have setup a Kubernetes Cluster using ‘Docker for Desktop’ for use case purpose. Ensure Kubernetes Cluster is accessible from the machine from where Lens to be used.</p><p>Below are the steps for Les setup and use:</p><ol><li>Download K8s Lens as per your machine from <a href="https://k8slens.dev/index.html">https://k8slens.dev/index.html</a>. It will download setup e.g. ‘Lens Setup 5.5.4-latest.20220609.2.exe’</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*maP6ZGYGoB-vKPCPS7cM6A.png" /></figure><p><strong>2.</strong> Install the download setup, Lens will be installed in your machine and you can locate Lens in programs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*sC6MMFWdiGdRRSvQt2t_wQ.png" /></figure><p><strong>3.</strong> Open Lens on desktop by clicking on it. It will open Lens window</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L5HsXwZrQLiLeGOISfsssw.png" /></figure><p>It will ask for ‘Lens ID’, create your Lens ID by clicking on link given at bottom or login with GitHub or Google account.</p><p><strong>4.</strong> After login with Lens ID, It will open menu to ‘Browse Clusters in Catalog’. It will list the clusters for which configuration is available on machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cIBWWkwjMtOL919jbcz70Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nWWTj4dRh_vCQXO1BuhmgA.png" /></figure><blockquote>Note: To connect with cluster, a configuration file ‘~/kube/config’ is created in current user directory. It contains the cluster configuration like server and key. Although, it is generated by default when ‘Docker for Desktop’ installed on machine. If you are using any other cluster, create file by yourself by providing details like server, client-certificate and client-key. In case of OIDC configuration, provide OIDC details as:</blockquote><blockquote>In case cert based authentication:</blockquote><blockquote>apiVersion: v1<br>clusters:<br>- cluster:<br> certificate-authority-data: &lt;cert auth data&gt;<br> server: <a href="https://kubernetes.docker.internal:6443/">https://kubernetes.docker.internal:6443</a><br> name: docker-desktop<br>contexts:<br>- context:<br> cluster: docker-desktop<br> user: docker-desktop<br> name: docker-desktop</blockquote><blockquote>current-context: docker-desktop<br>kind: Config<br>preferences: {}<br>users:<br>- name: docker-desktop<br> user:<br> client-certificate-data: &lt;client cert&gt;<br> client-key-data:&lt;client key&gt;</blockquote><blockquote>In case of OIDC based authentication:</blockquote><blockquote>apiVersion: v1<br>clusters:<br>- cluster:<br> insecure-skip-tls-verify: true<br> server: <a href="https://api-kube.dev22r1.sbcp.io/">https://&lt;</a>server url&gt;<br> name: mycluster<br>contexts:<br>- context:<br> cluster: mycluster<br> namespace: system<br> user: myuser<br> name: mycluster</blockquote><blockquote>current-context: mycluster<br>kind: Config<br>preferences: {}<br>users:<br>- name: myuser<br> user:<br> exec:<br> apiVersion: client.authentication.k8s.io/v1beta1<br> args:<br> - get-token<br> - --oidc-issuer-url=<a href="https://keycloak.cicd.dxp.delivery/auth/realms/sbcp-users">&lt;</a>oidc server url&gt;<br> - --oidc-client-id=&lt;client id&gt;<br> - --oidc-client-secret=&lt;client secret&gt;<br> - --oidc-extra-scope=groups<br> command: kubelogin<br> env: null<br> interactiveMode: IfAvailable<br> provideClusterInfo: false</blockquote><p><strong>5.</strong> Once cluster is selected, Lens will show all the components of cluster:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6yWVyqUDsRhjXz9lD86rLA.png" /></figure><p><strong>6.</strong> Now, click on ‘Nodes’ and click on one of the ‘node’ from node list being shown in ‘Nodes’ pane, it will start showing details and action on node:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jYrX2QDOa4u7j3a7DyDWHQ.png" /></figure><p>Similarly, you can click on each component (e.g. Config -&gt; ConfigMap, Workloads -&gt; Pods, Workloads -&gt; Deployments etc.) and see details and actions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JpJ42y10z-kOpeF39N2xiw.png" /></figure><p>The allowed actions on each component will be available as button like Edit, Delete, Close buttons.</p><p><strong>7.</strong> You can also open terminal from Lens:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AdA8G_jjism2gLouJFQ2eg.png" /></figure><p><strong>8.</strong> You can also select components and edit as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ktv9y4Sq8koHx8MwNAYAhw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dv2zwnjRlv2KaiepVzlvKg.png" /></figure><p>On clicking save button, the change will be applied.</p><p><strong>9.</strong> To create new resource, Lens provide add button, click on add button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zB4DTUTyG__7EjoYPLU1Iw.png" /></figure><p>Select the template for the resource:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MnzCQbnQFk96CWVrnGwPAw.png" /></figure><p>After modifying the values click on ‘Create &amp; Close’ to create the resource. After creating resource go to the left panel and click on the resource type to see the list of resource.</p><p><strong>10.</strong> There is a button at top for adding new cluster:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*uSx08uY54RCW2Nl4vt9hhg.png" /></figure><p>This can also be performed from left top menus:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*euHcR0Mxa7a52n0WHzCXRg.png" /></figure><p><strong>Additional features</strong>:</p><p><strong>Team Space</strong>: Team Space is a paid service which allows to create team space and adding member to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m6NQ_yX3eROOYTctWyuxZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WBAMeIEYxn1OWQC6qV1n2g.png" /></figure><p><strong>Extensions</strong>: Lens provide feature to build and add extension.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M0riUHz4eqh8nxD4HqKSXQ.png" /></figure><h3>Conclusion</h3><p>K8s Lens provide desktop application to manage K8s cluster. It provide interactive Graphical User Interface (GUI) for listing, monitoring and modifying K8s cluster resources. The applicable actions like restart, delete, edit on resources are available as button.</p><p>K8s Lens is much easy and users can manage cluster without remembering various kubectl commands. Lens is becoming popular among developers who focus on development instead giving much focus on cluster management commands. K8s Lens is provided as ‘freeware’ (as per <a href="https://github.com/lensapp/lens/blob/master/LICENSE">license file</a>) so no need any cost to bear for normal desktop based use.</p><p>It also provides paid services for easy cluster management by using Team Workspace and Support.</p><h3>Reference</h3><ul><li>K8s Lens — <a href="https://k8slens.dev/">https://k8slens.dev/</a></li><li>K8s Lens Teamwork — <a href="https://k8slens.dev/teamwork.html">https://k8slens.dev/teamwork.html</a></li><li>K8s Lens Security — <a href="https://k8slens.dev/security.html">https://k8slens.dev/security.html</a></li><li>K8s Lens Kubernetes — <a href="https://k8slens.dev/kubernetes.html">https://k8slens.dev/kubernetes.html</a></li><li>K8s Lens Support — <a href="https://k8slens.dev/support.html">https://k8slens.dev/support.html</a></li><li>K8s Lens Documentation — <a href="https://docs.k8slens.dev/main/">https://docs.k8slens.dev/main/</a></li><li>Lens GitHub Repository — <a href="https://github.com/lensapp/lens">https://github.com/lensapp/lens</a></li></ul><p>If you enjoyed this article, consider <a href="https://buymeacoffee.com/siddhivinayak.sk">buying me a coffee</a>. Your support helps me create and share more. ☕</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d90a134a36b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BitBucket: Atlassian Solution for DevSecOps]]></title>
            <link>https://siddhivinayak-sk.medium.com/bitbucket-atlassian-solution-for-devsecops-37076c0db990?source=rss-356acb1877de------2</link>
            <guid isPermaLink="false">https://medium.com/p/37076c0db990</guid>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[bitbucket]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[devops-practice]]></category>
            <dc:creator><![CDATA[Sandeep Kumar]]></dc:creator>
            <pubDate>Thu, 22 Sep 2022 04:33:30 GMT</pubDate>
            <atom:updated>2026-11-01T10:25:52.018Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>DevSecOps is a set of software development practices which involves the security practices along with DevOps practices which defines software development life-cycle activities to deliver robust and secure software delivery. It is getting popularity among developer communities along with Agile based software development and life cycle management. Due to increasing risk of security, it is very good idea to introduce the security practices along with DevOps activities. It is much beneficial in several manner and give a thought of “Design by Security” to the software architects. <em>[a brief introduction of DevSecOps]</em></p><p>Since the development activities are being evolved with time and technological advancement, the underlying tools used to ‘support’ and ‘perform’ development practices are also being strengthen. Typically, to perform each practice, there are tools and software available which allow to perform one or two activities only. Therefore multiple ‘tools and software’ are required during entire software life-cycle, which will require management and maintenance cost for practice tools itself &amp; it makes software development costly in terms of time, effort, physical resources.</p><p>For example, Atlassian provides JIRA for project management and issue tracking, Confluence for documentation, BitBucket for Source Code Management (SCM), Bamboo for developing CI/CD pipeline, Crucible for code review and so. So basically, there is buffet of products for various tools used while software development. And, it requires complete set of tools and platform even if you have to develop respectively small software projects. This create a need for single platform which provide tools and feature to perform complete DevOps/DevSecOps practices along with project management.</p><p>Many software vendors are working to enrich and make a single platform to provide most/all ‘needs’ of the software development &amp; maintenance activities. Example of such platforms are: GitHub, GitLab etc. from different vendors.</p><p>Similar to other vendors, Atlassian is also evolving its BitBucket product to make it single platform for DevSecOps similar to GitHub or GitLab to become competitive in market. However, Atlassian is little late in game and still using JIRA for project management and issue tracking from BitBucket.</p><h3>About BitBucket</h3><p>BitBucket is a product by Atlassian. It is a Git based Source Code Management (SCM) tool with enhance features with DevSecOps pipeline and Project &amp; Issue management with help of Atlassian JIRA product.</p><p>BitBucket was originally developed by an independent organization which later acquired by Atlassian in 2016. Originally, BitBucket didn’t have pipeline feature but Atlassian is enriching with features to make it competitive in market with other modern DevSecOps platform like GitLab and GitHub.</p><p>Atlassian offers two type of hosting for BitBucket:</p><ul><li>Internet hosted service (BitBucket Cloud) — Atlassian offers Internet hosted Software as-a service (SaaS) based offering. It provides ‘free’ with limited features and usage. Its ‘paid’ version is available for enterprises use</li><li>OnPrem hosted (BitBucket Server)—Atlassian offers on-premise hosting of BitBucket</li></ul><p>Although, BitBucket is evolving, but still it does not provide rich features like GitLab alone. Some features are provided with help of Atlassian products like JIRA. Also, Atlassian market it as “<a href="https://bitbucket.org/product">Code &amp; CI/CD, optimized for teams using Jira with best-in-class Jira Integration</a>” which clearly means that it does not provide some feature alone, it need to be integrated with JIRA.</p><blockquote>Atlassian allows to create account and use BitBucket. If you have already account then open URL (<a href="https://id.atlassian.com/login?application=bitbucket">https://id.atlassian.com/login?application=bitbucket</a>) for BitBucket. In case you don’t have Atlassian account, then create account by following URL (<a href="https://id.atlassian.com/signup?application=bitbucket">https://id.atlassian.com/signup?application=bitbucket</a>).</blockquote><p>BitButcket provides below features (at time of publishing of this article):</p><ol><li><strong>Project </strong>—A project is container for repositories in BitBucket. A microservice based eStore project can be arranges as:</li></ol><pre>eStore                         # BitBucket project<br>  - customer service           # BitBucket repository<br>  - product service            # BitBucket repository<br>  - order service              # BitBucket repository<br>  - billing service            # BitBucket repository</pre><p>To create a project in BitBucket, need to click on Create -&gt; Project button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/196/1*9FfYHNy54KnvQzuivg5RLA.png" /></figure><p>Fill the details like project name, key and click on ‘Create Project’ button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*wbjkBVB64G8AxPNfZECXLA.png" /></figure><p><em>Note: Atlassian uses Workspace concept for handling multi-tenancy so any project must be created in workspaces. A default workspace is created while creating account for Atlassian.</em></p><p>Once project is created, you can browse projects by clicking on Project menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*U1hfWOjEIjGL3pHzLg8DMg.png" /></figure><p>2. <strong>Repository</strong> — BitBucket Repository is Git based Source Code Management (SCM) tool where branches can be created and source code can be committed in repository.</p><p>It provides several features along with like Pull Request (PR) and reviews using attractive user interface.</p><p>The pipeline is also provided here with repository just similar to GitHub and GitLab using declarative YAML pipeline definition.</p><p>Below are major features of BitBucket Repository:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*bfqWMBP6y0RnQORYjUfVIw.png" /></figure><p><strong>Source</strong> — ‘Source’ menu provides feature for browsing files in repository</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V13Rq7gcukAfUeE1nb4x_Q.png" /></figure><p><strong>Commits</strong> — It list commits in repository</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1YrzYxdA_Q10OkXSu9mblQ.png" /></figure><p><strong>Branches</strong> — It list repository branches</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X5LR24Antvme70Jy-pzYIQ.png" /></figure><p><strong>Pull Requests(PR)</strong> — It provides features for PR creation, review and merge</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*whjfsEzvjzfzY9ckRtj-hw.png" /></figure><p><strong>Pipelines</strong> — It provides DevSecOps pipeline execution list. It provide details of execution and after drill-down logs and artifacts can be downloaded</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ve9DdDMvbB82ZI3HS1Q-yg.png" /></figure><p><strong>Deployment</strong> — It provides deployment tracking to the configured deployment environments</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tOnF5F-gp6rIJ2q_ZmJqHQ.png" /></figure><p><strong>Jira Issues</strong> — BitBucket integrates with Jira Issue tracking</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g8mHCxTlxy20XUohqeQ1iQ.png" /></figure><p><strong>Security</strong> — You can configure security tools like Sync and other security tool integration to added Security scanning for the repository</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QUYyGF5oAOgejVeXwB-rzw.png" /></figure><p><strong>Downloads</strong> — It provides an ancillary module for large file download and upload. Also lists the tags for the repository</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wnJ3UECg0gyo1b6f0-624Q.png" /></figure><p><strong>Settings</strong> — It provides settings for the repository</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6z6uz7aBlmA4wDcn7bOvjQ.png" /></figure><p>3. <strong>Snippet</strong> — Snippets are code small block mainly used for reference purpose in documentation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/202/1*Ggnay1HOHPVLBIP9Lpebyg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*T-AuniVHqjquDWI_lzDwOg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XorbTLafPpaD6_Tk3AYj9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tLDry7bkj1Fkh7JktyEioQ.png" /></figure><p>4. <strong>Pipeline</strong> — It’s new feature added by Atlassian in BitBucket to introduce the DevSecOps pipeline with BitBucket.</p><p>The pipeline is create by using declarative YAML based configuration and stored in same repository with filename ‘bitbucket-pipelines.yml’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9GLfdk_1X0wo2jgAlbd_uQ.png" /></figure><p>BitBucket provides basic editor for pipeline editing which allows editing the YAML along with steps adding via user interface component. User can list down available components and add into pipeline YAML.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l9WBGqdWhyTU5Ixs6F0gmA.png" /></figure><p>We will create a pipeline in Use case section.</p><h3>Use Case</h3><p>BitBucket provides pipeline which can be created using declarative YAML configuration and store the YAML in same repository with filename ‘bitbucket-pipelines.yml’.</p><p>To demonstrate, we first create a Java based project using following tech-stack as prerequisite:</p><ul><li>Java as programming language</li><li>Spring Boot as framework</li><li>Maven as Build Tool</li></ul><p>The code has been committed to the repository: <a href="https://bitbucket.org/my-sk-projects/product-service">https://bitbucket.org/my-sk-projects/product-service</a></p><p>Now, need to create a pipeline. For this, click on Pipeline button available in left menu strip:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6pTe4aYx3p5FsAIpZjlOng.png" /></figure><p>In right side pane, there is tag ‘Configure’, under this click on ‘change the template’ drop-down and select ‘Build a Maven Project’. It will generate pipeline in YAML editor pane like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tXv1VHHTiL6GreAkjaeViw.png" /></figure><pre>#  Template maven-build<br><br>#  This template allows you to test and build your Java project with Maven.<br>#  The workflow allows running tests, code checkstyle and security scans on the default branch.<br><br># Prerequisites: pom.xml and appropriate project structure should exist in the repository.<br><br>image: maven:3.8.3-jdk-11<br><br>pipelines:<br>  default:<br>    - parallel:<br>      - step:<br>          name: Build and Test<br>          caches:<br>            - maven<br>          script:<br>            - java -version<br>            - mvn -B verify --file pom.xml -X<br>          after-script:<br>              # Collect checkstyle results, if any, and convert to Bitbucket Code Insights.<br>            - pipe: atlassian/checkstyle-report:0.3.0<br>      - step:<br>          name: Security Scan<br>          script:<br>            # Run a security scan for sensitive data.<br>            # See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&amp;category=security<br>            - pipe: atlassian/git-secrets-scan:0.5.1</pre><p>Commit the file. It will save file in repository and invoke pipeline which can be seen in ‘Pipelines’ menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wPQdwVvkdoF5jDcSps0MJw.png" /></figure><p>Pipeline may be pass/fail. Details can be seen when execution is clicked:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qVUyMvqQOi6ki9KvY6upWA.png" /></figure><p>It will show logs on user interface and allows to download logs and artifacts of the pipeline.</p><p>BitBucket pipelines are quite easy to learn and extend its capability.</p><h3>Conclusion</h3><p>Atlassian is also improving its BitBucket product with DevSecOps pipeline creation and running the pipeline. Although, it is not enough provide functionality (at the time of writing article) similar to other platforms like GitHub or GitLab but it is provide easy integration with other tools like Issue tracking with Atlassian Jira.</p><p>BitBucket is provide commercial product for repository service and enhancing with DevSecOps capability will increase its acceptance as it will compete with other similar products in market.</p><p>Hopefully, Atlassian will enhance it more to provide complete set of features to make it single platform for all DevSecOps practices and project management &amp; issue tracking.</p><h3>References</h3><ul><li>BitBucket — <a href="https://bitbucket.org/product">https://bitbucket.org/product</a></li><li>BitBucket Login — <a href="https://id.atlassian.com/login?application=bitbucket">https://id.atlassian.com/login?application=bitbucket</a></li><li>Sign Up for Atassian Account — <a href="https://id.atlassian.com/signup?application=bitbucket">https://id.atlassian.com/signup?application=bitbucket</a></li><li>DevSecOps New Players — <a href="https://siddhivinayak-sk.medium.com/devops-devsecops-new-players-gitlab-ci-cd-github-actions-bitbucket-pipelines-80daf1a2ef0b?source=user_profile---------4----------------------------">https://siddhivinayak-sk.medium.com/devops-devsecops-new-players-gitlab-ci-cd-github-actions-bitbucket-pipelines-80daf1a2ef0b</a></li><li>DevOps — <a href="https://siddhivinayak-sk.medium.com/continuous-integration-continuous-deployment-ci-cd-with-jenkins-sonarqube-nexus-docker-and-45a309bde131?source=user_profile---------5----------------------------">https://siddhivinayak-sk.medium.com/continuous-integration-continuous-deployment-ci-cd-with-jenkins-sonarqube-nexus-docker-and-45a309bde131</a></li><li>BitBucket Use Case Example — <a href="https://bitbucket.org/my-sk-projects/product-service">https://bitbucket.org/my-sk-projects/product-service</a></li></ul><p>If you enjoyed this article, consider <a href="https://buymeacoffee.com/siddhivinayak.sk">buying me a coffee</a>. Your support helps me create and share more. ☕</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37076c0db990" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GitLab: A DevSecOps Platform]]></title>
            <link>https://siddhivinayak-sk.medium.com/gitlab-a-devsecops-platform-ebacbf8d16cf?source=rss-356acb1877de------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebacbf8d16cf</guid>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[devops-practice]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Sandeep Kumar]]></dc:creator>
            <pubDate>Wed, 21 Sep 2022 10:37:21 GMT</pubDate>
            <atom:updated>2026-11-01T10:26:06.922Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>DevSecOps is a set of software development practices which involves the security practices along with DevOps practices which defines software development life-cycle activities to deliver robust and secure software delivery. It is getting popularity among developer communities along with Agile based software development and life cycle management. Due to increasing risk of security, it is very good idea to introduce the security practices along with DevOps activities. It is much beneficial in several manner and give a thought of “Design by Security” to the software architects.</p><p>Since the development activities are being evolved with time and technological advancement, the underlying tools used to ‘support’ and ‘perform’ development practices are also being strengthen. Typically, to perform each practice, there are tools and software available which allow to perform one or two activities only. Therefore multiple ‘tools and software’ are required during entire software life-cycle, which will require management and maintenance cost for practice tools itself &amp; it makes software development costly in terms of time, effort, physical resources. For example, suppose using conventional tool for DevOps practices then, SVN is required for Source Code Management (SCM), then build tool, pipeline automation tool like Jenkins/Hudson, Project management tool, issue &amp; bug tracking tool and so on. Hence, it requires complete set of tools and platform even if you have to develop respectively small software projects. This create a need for single platform which provide tools and feature to perform complete DevOps/DevSecOps practices along with project management.</p><p>Many software vendors are working to enrich and make a single platform to provide most/all ‘needs’ of the software development &amp; maintenance activities. Example of such platforms are: GitHub, BitBucket etc. from different vendors. GitLab is also a similar platform which offers various features for supporting and performing development practices in compliance with DevSecOps practice set. It can be used as a robust platform for source code management along with DevSecOps automation platform.</p><h3>About GitLab</h3><p>GitLab is a popular DevOps software platform that provides ability to perform DevOps practices like SCM, create &amp; run build pipeline, secure and operate software using single GitLab platform. GitLab has been developed by GitLab Inc. which is a ‘open-core’ model organization.</p><p>GitLab provides following hosting approaches:</p><ul><li>Internet Hosted Service — GitLab provides internet hosted software as-a service (SaaS) which can be used ‘free’ (based on consumption limitation) and ‘paid’ based upon various pricing model. One can sign-up and create project, repositories and build pipeline very easily. You can follow link for Sign Up (register user) or login if you have already account: <a href="https://gitlab.com/users/sign_in">https://gitlab.com/users/sign_in</a></li><li>On-Premise Hosted—GitLab provides official packages for different Linux OS to install it on-premise. E.g. Ubuntu, OpenSuse Cent, Debian etc. Apart form Linux deployment packages, GitLab also provides Docker, Kubernetes and Helm based deployment artifacts. You can follow link for deployment packages: <a href="https://about.gitlab.com/install/">https://about.gitlab.com/install/</a></li><li>Cloud Hosted — GitLab also provides deployment packages for different cloud vendors like Azure, AWS, GCP from marketplaces.</li></ul><p>GitLab provides rich set of features which helps to perform the DevSecOps practices along with project management. Below are high-level list of features offered by GitLab:</p><blockquote>Note: To work on GitLab, you can login if you have account else create account on GitLab. It is free for basic uses with some feature &amp; use limitation. The paid subscriptions provides full features. Please follow the link (<a href="https://gitlab.com/users/sign_in">Sign in · GitLab</a>) for Sign Up (register) / Login.</blockquote><ol><li><strong>Group / Sub-Group </strong>— A group can contain another Group or Project/Repository. It is used to maintain the hierarchical order of Project/Repository placement.</li></ol><p>Example, suppose there is microservice based development project for eStore then possible group and project would be:</p><pre>eStore                    # root group<br>  - customer service      # customer management service project<br>  - order service         # order management service project<br>  - product service       # product management service project<br>  - billing service       # billing management service project</pre><p>First need to create a group:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*KqgMV6aNPwYBmvlPpgSq4A.png" /></figure><p>Click on ‘New group’, it will open a page to select ‘create group’:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Aqidl_O2tRmeCWvJjJEORg.png" /></figure><p>Provide the details like group name, visibility level, role, email, members (for testing purpose, only provide group name and create it):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*NPA2LHdXUS7eykey4aj6ig.png" /></figure><p>Once created, it can be opened, searched form menu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/344/1*KunGnuIoCeGB6k-Oad0lCg.png" /></figure><p>A group may contain:</p><ul><li>Group Information — It has sub-menus to list activity, labels and members</li><li>Issues — It has issue list, Board and Milestone</li><li>Merge Requests — Group can show merge request for sub-groups/projects.</li><li>Security — Settings for security policy</li><li>CICD — CICD pipelines created for projects under group</li><li>Packages and Registries — Package and registries created for projects under the group</li><li>Settings — Settings for the group</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*hBxHxJbFHE9x3XeGK76t5g.png" /></figure><p>2. <strong>Project / Repository </strong>—GitLab provide Git based Source Code Management (SCM) where centralized repository is created and developers create branches and commit their code.</p><p>GitLab provide approach of one repository for one project so GitLab call it ‘Project/Repository’. It is created under some group to place the ‘project/repository’ hierarchal.</p><p>To create ‘project/repository’, click on ‘New project/repository’:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/232/1*xnAYqoo7HBOA5HgstfpbSQ.png" /></figure><p>It will open a page for create new project:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CHjtsmuv7nJhGpixFicriQ.png" /></figure><p>Project can be created from scratch by using ‘Create blank project’ button else it provides import project, create from another project as template and create project by using command line provided by GitLab. You can create a blank project if you don’t want to use any template:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n1Wm14wSdIGcdUQ98ebuOg.png" /></figure><p>Provide the project name and create project by clicking the button.</p><p>Once project is created it can be searched or opened from the main menu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*JNPlp6GL6QsQ9oxiHeVxtg.png" /></figure><p>A project may contains following sub-features:</p><ul><li>Project Information — It shows the activities of project, labels and members</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*leKtI71paGgAPi25-BOsFQ.png" /></figure><ul><li>Repository — Repository provides user interface and menus for SCM. It contains sub-menus like: Files, Commits, Branches, Tags, Contributors, Graph, Compare</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qoQ_qwK0Bp4jO2kSTvIb0g.png" /></figure><ul><li>Issues- Issues provides complete issue management features with sub-menus to List issues, Boards, Service Desks, Milestones</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6kMbV9mgYxtsFamVXSee2Q.png" /></figure><ul><li>Merge Requests- When one branch code is to be merged to another branch, a Merge Request (MR) is created (it is similar to PRs in GitHub). It provides review feature while merging, the review can leave review comment, approve / reject MR</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fkOmXrXTZ0iCSbcfChqsvw.png" /></figure><ul><li>CI/CD — GitLab provides powerful CI/CD pipeline creation using declarative YAML based configuration. The pipeline can be run from here and run details can be obtained</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uaE5j7PnttolqwQOlTJQ0w.png" /></figure><ul><li>Security and Compliance-It is used to apply security policies on project. It provide sub-menus for security configuration, audit events</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OhmMeSJ8fk0VMrMC-3ilsA.png" /></figure><ul><li>Deployment — This menu provides feature for release, the repository can create release. It also provide feature for creating Environment for deployment. The Release Notes can also be created here with ‘Releases’ sub-menu</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vtxrNICLCscg7LiZbFqW5Q.png" /></figure><ul><li>Package and Registries- The package registries can be added here so that after build packages can be added into registries</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pw5wnWAoGg3IhTNWud9DIw.png" /></figure><ul><li>Infrastructure-GitLab provides integration with Kubernetes, Terraform and Google Cloud. The existing deployment environments can be connect for deployment</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sZHzfiq-5DrcXergeWyakg.png" /></figure><ul><li>Monitor- Monitor provides various metrics, Error Tracking, Alerts and Incidents for the project</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bLZa0LLHmqpNUGBG5jMK1Q.png" /></figure><ul><li>Analytics -Analytics provide various charts and reports which can be utilized for reporting purpose</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2YW63lgDwJYvdl7a8dzEQw.png" /></figure><ul><li>Wiki-GitLab provide documentation feature as Wiki. One can create and manage wiki pages here</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_cMtvSnygvP1gpmJ002oKg.png" /></figure><ul><li>Snippet-New snippet in project created for documentation purpose</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oY6RVpXp_EBkkmde6I-PUA.png" /></figure><ul><li>Settings-Settings for project and repositories.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/208/1*-RaHhcRYFBSBaJ_SBKQPXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S3trrTo5EJzZJWRGz8Fw_g.png" /></figure><p>3. <strong>Snippets </strong>— A code snippet is ‘block’ of code added for some reference or documentation purpose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ckcpcW2JKS0Juee1PLIOeQ.png" /></figure><p>4. <strong>GitLab CICD Pipeline </strong>— GitLab CICD pipeline are created using declarative YAML configuration (similar to GitHub Action). It can be used to create complex pipeline with various stages and tasks. These pipelines can be run adhoc/scheduled/conditional.</p><p>The pipeline configuration are much rich and allows to create complex pipeline with various ready-made and custom components. It’s rich features and supports provide easy development of DevSecOps pipelines for various programming languages and build tools.</p><p>The pipeline feature can be seen under Group/Project/Repository menu from here, pipeline can be triggered and checked for its status.</p><p>The detailed pipeline development will be covered in subsequent section.</p><h3>Use Case</h3><p>GitLab is very rich platform and continuously being enriched with new features. It provides a single platform which cover project management, issue &amp; incident management, release management, source code management, DevSecOps pipeline creation and run.</p><p>We need to create a project which can be added into GitLab and CI/CD created in GitLab. To demonstrate we need a project as prerequisite, therefore we created one microservice using:</p><ul><li>Java as programming language</li><li>Spring boot as framework</li><li>Maven as build tool</li><li>Docker as packing tool</li></ul><p>URL: <a href="https://gitlab.com/springapplicationgroup/springfirstproject">https://gitlab.com/springapplicationgroup/springfirstproject</a></p><p>Once, project created, commit the Java project into GitLab repository:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_ZlrYLgmR5Gl1AOUHy0VzQ.png" /></figure><p>To create GitLab CI/CD pipeline, click on ‘CI/CD’ -&gt; ‘Editor’ menu which is being shown left side:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*cyaOa83k7utH6MCJ2AZCqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0tj8iQjCEoI5A4ko4osYGQ.png" /></figure><p>Click on ‘configure pipeline’, it will open an special editor called ‘Pipeline Editor’ with default pipeline script as YAML file which can be modified as per the need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*EB4ViBKSqUpm9rRBio0EjA.png" /></figure><p>The ‘Pipeline Editor’ provides YAML editor, Visualization of pipeline, Validate pipeline, View Merged Pipeline:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*-E7fM8mJoaEW1CrsnbGAGg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*AQTMtQuS8cJT5GXbOas-Ug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q55Od0ZfXhkhztwqphm-Sw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*RfhotT5cfncScpNjIjUOiw.png" /></figure><p>Add the below configuration in Editor (remove default YAML content):</p><pre>variables:<br>  MAVEN_OPTS: &quot;-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true&quot;<br>  MAVEN_CLI_OPTS: &quot;--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true&quot;</pre><pre>image: maven:3.3.9-jdk-8</pre><pre>cache:<br>  paths:<br>    - .m2/repository</pre><pre>stages:<br>  - test<br>  - build<br>  - deploy</pre><pre>.verify: &amp;verify<br>  stage: test<br>  script:<br>    - &#39;mvn $MAVEN_CLI_OPTS verify&#39;<br>  except:<br>    variables:<br>      - $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH</pre><pre>verify:jdk8:<br>  &lt;&lt;: *verify</pre><pre>test:<br>  stage: test<br>  script:<br>  - &#39;mvn $MAVEN_CLI_OPTS test&#39;<br>  only:<br>  - master</pre><pre>mvn-build:<br>  stage: build<br>  script:<br>  - &#39;mvn $MAVEN_CLI_OPTS clean compile package&#39;<br>  artifacts:<br>    #untracked: true<br>    paths:<br>      - target/csm-0.1.jar<br>  only:<br>  - master<br>  dependencies:<br>     - docker-build</pre><pre>docker-build:<br>  image: docker:latest<br>  stage: build<br>  services:<br>    - docker:dind<br>  before_script:<br>    - docker version<br>  script:<br>    - ls<br>    - docker build --pull -f dockerfile -t &quot;bankapp/csm:latest&quot; .<br>    - docker tag &quot;bankapp/csm:latest&quot; &quot;hub.docker.io/bankapp/csm:latest&quot;<br>    - docker save -o &quot;bankapp_csm_latest.img&quot; &quot;hub.docker.io/bankapp/csm:latest&quot;<br>    - docker tag &quot;hub.docker.io/bankapp/csm:latest&quot; &quot;registry.gitlab.com/springapplicationgroup/springfirstproject&quot;<br>  rules:<br>    - if: $CI_COMMIT_BRANCH<br>      exists:<br>        - dockerfile<br>  needs: [&quot;mvn-build&quot;]<br>  artifacts:<br>    paths:<br>      - bankapp_csm_latest.img</pre><pre>production:<br>  stage: deploy<br>  script:<br>  - &#39;mvn $MAVEN_CLI_OPTS package&#39;<br>  artifacts:<br>    paths:<br>      - target/csm-0.1.jar<br>  only:<br>  - master</pre><p>It will create pipeline as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*TYS_w_MOFKB87Z7PHALAVA.png" /></figure><p>Now commit it. A new pipeline file is created with name ‘.gitlab-ci.yaml’.</p><p>Once commit completed, it automatically invoke the Pipeline (manual pipeline trigger can also be performed) which we can see under ‘CI/CD -&gt; Pipelines’:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cH9sc8_gUrpTuOMqu4KBKA.png" /></figure><p>Click on ‘Failed’ or ‘Passed’ button to see details about the pipeline execution:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*__sKRIVInFWeI9E_Sf5NBQ.png" /></figure><p>Click on each step to see logs like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cA22tJDUsciajG5nD2-fTg.png" /></figure><p>The artifacts and logs can also be downloaded / browsed (based on configuration) from right side menus:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g4ZRMAf-T6qEhCY2fNei-Q.png" /></figure><p>These pipeline can run on custom runners which can also be configured. If we see the YAML pipeline, it has variable, default image, the steps for build, test, package etc.</p><p>The pipeline capabilities are too rich in GitLab and can be created more complex pipeline, sub-pipelines, dependent pipelines based on need. It provide improved security by providing various dependency and security scanning tool integration.</p><h3>Conclusion</h3><p>GitLab is a powerful platform which provides a single platform for complete DevSecOps practices. It is quite easy to learn and manage projects without having mess of multiple tools used for different activities.</p><p>It provide wide range of programming language and build tool support for pipeline creation with rich set of declarative commands. GitLab pipeline also provides a good <a href="https://docs.gitlab.com/ee/ci/pipelines/">documentation</a> so that new users can easily learn.</p><p>Since it will require single platform, time, effort and cost can be saved which are required in conventional mechanism of DevSecOps pipeline creation using Jenkins and other tools.</p><h3>References</h3><ul><li>GitLab — <a href="https://gitlab.com/">https://gitlab.com/</a></li><li>About GitLab —<a href="https://about.gitlab.com/">https://about.gitlab.com/</a></li><li>Install GitLab on-prem — <a href="https://about.gitlab.com/install/">https://about.gitlab.com/install/</a></li><li>DevOps — <a href="https://siddhivinayak-sk.medium.com/continuous-integration-continuous-deployment-ci-cd-with-jenkins-sonarqube-nexus-docker-and-45a309bde131?source=user_profile---------4----------------------------">https://siddhivinayak-sk.medium.com/continuous-integration-continuous-deployment-ci-cd-with-jenkins-sonarqube-nexus-docker-and-45a309bde131</a></li><li>DevOps new players — <a href="https://siddhivinayak-sk.medium.com/devops-devsecops-new-players-gitlab-ci-cd-github-actions-bitbucket-pipelines-80daf1a2ef0b?source=user_profile---------3----------------------------">https://siddhivinayak-sk.medium.com/devops-devsecops-new-players-gitlab-ci-cd-github-actions-bitbucket-pipelines-80daf1a2ef0b</a></li><li>GitLab Use Case — <a href="https://gitlab.com/springapplicationgroup/springfirstproject">https://gitlab.com/springapplicationgroup/springfirstproject</a></li><li>GitLab Pipeline Documentation — <a href="https://docs.gitlab.com/ee/ci/pipelines/">https://docs.gitlab.com/ee/ci/pipelines/</a></li></ul><p>If you enjoyed this article, consider <a href="https://buymeacoffee.com/siddhivinayak.sk">buying me a coffee</a>. Your support helps me create and share more. ☕</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebacbf8d16cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GitHub: A DevSecOps Platform]]></title>
            <link>https://siddhivinayak-sk.medium.com/github-a-devsecops-platform-fdeaf1411221?source=rss-356acb1877de------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdeaf1411221</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Sandeep Kumar]]></dc:creator>
            <pubDate>Tue, 20 Sep 2022 12:01:34 GMT</pubDate>
            <atom:updated>2026-11-01T10:26:21.509Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>The software development involves various tasks which need to be automated to minimize the human effort and increase the software quality. There are several methodologies and practices available which evolves with time and followed while software development.</p><p>Currently DevSecOps is most popular practices getting popularity among developer communities along with Agile based software development and life cycle management. The DevSecOps is just combination or introduction of security practices along with <a href="https://siddhivinayak-sk.medium.com/continuous-integration-continuous-deployment-ci-cd-with-jenkins-sonarqube-nexus-docker-and-45a309bde131">DevOps</a> practices. Due to increasing risk of security, it is very good idea to introduce the security practices along with DevOps. It is much beneficial in several manner and give a thought of “Design by Security” to the software architects.</p><p>Along with time, the software and tools being used in DevOps are also being revisited for enhanced features from cost, performance, monitoring and maintenance perspectives. There are various giant players are available who are strengthening the DevOps/DevSecOps practices with a ready made solutions as a platform. GitHub is also a similar platform which offers various features for developers to build a robust platform for source code management along with DevSecOps automation platform.</p><h3>About GitHub</h3><p><a href="https://github.com/">GitHub</a> is an open source software development project which provides Source Code Management (SCM) and version control using <a href="https://git-scm.com/">Git</a> along with powerful platform DevSecOps automation using CICD pipeline.</p><p>GitHub has been become subsidiary of Microsoft since 2018 and has been enhanced more to increase support of Azure Cloud. It offers both ‘free’ public / private repositories along with ‘paid’ enterprises solutions for software developments.</p><p>GitHub has become largest source code repository host in November 2021. In June 2022, GitHub reported 200 million repositories include 28 million public repositories and 83 million developers using the GitHub.</p><p>GitHub provides complete platform for project, iteration and issue management, SCM, DevOps/CICD pipeline, delivery and release management, wiki for documentation, IAM solution and so on.</p><p>GitHub is available in two forms:</p><ol><li>Self hosted — GitHub is open source project, one can download and on own infrastructure. It is available for <a href="https://desktop.github.com/">Windows</a> and <a href="https://central.github.com/deployments/desktop/desktop/latest/darwin">Mac</a>. You can download and install.</li><li>Internet Hosted Service — GitHub is provided as Internet Hosted Service with URL https://github.com</li></ol><blockquote>Before doing any further steps in GitHub, you must have an account in GitHub if you using ‘github.com’. Create GitHub account by opening <a href="https://github.com/signup">GitHub sign up</a> page. If you have already a GitHub account, login in GitHub.</blockquote><p>Below are major features offered by GitHub:</p><ol><li><strong>Organization management </strong>— Create, manage organization in GitHub to manage the projects. An organization, means it may have project, repositories and teams.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/208/1*Pt53LzUvr2ej04ueG1Sgtg.png" /></figure><p>It will prompt for plan, you can choose plan based upon need. For learning perspective you can select free plan. A new page will be displayed asking organization name and email. Provide the details and create organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*YFha07g6P8ww3eI2CIKAyw.png" /></figure><p>Once organization will be created, it will look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oKd7KRAQueEjpKCPzjTWaA.png" /></figure><p>Where you can create repositories, projects, packages, teams and add/remove people.</p><p>2. <strong>Project Management </strong>— A project can be created, managed project and items and view under it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/199/1*12DeOIxaCkZWijoTtAGToQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Ddvei5EKKuhKc5XnW3FIA.png" /></figure><p>3. <strong>Repository Management </strong>— You can create and manage SCM (Source Code Management) repositories to store the source code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/217/1*Lp8hwKsu6LJN8bliLt0BLw.png" /></figure><p>It will ask repository name and other important information:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*BZiWBFAtTad2E9Bj3xV8Wg.png" /></figure><p>Once repository created, you can check-in code, raise Pull-Requests (PRs), manage issue tickets, create GitHub Action pipeline, link with project, create wiki pages, manage repository security, monitor insights and manage settings for the repository:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jw4Go3w2dTeON0aJjoEJxA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DpjRMM0EqrN_cAQVd8ZyvQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OWHCN09wBxoI88dlym5PSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jZBnbcl2WC473yo1qK9xgA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q5cL1cwbFc-aLFDd3RSMLg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AYqcR7KeGHMrz8gysy08OA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hV05KO4eaI3-9UrRQxroJQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iDid25o0PmgfarRvUZqyAQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4aAEB7LKjBKrh4eNcpdiuQ.png" /></figure><p>4. <strong>Gist</strong> — A gist is code block which can be created for referring purpose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fxFmYAL-BJocnlh5l9CP_A.png" /></figure><p>5. <strong>Other Features</strong>: There are several other features are available to support the complete DevOps platform like:</p><ul><li>User/people/account and team management</li><li>Authentication and authorization for different set of objects</li><li>Accessibility</li><li>Notification setting</li><li>Integrations with other applications</li><li>Developer settings</li><li>Code security and analysis</li></ul><h3>GitHub Action</h3><p>The most important feature which allows to create DevOps pipeline is GitHub Action.</p><p>It allow to create declarative pipeline using YAML where pipeline steps (DevOps stages) created. This pipeline is also stored with the same repository under the .github/workflows directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cNThpdzjmmn8H41R367BLw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AFhkInykGNwKT1K1smc3Uw.png" /></figure><p>GitHub Action provides user interface to choose the steps to create the declarative pipeline. Once YAML is generated, the developer can customize it based upon need. Custom steps can be added/modified.</p><p>GitHub Action provides rich support of different programming languages &amp; build tools and their respective default pipeline which spread across different categories:</p><ul><li>Automation e.g. greetings, labeler, stale etc.</li><li>Continuous Integration e.g. Publish Java package with Maven, Java with Gradle, Android CI, Node.Js, .Net, Ada, Ruby, iOS, Webpack, Swift, Go, Elixir, Symphony, Docker and many more.</li><li>Deployment — Deploy to Azure, Deploy to Amazon ECS, Build and Deploy to GKE, Terraform, Openshift etc.</li><li>Security — Dependency Review, CxSAST, Code Security Scan, Code Scan etc.</li><li>Pages — Hugo, Next.js, Static HTML, Jekyll, GatsBy etc.</li></ul><p>Apart from the predefined workflows, we can create custom workflow pipeline by writing commands in YAML.</p><p>We will see one pipeline in details in subsequent sections.</p><h3>Use Case</h3><p>To demonstrate the GitHub platform DevSecOps, we will take a Java based project example. We write code for Java project, create an repository in GitHub and check-in code into the repository. These steps performed as prerequisite at: <a href="https://github.com/siddhivinayak-sk/spring-reactor-reactive">https://github.com/siddhivinayak-sk/spring-reactor-reactive</a></p><p>Now to create pipeline, there are two ways: ‘manual’ or ‘by using GitHub Action page’. If we need to create the pipeline manually, we need to study the GitHub declarative pipeline language, a huge documentation is available for this: <a href="https://docs.github.com/en/actions/learn-github-actions">https://docs.github.com/en/actions/learn-github-actions</a></p><p>For this use case, we use the GitHub Action Page.</p><ol><li>Open the repository on browser (e.g. <a href="https://github.com/siddhivinayak-sk/spring-reactor-reactive">https://github.com/siddhivinayak-sk/spring-reactor-reactive</a>)</li><li>Open Actions Tab by clicking on it</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vs14u4Xh_iFBEd7HO-4vTA.png" /></figure><p>3. Click on ‘New workflow’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Llpvq0vmwbb8fc2vEk0gpA.png" /></figure><p>4. Choose Java with Maven and click on ‘Configure’ button. It will open an YAML editor with auto generated pipeline configuration e.g.</p><pre>name: Java CI with Maven</pre><pre>on:<br>  push:<br>    branches: [ &quot;main&quot; ]<br>  pull_request:<br>    branches: [ &quot;main&quot; ]</pre><pre>jobs:<br>  build:</pre><pre>runs-on: ubuntu-latest</pre><pre>steps:<br>    - uses: actions/checkout@v3<br>    - name: Set up JDK 11<br>      uses: actions/setup-java@v3<br>      with:<br>        java-version: &#39;11&#39;<br>        distribution: &#39;temurin&#39;<br>        cache: maven<br>    - name: Build with Maven<br>      run: mvn -B package --file spring-reactor/pom.xml</pre><p>you can make modification in steps as per need and click on ‘start commit’ button to commit it.</p><p>5. Once committed, it will automatically invoke the pipeline. To check, open the GitHub Action tag again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X4ZIO2rOH9CO9qNJqikonA.png" /></figure><p>Under all workflows, whatever pipeline created will show, and corresponding runs will show in middle area.</p><p>6. Click on any run e.g. the first run entry named with ‘Update maven.yaml’. It will open the detail about the stages in the pipeline as graphical representation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8xlKy-7hdqVf1AEFzkMSeQ.png" /></figure><p>Since this created pipeline has only one state ‘build’ it is showing build stage. Many stages can be created with pipeline similar to Jenkins and then can be made dependent on other states as well. For this, GitHub actions provides various declarative commands to support the different functionalities.</p><p>7. Click on ‘build’ stage button to see details about it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hezACHb14lc-Y_UiOPPMlw.png" /></figure><p>You can expend each task of the stage to see their details.</p><p>Additionally, it provides various features like rerun pipeline, download logs, download artifacts (based on configuration) etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wPY5x8KnlrbEnNZlmOQqSA.png" /></figure><p>Although, this use case is very simple, but it can be enriched as complex as required.</p><p>We can add security pipelines like dependency check, CVE analysis stages to adhere with DevSecOps practices very easily with workflow pipelines. GitHub provide many prebuild templates or custom pipeline can be created.</p><h3>Conclusion</h3><p>GitHub is largest internet hosted service for public repositories. It is continuously enhancing its capability to make it single platform for complete DevSecOps practices.</p><p>It has offered various tools and artifacts which can be used for organization, project, repositories, CI pipelines management at single place.</p><p>The CI pipelines / workflows are being supported for various programming languages &amp; build tools with declarative YAML based pipeline creation. It provide various predefined pipeline workflow templates which can be utilized for easy pipeline development and supports customization with huge number of tools and commands.</p><p>GitHub provides Integrated security, dependency analysis and reporting to adhere the DevSecOps practices and provides various reports. It also supports ‘Dependabot’, an automation tool for dependency scanning and upgrade which provides notification whenever some new version of dependency available and can raise PR automatically based upon configuration. Because of these features, it getting more popular day by day.</p><h3>References</h3><ul><li>GitHub — <a href="https://github.com/">https://github.com/</a></li><li>GitHub SignUp — <a href="https://github.com/signup">https://github.com/signup</a></li><li>GitHub Desktop — <a href="https://desktop.github.com/">https://desktop.github.com/</a></li><li>Installing GitHub — <a href="https://gist.github.com/derhuerst/1b15ff4652a867391f03">https://gist.github.com/derhuerst/1b15ff4652a867391f03</a></li><li>Git SCM — <a href="https://git-scm.com/">https://medium.com/r/?url=https%3A%2F%2Fgit-scm.com%2F</a></li><li>GitHub Action — <a href="https://docs.github.com/en/actions/learn-github-actions">https://docs.github.com/en/actions/learn-github-actions</a></li><li>DevOps — <a href="https://siddhivinayak-sk.medium.com/continuous-integration-continuous-deployment-ci-cd-with-jenkins-sonarqube-nexus-docker-and-45a309bde131">https://medium.com/r/?url=https%3A%2F%2Fsiddhivinayak-sk.medium.com%2Fcontinuous-integration-continuous-deployment-ci-cd-with-jenkins-sonarqube-nexus-docker-and-45a309bde131</a></li></ul><p>If you enjoyed this article, consider <a href="https://buymeacoffee.com/siddhivinayak.sk">buying me a coffee</a>. Your support helps me create and share more. ☕</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdeaf1411221" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prevent your website from brute-force attacks: Use fail2ban to block malicious clients]]></title>
            <link>https://siddhivinayak-sk.medium.com/prevent-your-website-from-brute-force-attacks-use-fail2ban-to-block-malicious-clients-92b15b5ae4ec?source=rss-356acb1877de------2</link>
            <guid isPermaLink="false">https://medium.com/p/92b15b5ae4ec</guid>
            <category><![CDATA[fail2ban]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[brute-force-attack]]></category>
            <category><![CDATA[application-security]]></category>
            <category><![CDATA[intrusion]]></category>
            <dc:creator><![CDATA[Sandeep Kumar]]></dc:creator>
            <pubDate>Mon, 19 Sep 2022 12:27:39 GMT</pubDate>
            <atom:updated>2026-11-01T10:26:35.736Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>We all know technology is growing daily and parallelly security concerns are also growing. These security concerns are not only impacting the users but also impacting the hosting platforms and website owners.</p><p>There are various types of attacks happens to down / hack your web applications like DDoS attack, brute-force attack, bot attack, SQL Injection, Cross-Site scripting, Malware attacks and so on. The list of attack type is too long and each attack type may requires different type of care and prevention approach. DDoS attacks requires rate limiter, identification and block approach using firewall and other security components.</p><p>In this article, we will be discussing about the brute-force attack and preventions of brute-force attack using fail2ban software. It will be beneficial for web developers, website owners, architects and cyber-security experts.</p><h3>About Brute Force Attack</h3><p>The ‘Brute Force Attack’ is a conventional way of attack and yet very easy and powerful attack for any security system. Term brute force explains about the process of creating possible passwords / passphrases and trying to target system until it unlocks.</p><p>In cryptography, brute force is defined as “an attack where attacker submitting may passwords or passphrases with hope eventually guessing the correctly”. In mathematics, suppose there is lock with 3 digit combination of 0–9 then there could be possible number of passwords is:</p><pre>nCr = n! /  (n-r)! r!<br>= 10! / (10–3)! 3! <br>= 120</pre><p>In simple words, after 120 tries you will be able open the lock as the combination of lock is one of the combination from 120 possibilities.</p><p>This is the reason everyone is suggested to make large and complex password so that it will be hard to guess as well as to generate in case of brute force attack.</p><p>Now, the more complex password is created, it will take time to generate the password and try to system to unlock. Although, it is very hard to generate correct password and try with system as generating and trying with system may take huge amount of computation and time. Consider a situation. Suppose, you have 16 character password with capital, small letter, 0–9 number and 5 special symbols in that case, 67 characters could be part of password. Although it is very hard to generate all possible combination of such password but not impossible specially when faster processing available with GPUs.</p><p>Secondary, if some attacker is continuously trying with wrong password, it will hamper the website performance as Database hits increased and other infrastructure loads are increased.</p><p><em>Note: Brute Force attacks are further sub-divided in categories based upon their key generation mechanism. Discussed here in brief for understanding purpose and finding solution to prevent it.</em></p><h3>Problem Statement</h3><p>The problem statement is very simple, ‘how to prevent brute force attack on website or any system’.</p><p>Before thinking about the preventive solution, first need to think about how to identify that someone is trying for brute force attack.</p><p>Let’s discuss with one situation, suppose we have an website which provides pages to login users using username and password (a typical website example). An assumption can be made that if multiple login calls are received at server end with wrong password, it can be considered as attack (possibly someone is trying to guess password by brute force attack). But it has below two situations:</p><ol><li>A valid genuine user may forget password and tries to login multiple times by remembering his passwords. Although, it handled normally, if someone tries with wrong password, users are redirected to ‘forget password’ page after some attempt. But user can again open the login page and try directly to login in to the website.</li><li>A malicious user trying to guess password by using brute force attack. For this, he/she is generating password based upon some guessing logic and tries continuously to login to the website.</li></ol><p>As we understand the ‘brute force attack’, it is very hard to identify the the genuine or attack cases. Identifying become much tedious when attacker uses infrastructure to attack which is spread across the geo locations where different IPs and geo location is detected from each call. Therefore, the problem statement now is, identify the possible attack cases and prevent the attack.</p><h3>Solution with fail2ban</h3><p>As part of the solution, first need to discuss the solution of identifying the attack and then preventive approach.</p><p>The use case scenario discussed in previous section clearly shows the difficulty of identification of attack as it is very hard to distinguish attack call and genuine calls.</p><p>To identify the attack cases, need to check calls statistics, if one or a group of machine (IP / Hosts) are continuously making login calls then it can be considered as attack. Specially, when the interval between next call is too short. Different network tools and applications can be used to identify such attacks e.g. firewall analytics tool by different vendors.</p><p><em>Note: The identification of attacks has been covered very briefly here. It has bigger scope for different type of attacks identification with different type of target systems.</em></p><p>Suppose, you identified that one of the client is making 10 login calls in 30 seconds, we can easily identify that this could not be login attempt from human interactive interface, instead it is kind of bot or other automation script or any other system. Once, this is concluded, there are two preventive approach:</p><ol><li>Add captcha and bot preventive mechanism — it is very common to identify bot / automation script call by identifying various information from the request like geo location, calling agent name and version etc. If request has any suspected information, an captcha will be displayed to solve before login. Although, it is good approach and widely used but it does not prevent calls to server from the client.</li><li>Block client / Prevent traffic from the client (temporarily or permanent) — If any call is identified suspected, the client itself can be blocked so that any traffic generated from the client does not reaches to server for processing. It could be permanent or temporary based upon the security policy implemented.</li></ol><p>There are various tools and software to implement both preventive approach. With this article, we will be going to discuss about the fail2ban software implementation to block traffic from suspected client.</p><p>The solution approach is very simple:</p><ol><li>Identify the client by analyzing the calls and result and draw conclusion based on ‘failed call vs time’ analysis from the client</li><li>If client is marked as suspected, block traffic from the client (permanently or temporary)</li><li>Optional, allow client again after some cooling periods in case of temporary block</li></ol><p>Example, if a user is trying to login continuously 5 times with wrong password, block user for 30 minutes and again allows him after 30 minutes.</p><p>With this brute force preventive solution approach, fail2ban is useful and can be implemented very easily as fail2ban provides feature to analyze the logs and take actions defined for the situations.</p><h3>About fail2ban</h3><p>Fail2ban is an intrusion prevention software framework, written in Python and designed to prevent ‘brute force attack’ for Linux based systems.</p><p>It is widely used with various deployment platforms/systems like:</p><ul><li>ssh servers</li><li>apache servers</li><li>nginx</li><li>mail servers like domino, squirrel</li><li>gitlab</li><li>grafana</li></ul><p>and many more.</p><p>Let’s understand the fail2ban solution with below diagram:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*1urQ2s2-T1B62yqq5fvcNA.png" /><figcaption>Figure 1: Fail2ban placement to prevent suspected traffic</figcaption></figure><ol><li>Client makes call to the server</li><li>Call reaches to OS Firewall which acts based on IP table entries (blocked / allowed), first time it allows traffic to server</li><li>Server validate the logic request, if failed, it reject login and make an entry in log file</li><li>The log file contains now failed entries with client IP and time of try</li><li>Fail2ban analyze the log file (based on jail configuration) and identifies whether it client IP has to be blocked / unblocked</li><li>Now fail2ban will make an entry into the IP table to block / unblock the traffic from the client</li><li>With next call, the firewall may allow/block traffic at this level only base upon the decisions make by fail2ban</li></ol><p>Fail2ban is a free software which can be redistribute or modify under GNU GPL license by FSF. It can be installed and used very easily. It just needed installation and configuration.</p><p><em>Note: Installation and blocking traffic on Kubernetes environment is complex using fail2ban so need to be evaluated before consideration.</em></p><p>Fail2ban has following components:</p><p>a. <strong>fail2ban-server </strong>— It is fail2ban server which need to be started. It can be run manually as well as from the sytemd.</p><p>To run manually:</p><pre>sudo fail2ban-server — logtarget sysout -f</pre><p>After installation, it will be available as system service as well so it can be started / stopped as:</p><pre>sudo systemctl enable fail2ban //to enable the fail2ban service</pre><pre>sudo systemctl start fail2ban //to start<br></pre><pre>sudo systemctl stop fail2ban //to stop</pre><p>b.<strong> fail2ban-client </strong>— It is client for fail2ban server where different kind of enquiry can be performed related to fail2ban server activity. It also provides various actions can be performed on fail2vban server.</p><pre>fail2ban-client status //shows the status of fail2ban and running jails</pre><pre>fail2ban-client unban --all //opens all banned entries</pre><p>c. <strong>fail2ban-regex </strong>— It is very important tool which can be used to test the regex written for jail filters.</p><p>Example:</p><pre>fail2ban-regex -v &lt;log&gt; &lt;pattern&gt;</pre><pre>e.g.</pre><pre>fail2ban-regex -v ‘2022–09–19T07:16:23.040Z — warn: failed — time: 2022/09/19 07:16:23 — host: 127.0.0.1 — message: no such user’ ‘^\s* — warn: failed — time: ([^-]+) — host: &lt;HOST&gt; — message: (.*?)$’</pre><p>d. <strong>fail2ban-python </strong>— Runs program written in python for fail2ban</p><p>e. <strong>fail2ban-testcases </strong>— Runs fail2ban test cases</p><h3>Implementation</h3><p>fail2ban implementation is quite easy if deployment platform is Linux based system.</p><p>Prerequisite:</p><p>You must have an application installed in Linux (Ubuntu / Debian) and whenever user tries to login with wrong username or password, it must create log in log file with a format where date time and client IP is displayed in log. Example:</p><pre>2022–09–19T07:16:23.040Z — warn: failed — time: 2022/09/19 07:16:23 — host: 127.0.0.1 — message: no such user</pre><pre>Note: Here, first token is time in UTC format, then host denotes the client IP which is trying to login.</pre><p><strong>Install fail2ban</strong></p><p>The installation may be different based on different Linux distribution. You need to go to official site for <a href="https://www.fail2ban.org/wiki/index.php/Downloads">download</a> the latest fail2ban <a href="https://www.fail2ban.org/wiki/index.php/Downloads">package</a>s are available for different Linux versions.</p><p>You can use different commands based upon Linux distributions. Giving some example:</p><pre>sudo dnf install fail2ban</pre><pre>or</pre><pre>sudo apt-get install fail2ban</pre><p>Once installation completed, ensure below components are installed (usually goes in /bin directory):</p><ul><li>fail2ban-server</li><li>fail2ban-client</li><li>fail2ban-regex</li><li>fail2ban-testcases</li><li>fail2ban-python</li></ul><p>Ensure that config directories and files are created in /etc/file2ban . Below are the configuration created.</p><p>a. <strong>/etc/fail2ban/fail2ban.conf </strong>— Sets fail2ban server configurations like log level, log file location, database etc. [<em>normally, no change required</em>]</p><p>b. <strong>/etc/fail2ban/jail.conf </strong>— Jail(s) are configured.</p><blockquote><em>what is a jail?</em></blockquote><blockquote>A jail is a configuration, which describes where log is available which need to be scanned, what would be the pattern for filter, once filter matches what action to be performed (apart from banning traffic, other actions can also be configured like send notification email etc.) and additional configuration around the jail configured.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*uvisPTKI2uPgiqmw6406tA.png" /><figcaption>Figure 2: Depicts a jail in fail2ban</figcaption></figure><p>This jail.conf contains default configurations for fail2ban jail(s) e.g.:<br>bantime, ignoreip, ignorecmd, findtime, maxmatch, maxtries, actions (smtp notification, iptable block etc.) and number of predefined jails for different systems like apache server, sshd etc.</p><p>c. <strong>/etc/fail2ban/jail.d</strong> — It is a directory where custom jails can be created.</p><p>d. <strong>/etc/fail2ban/filter.d </strong>— It is a directory which contains the filters used for jails. Each jail config must have a filter, the name of filter file can be defined using filter property, if filter property not defined then filter file must be available with jail’s name.</p><p>For testing purse let’s create a jail configuration in /etc/fail2ban/jail.d/mycustomjail.conf with below contents:</p><pre>[myjail]<br>enabled  = true<br>port     = 80,8080,443,8443,5563<br>logpath  = /home/localadmin/logs/server-myapp-out.log<br>maxretry = 5<br>bantime  = 5m</pre><p>Here, it must be enabled, ports which need to be banned must be configured. Log path be defined which where logs will be generated by web application when client tries to login with wrong credentials. The maxretry defines after how many invalid tries, client will be banned. The bantime defines for how many minutes/seconds client will be banned. Minus value for this field ban permanently else, once defined time elapsed, traffic again enabled for the client IP.</p><p>Once, Jail is created, next step is to create a filter which matches the log and then ban action is performed. So create a file /etc/fail2ban/filter.d/myjail.conf with below contents:</p><pre>[Definition]<br>ignoreregex =<br>datepattern = {^LN-BEG}<br>failregex = ^\s* - warn: failed - time: ([^-]+) - host: &lt;HOST&gt; - message: (.*?)$</pre><p>Note: Most of the datetime matcher in fail2ban expect datetime at begining of the log. The filregex defines the regular expression which matches in log file (defined in mycustomjail.conf) and if matches correctly action is performed. If datetime is not in correct format or not as per failregex, an exception is thrown at runtime like timezone has not been configured.</p><p>Once configuration completed, generate traffic to the server which fails the authentication and logs created in log file. Make continuous 5 failed call, it will be block next calls. After 5 minutes again traffic will be allowed.</p><h3>Conclusion</h3><p>Preventing brute force attack is one of the main security requirement for any web site. Now, there are various approaches to prevent brute force attack and using fail2ban is one of the roust solution which provides less invasive way of implementation mean, no need to make any change in application, just configure application log generation and fail2ban that’s all.</p><p>Fail2ban can be used for various systems like ssh, apache server, grafana, gitlab and many more.</p><p>Although there are other intrusion detection system / IP ban systems like <a href="https://github.com/DigitalRuby/IPBan">IPBan</a>, <a href="http://denyhosts.sourceforge.net/">DenyHosts</a>, <a href="https://www.ossec.net/">OSSEC</a> are available but fail2ban is respectively easy to implement.</p><h3>References</h3><ul><li>Fail2ban community portal — <a href="https://www.fail2ban.org/wiki/index.php/Fail2ban:Community_Portal">https://www.fail2ban.org/wiki/index.php/Fail2ban:Community_Portal</a></li><li>Github fail2ban — <a href="https://github.com/fail2ban/fail2ban">https://github.com/fail2ban/fail2ban</a></li><li>Fail2ban packages — <a href="https://www.fail2ban.org/wiki/index.php/Downloads">https://www.fail2ban.org/wiki/index.php/Downloads</a></li></ul><p>If you enjoyed this article, consider <a href="https://buymeacoffee.com/siddhivinayak.sk">buying me a coffee</a>. Your support helps me create and share more. ☕</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92b15b5ae4ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>