<?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 Runcy Oommen on Medium]]></title>
        <description><![CDATA[Stories by Runcy Oommen on Medium]]></description>
        <link>https://medium.com/@runcyoommen?source=rss-5fe3b3b298b6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*xWWgFLuZPWGSq8im.</url>
            <title>Stories by Runcy Oommen on Medium</title>
            <link>https://medium.com/@runcyoommen?source=rss-5fe3b3b298b6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 23:06:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@runcyoommen/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[Securing the container life-cycle]]></title>
            <link>https://runcyoommen.medium.com/securing-the-container-life-cycle-dc42debe78b8?source=rss-5fe3b3b298b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc42debe78b8</guid>
            <dc:creator><![CDATA[Runcy Oommen]]></dc:creator>
            <pubDate>Sun, 08 Nov 2020 17:39:52 GMT</pubDate>
            <atom:updated>2020-11-08T17:39:52.042Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uGC_rNuA_yiY93GE1sfx8w.jpeg" /></figure><p>Let’s face it — containers and Kubernetes is eating the stack and de-facto standard for microservices architecture. A number of limitations exist in the container life-cycle:</p><ul><li>Risk posture of the images is not completely understood</li><li>Unclear as to where security should fit in the process</li><li>Containers are not visible with current security tools</li><li>Reliance on open source and external components used</li></ul><p>Hence it’s imperative to have this journey secured in the best possible manner. Listing some precautions and necessary steps at a high level that needs to be undertaken as you embark this journey.</p><p><strong>1. BUILD Phase: Security starts with the bundle</strong></p><ul><li>Make sure that base images are secure</li><li>Scan for vulnerabilities on the finished product</li><li>Maintain configuration standards for the containers</li><li>Share info between Dev, Ops, Sec — DON’T be in silos!</li></ul><p><strong>2. SHIP Phase: Add Enforcement of image usage</strong></p><ul><li>Deny unknown images or registries</li><li>Accept images based on risk. Have internal guidelines\standards</li><li>Maintain integrity of images</li></ul><p><strong>3. DEPLOY Phase: Limit access to the container engine</strong></p><ul><li>Separate automation from human actions — avoid frequent hand edits!</li><li>Control parameters that elevate privileges</li><li>Appropriate permissions on volumes, network etc…</li><li>Maintain audit trail with accountable user</li></ul><p><strong>4. RUN phase: Granular running of containers</strong></p><ul><li>Protect sensitive data</li><li>Network segmentation</li><li>Fine-grained app controls</li></ul><p>I recommend you to read-up (and choose your path) further on each of these points below as describing these in detail will make it for a very lengthy reading. Keep flyin’</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc42debe78b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Key security improvements and best practices for Kubernetes on Azure]]></title>
            <link>https://runcyoommen.medium.com/key-security-improvements-and-best-practices-for-kubernetes-on-azure-cf38bc55722a?source=rss-5fe3b3b298b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf38bc55722a</guid>
            <category><![CDATA[kubernetes-security]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aks-security]]></category>
            <category><![CDATA[azure-kubernetes-service]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <dc:creator><![CDATA[Runcy Oommen]]></dc:creator>
            <pubDate>Tue, 09 Jun 2020 09:12:38 GMT</pubDate>
            <atom:updated>2020-06-09T09:12:38.948Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jJDuqKjK__8C_cUtiRxvZA.png" /></figure><p>Cloud native design thinking has taken the world by storm and it definitely is the new standard for modern application development. This usually translates to the usage of popular Docker and Kubernetes platform with a service mesh architecture attained with Istio.</p><p>The security of your workloads and data is a key consideration as you manage clusters in managed services such as Azure Kubernetes Service (AKS). For example, a <a href="https://en.wikipedia.org/wiki/Zero-day_(computing)">Zero Day</a> task would be to secure the associated resources run in a multi-tenant cluster obtained with logical isolation.</p><p>Below, we take a look at some of the security concerns, key considerations and best practices for your Kubernetes deployment in Azure:</p><h3><strong>1. Disable anonymous authentication</strong></h3><p>Just for setting context, there are two types of users — normal users (managed by an outside service like Azure Active Directory) and service accounts (managed by the Kubernetes API with credentials stored as Secrets) — anything else is treated as <a href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/#anonymous-requests">anonymous requests</a>. They’re given a username ofsystem:anonymousand groupsystem:unauthenticataed. Make sure you disable this mode for enhanced security by passing--anonymous-auth=falseoption to the API server</p><h3>2. Configure admission controllers</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*WK6F2hlscEzhujwpAMaWpA.png" /></figure><p>Tremendous improvement in terms of speed and manageability of backend clusters has been done into Kubernetes over the years since the initial launch. A more recent introduction in security features is a set of plugins called <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/">admission controllers</a>. They can be thought of as a gatekeeper that intercepts API requests and may change the request object or deny it altogether. Listing down some of the recommendations to operationalize them for better security:</p><p>a. As a first step, enable admission controller with the following command line and replace what appears after “=” with the name of the admission controller to be tuned on</p><blockquote>--enable-admission-plugins=NameOfController,NameOfController2</blockquote><p>b. Ensure that below given admission controllers are enabled by default:</p><blockquote>LimitRanger,DefaultStorageClass,DefaultTolerationSeconds,NamespaceLifecycle,ServiceAccount,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,Priority,ResourceQuota,PodSecurityPolicy</blockquote><p>c. Enable ValidatingAdmissionWebhookif you need to validate Kubernetes resources during create, update, and delete operations</p><p>d. Consider disabling MutatingAdmissionWebhook or apply stricter RBAC restrictions as to who can create MutatingWebhookConfiguration</p><p>e. Use AlwaysPullImages admission controller to ensure pull policy is appropriately set when you want to make sure a user’s private images are only pulled by those who have the credentials.</p><h3>3. Pod Security Policies (PSP) to prevent risky container images from being used</h3><p>Since this is an important admission controller, I decided to mention it as a separate section. From the K8s documentation, PSP is a cluster level resource that defines a set of conditions a pod must consist in-order to be accepted into the system. An important thing to note here is that PSP is an optional (but recommended) admission controller. In order for this to be used, the target pod’s service account must be authorized to use the policy. Check <a href="https://kubernetes.io/docs/concepts/policy/pod-security-policy/#run-another-pod">this example</a> to get a better understanding by seeing it in action. At the time of this writing, usage of pod security policies for AKS have been launched as a <a href="https://docs.microsoft.com/en-us/azure/aks/use-pod-security-policies">preview</a></p><h3>4. Enable authorization with RBAC</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*BkUHA_ZpgpayV49Dg07LJg.png" /></figure><p>RBAC is a key security feature that protects your cluster by allowing you to control who can access specific API resources. If you have an AKS cluster running with Azure AD integration, this is pretty straight forward as described in the official <a href="https://docs.microsoft.com/en-us/azure/aks/azure-ad-rbac">documentation</a>. However, since RBAC itself is a relatively new feature, what I would be covering are some of the potential configuration mistakes that might leave you unintentionally exposed.</p><p><strong>Potential mistake #1:</strong> Make sure that cluster-adminrole is not granted unnecessarily. It could have happened that during the transition from legacy ABAC controller to RBAC, some administrators may have replicated ABAC’s permissive configuration by granting it widely, neglecting the warnings from the <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#permissive-rbac-permissions">documentation</a>.</p><p><strong>Potential mistake #2:</strong> <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles">Role aggregation</a>, available from K8s 1.9, if not carefully reviewed can lead to improper usage. The intended use of a role; for example system:view role could improperly aggregate rules with verbs other than view, violating the original intention.</p><p><strong>Potential mistake #3:</strong> Duplicated role grant may happen whereby subjects can get the same access in more than one way. This situation can make access revocation more difficult if an administrator does not realize that multiple role bindings grant the same privileges.</p><p><strong>Potential mistake #4:</strong> Unused roles granted to subjects that do not exist (such as service accounts in deleted namespaces or users no longer with the org) can make it difficult to see the configurations that <em>do</em> matter.</p><h3>5. Disable public access to your cluster</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*AcA58piprtH2eQ__befe-Q.png" /></figure><p>As a recommended best practice, never expose remote connectivity to the AKS nodes; instead create a bastion host or jump box in a management virtual network. The PaaS offering from Azure, called <a href="https://azure.microsoft.com/en-us/services/azure-bastion/">Azure Bastion</a>, helps to connect to the nodes and perform maintenance or troubleshoot issues. The bastion host should be in a separate network that is securely peered to the AKS cluster virtual network</p><h3>6. User network policies to segment and limit container and pod communications</h3><p>An important aspect that demands attention from a security perspective is the network policies feature that specify how groups of pods are allowed to communicate with each other and other network endpoints. They tend to be a little confusing, since one would think that, if <em>no</em> network policies applied to a pod, then <em>no</em> connections to or from it would be permitted. The opposite, in fact, is true: if <em>no</em> network policies apply to a pod, then <em>all</em> network connections to and from it are permitted. This behavior relates to the notion of “pod isolation” which means that pods are isolated if at least one network policy applies to them; if no policies apply, they are “non-isolated”.</p><p>The <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/#networkpolicy-v1-networking-k8s-io">network policy spec</a> is intricate, and it can be difficult to understand and use correctly. It is recommended to use a network plugin to enforce network policies. Example plugins include <a href="https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/calico-network-policy/">Calico</a>, <a href="https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/cilium-network-policy/">Cilium</a>, <a href="https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/kube-router-network-policy/">Kube-router</a>, <a href="https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/romana-network-policy/">Romana</a> and <a href="https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/weave-network-policy/">Weave Net</a></p><h3>7. Use only trusted authorized container</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*P5kqqYssPCYG4C84ooNRdQ.png" /></figure><p>Always scan your container images for vulnerabilities and deploy only after the images have passed the validation. Regularly update the base images and application runtime, then redeploy workloads in the AKS cluster. It is advised to integrate the deployment workflow to include a process to scan container images using tools such as <a href="https://www.twistlock.com/">Twistlock</a> or <a href="https://www.aquasec.com/">Aqua</a>, and then only allow verified images to be deployed. Azure Container Registry has capabilities for performing these scans to set up a CI/CD pipeline with the required automation.</p><h3>8. Secure your CI/CD pipelines with vulnerability scanning</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*k7LKAMnKbzdn5bFzLaf4wA.png" /></figure><p>Primary steps towards the delivery of secure software is to conduct risk assessment and threat modeling. Thankfully, security of the CI/CD Pipeline is relatively straightforward assuming you and your team followed best practices during creation of your project’s Git repository. My recommendation would be to explore the <a href="https://github.com/anchore/anchore-engine">Anchore Engine</a>, an open-source project that provides a centralized service for inspection, analysis, and certification of container images. It can be run either as a standalone Docker container or within a managed orchestration service like AKS.</p><p>With a deployment of Anchore Engine running in your environment, container images downloaded from Azure Container Registry would be evaluated against user-customizable policies to perform security, compliance, and best practices enforcement checks. Check out <a href="https://github.com/valancej/AKS-Anchore-Engine">this</a> great great step-by-step guide on enabling Anchore for your AKS cluster.</p><p>I hope these recommendations provide you a good aid as you start the journey in securing the cluster. However, please note that the above guidelines are not exhaustive and there are many security considerations to be aware of when using Kubernetes. Check your clusters today.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf38bc55722a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OCI Foundations Certified Associate — Preparation Tips]]></title>
            <link>https://runcyoommen.medium.com/oci-foundations-certified-associate-preparation-tips-5bfbc9e7875d?source=rss-5fe3b3b298b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bfbc9e7875d</guid>
            <category><![CDATA[cloud-certification]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[oci-foundations]]></category>
            <category><![CDATA[certification]]></category>
            <category><![CDATA[oci]]></category>
            <dc:creator><![CDATA[Runcy Oommen]]></dc:creator>
            <pubDate>Sun, 17 May 2020 18:12:43 GMT</pubDate>
            <atom:updated>2020-05-17T18:12:43.257Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dmhiT0NTmkz4tvman0ifPQ.png" /></figure><h3>OCI Foundations Certified Associate — Preparation Tips</h3><blockquote>The future is already here, but it’s not evenly distributed — William Gibson</blockquote><p>Cloud computing was never meant to be vendor locked, but over the years it certainly is leaning that way. I certainly believe in a multi-hybrid cloud future and almost makes a conscious decision to be at-least aware of various prominent developments and releases from the top 3 (AWS, Azure, GCP) in this space. To be honest, OCI was not even in my radar as I consider it to be a laggard (things may change soon).</p><p>With this Corona pandemic sweeping across the world, the folks at Oracle Cloud have pulled out a masterpiece from their DB hat to make the whole <a href="https://blogs.oracle.com/cloud-infrastructure/oracle-cloud-free-certifications-faq">training and certifications FREE until 15th August</a> worth hundreds of thousands of dollars. Fresh college grads, final year students and people who had just started their career might not have enough monetary resources to pursue a certification and would stand to benefit the most out of this gesture. OCI exams will help in gaining the much needed mind-share in a fierce cloud market and the future potential revenue/marketshare when they join a company to become influencers in their teams. Pure marketing brilliance!</p><p>Anyways, I too love learning new things and took this opportunity from Oracle with open hands. Listing below the resources that helped me prepare:</p><p>1. The essential video training that I attended was from the official course of OCI which can be accessed <a href="https://learn.oracle.com/ols/course/oracle-cloud-infrastructure-foundations-new/35644/75250/">here</a>. This close to 4 hours course would be a great starting point to familiarize with OCI specifics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*AAHMq77J6ST5eKBrOqjyIQ.png" /></figure><p>2. Reading the <a href="https://learn.oracle.com/education/downloads/1Z0-1085-20/OU_1Z0-1085-20-OCI-Foundations-Associate-2020-Exam-Prep-Guide.pdf">Exam Preparation Guide</a> will help you understand the concepts, core services, security, compliance, pricing and support features all of which will be tested at a high level for the foundations exam.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*wyjkip3lULxcNj7rRjsCaA.png" /></figure><p>3. Solidify your foundation by going through the <a href="https://www.oracle.com/cloud/iaas/training/foundation.html">Level 100 Training</a> on various OCI services. This might be an overkill for the foundations exam, but will do you a world of good if you intend to take their other exams like <a href="https://learn.oracle.com/ols/learning-path/become-oci-architect-associate/35644/75658">Architect Associate</a> or <a href="https://learn.oracle.com/ols/learning-path/become-oci-developer-associate/35644/75248">Developer Associate</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bVepHfiWHVy_lmQBYrBfKw.png" /></figure><p>4. Lastly, test your knowledge with a sample <a href="https://learn.oracle.com/ols/module/practice-exam-for-oci-foundations-2020-associate-certification/35644/75771">practice test</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*ii7kMgU0lTJ3DWkiPuAf5g.png" /></figure><p>Hope you liked this list of resources that I relied upon and if you found it useful, do show some love by clapping and sharing the same. TIA and best of luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bfbc9e7875d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS SysOps Administrator Associate — Preparation Tips]]></title>
            <link>https://runcyoommen.medium.com/aws-sysops-administrator-associate-preparation-tips-207d708c4c11?source=rss-5fe3b3b298b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/207d708c4c11</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-sysops]]></category>
            <category><![CDATA[sysops-administrator]]></category>
            <category><![CDATA[cloud-certification]]></category>
            <category><![CDATA[aws-certification]]></category>
            <dc:creator><![CDATA[Runcy Oommen]]></dc:creator>
            <pubDate>Sun, 26 Apr 2020 19:19:04 GMT</pubDate>
            <atom:updated>2020-04-26T19:19:04.746Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AJsJ9F90_hiLMgMQF8USqg.png" /></figure><h3>AWS SysOps Administrator Associate — Preparation Tips</h3><p><strong>Full Disclosure:</strong> I’m a full time developer who enjoys systems, networking and security and not from a DevOps/SysOps background.</p><p>Although, this is an associate level certification, it is advisable that you have either cleared the Solution Architect (Associate) or Developer (Associate) exam prior to attending this exam.</p><p>Having said that, listing below the list of resources, tutorials, practice tests and reference materials used for preparation.</p><h4>*** YOUR MILEAGE MAY VARY ***</h4><blockquote>Generic References:</blockquote><p>1. Understand the <a href="https://wa.aws.amazon.com/wat.concepts.wa-concepts.en.html">concepts</a> from the AWS Well-Architected Framework as knowing the right definitions will do wonders to get the fundamental grasp of AWS services and cloud in general</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*T794AUAJcILjlNtyuZkV2g.png" /></figure><p>2. Have a read through on the FAQs of — <a href="https://aws.amazon.com/s3/faqs/">S3</a>, <a href="https://aws.amazon.com/ec2/faqs/">EC2</a>, <a href="https://aws.amazon.com/rds/faqs/">RDS</a>, <a href="https://aws.amazon.com/ebs/faqs/">EBS</a>, <a href="https://aws.amazon.com/iam/faqs/">IAM</a>, <a href="https://aws.amazon.com/vpc/faqs/">VPC</a>, <a href="https://aws.amazon.com/cloudformation/faqs/">Cloud Formation</a>, <a href="https://aws.amazon.com/elasticloadbalancing/faqs/">ELB</a>, <a href="https://aws.amazon.com/cloudwatch/faqs/">Cloud Watch</a> &amp; <a href="https://aws.amazon.com/cloudtrail/faqs/">Cloud Trail</a> — as these combined can easily carry &gt;80% weightage for the exam</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cH98vk6H5PxMC2oV6805Gw.png" /></figure><p>3. Read the below white-papers (in no particular order)</p><p>a. <a href="https://d1.awsstatic.com/whitepapers/architecture/AWS_Well-Architected_Framework.pdf">AWS Well-Architected framework</a></p><p>b. <a href="https://d1.awsstatic.com/whitepapers/Security/DDoS_White_Paper.pdf">Best practices for DDoS resiliency</a></p><p>c. <a href="https://d1.awsstatic.com/whitepapers/building-a-scalable-and-secure-multi-vpc-aws-network-infrastructure.pdf">Building a scalable &amp; secure multi-VPC network infrastructure</a></p><p>d. <a href="https://d1.awsstatic.com/whitepapers/architecture/AWS-Reliability-Pillar.pdf">Reliability pillar</a></p><p>e. <a href="https://d1.awsstatic.com/whitepapers/aws-web-hosting-best-practices.pdf">Web application hosting on AWS</a></p><p>f. <a href="https://d1.awsstatic.com/whitepapers/aws-security-whitepaper.pdf">Overview of security processes</a></p><p>g. <a href="https://d0.awsstatic.com/whitepapers/Backup_and_Recovery_Approaches_Using_AWS.pdf">Backup and recovery approaches</a></p><blockquote>Tutorials:</blockquote><p>1. The video tutorial which I followed was from <a href="https://learn.acloud.guru/course/aws-certified-sysops-administrator-associate/dashboard">A Cloud Guru</a>. This touched upon the essential services to give you the required pointers for further reading. However, please do bear in mind that following only this tutorial will not be sufficient. There are also quizzes/tests at the end of every section, but these are sometimes too easy and the exam questions are of slightly higher difficulty. DON’T GET COMPLACENT if you ace all the questions from the section quiz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*9PG_aTXoJufEJQTZtcqZWg.png" /></figure><p>2. If you’ve a <a href="https://app.pluralsight.com/paths/certificate/aws-certified-sysops-administrator-associate">Pluralsight</a> account, there are some great content available for this exam with various courses neatly categorized with various level of difficulty. <strong>Disclaimer:</strong> I haven’t attended it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*bEf84sGhro-QeSx6Z80ocg.png" /></figure><blockquote>Practice Tests</blockquote><ol><li>My #1 recommendation for this exam will be <a href="https://www.whizlabs.com/learn/course/aws-csyopaa-practice-tests/">WhizLabs</a>. They have a great collection of mock questions which tests your knowledge at a service level or from a full test perspective which would throw away your exam jitters. Kudos to them for doing a great job!</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*WDfy1jE0qp_nEXb4r3On4w.png" /></figure><p>2. If you had taken and cleared AWS exams before, use your free coupon to purchase a mock exam from official <a href="https://www.aws.training/">AWS training website</a> as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*AzSarEPLHsOI_Zkn5Vt60A.png" /></figure><p>Hope you liked this list of resources that I relied upon and if you found it useful, do show some love by clapping and sharing the same. TIA and best of luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=207d708c4c11" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Certified Kubernetes Application Developer — Preparation Tips]]></title>
            <link>https://runcyoommen.medium.com/certified-kubernetes-application-developer-preparation-tips-89e241101e99?source=rss-5fe3b3b298b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/89e241101e99</guid>
            <category><![CDATA[exam-tips]]></category>
            <category><![CDATA[ckad]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-exam]]></category>
            <dc:creator><![CDATA[Runcy Oommen]]></dc:creator>
            <pubDate>Fri, 27 Mar 2020 19:51:48 GMT</pubDate>
            <atom:updated>2020-03-27T19:51:48.915Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SvA7qxI_1KiNP744x1qdSQ.png" /></figure><h3>Certified Kubernetes Application Developer — Preparation Tips</h3><p>Before I begin giving out my study strategy and exam prep tips let me take this opportunity for doing a huge shout out to the folks at CNCF for doing a fantabulous job in devising such a practical and hands-on certification as compared to the MCQ format examinations. It’s also double sweet that I cleared it now without having to step out from the comfort of my home with the Corona pandemic sweeping across the world. Truly visionary indeed!</p><p>Categorizing the resources used by me for clearing the CKAD certification as <strong>Generic References</strong>, <strong>Specific Materials</strong> and <strong>Practice Areas</strong> for easy focus.</p><h4>*** YOUR MILEAGE MAY VARY ***</h4><blockquote><strong>Generic References:</strong></blockquote><ol><li>The most important thing is to <strong>live and breathe <em>YAML</em> syntax</strong>. It is the de-facto language for Kubernetes and understanding the nuances will help you go a long distance for the overall preparation. A ton of resources are available online and my favorite pick is the one from <a href="https://www.tutorialspoint.com/yaml/index.htm">tutorialspoint.com</a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*RzV0ZKZr9DaZinu1COj8Ag.png" /></figure><p>2. <strong>Get comfortable with <em>vi/vim</em></strong> editor as you would be expected to tweak configurations of an existing pod/deployment/replicasets etc… and even create new definition files. Understand important shortcuts like deleting a line, copy pasting (yanking) and navigation. A example <a href="https://cdn-images-1.medium.com/max/2000/1*fNhm5TL2NFnsujYKixr-3A.png">vim cheat-sheet</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*7AemsRZoQsOAR40_5motIQ.png" /></figure><p>Having said that, you could use nano for editing by explicitly setting it - export KUBE_EDITOR=nano</p><p><strong>PS:</strong> I recommend vim as it would definitely come in handy for you in future and not just for passing the CKAD examination.</p><p>3. <strong>Completely new to Kubernetes</strong> or want to refresh the basics again? I recommend enrolling for this FREE course by CNCF/Linux Foundation available at <a href="https://www.edx.org/course/introduction-to-kubernetes#!">edx</a>. This is a great primer before going deep into CKAD specifics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xLSMrAvRyz7Nvu9qt51Tcg.png" /></figure><blockquote><strong>Specific Materials:</strong></blockquote><ol><li>The<strong> best and most economical course</strong> out there to help you for CKAD is the one from Mumshad Mannambeth available at <a href="https://www.udemy.com/course/certified-kubernetes-application-developer/">Udemy</a>. He explains the concepts very well and also comes with practice tests. A word of caution here about practice tests — the ones given are easy and hence you might want to rely on some external sample questions.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*YoesmGVdyQG1fBX-qDXAgQ.png" /></figure><p>2. <strong>Learn to work</strong> in the <a href="https://kubernetes.io/docs/tasks/manage-kubernetes-objects/imperative-command/">imperative way</a>. You will save tons of time by mastering the <em>kubectl</em> command line rather than relying on a YAML for each and every task. It will also help you extract out the info into a YAML definition for you to modify later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*c8VHVrRgXXgh49Gb51c65g.png" /></figure><p>3. <strong>Setting terminal/bash aliases</strong> will aid you by avoiding to type extra characters. You can easily set an alias like this:alias k=kubectl</p><p>In addition, <em>kubectl</em> provides multiple handy shortcuts like <em>po</em> (pods), <em>rs</em> (replicasets), <em>deploy</em> (deployments), <em>netpol</em> (network policies) etc… A sample usage will now looks like <em>k get po</em> to show all the pods instead of <em>kubectl get pods</em>. Less chars types == More time saved!</p><p>4. CKAD is an open book examination where <strong>you’re allowed to refer</strong> the <a href="https://kubernetes.io/docs/home/">official Kubernetes documentation</a>. Get familiar with this and understand what needs to be searched and where to look while in doubt. The search-box on the top right of this page is your guiding light for this examination</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*1F2s9q0l8vEmSeG8glLjpQ.png" /></figure><p>5. <strong>kubectl explain -- recursive</strong> should be your default man page during the exam and also at the preparation time. Although you would be allowed to open an extra tab to bring up the official documentation, I honestly felt this better to search right there within the terminal as it’s an inbuilt documentation with syntax to check on the go. Learn to use and abuse this for your success.</p><blockquote><strong>Practice Areas:</strong></blockquote><ol><li>CKAD is a hands-on exam and you need to know your shit right — PRACTICE. <strong>Bring up a minikube cluster</strong> setup on your system by following pretty straight forward <a href="https://kubernetes.io/docs/tasks/tools/install-minikube/">installation instructions</a>. You could also rely on GKE (GCP), EKS (AWS) or AKS (Azure) if you’re rich</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*iJRRY8dVujf1tHzOu1mT-w.png" /></figure><p>2. If you had bought the course mentioned above from Udemy, it comes with <strong>practice tests</strong> that can be launched as many times as you want on <a href="https://kodekloud.com/">kodekloud.com</a> with a pre-provisioned cluster setup that stays active for 1 hour. You could use this as your practice playground as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*dHiLwU78oA2Iva-iL-WLDQ.png" /></figure><p>3. Some <strong>great CKAD Exercises</strong> have been compiled <a href="https://github.com/dgkanatsios/CKAD-exercises/">here</a>. Before you sit for the exam you should be able to solve all of this and must have attempted it more than 2 times. It is a great self-assessment of your preparedness.</p><p>Hope you liked this list of resources that I relied upon and if you found it useful, do show some love by clapping and sharing the same. TIA.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89e241101e99" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Security Hardening - Amazon Linux]]></title>
            <link>https://runcyoommen.medium.com/security-hardening-amazon-linux-589cf4fbe7c4?source=rss-5fe3b3b298b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/589cf4fbe7c4</guid>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[amazon-linux]]></category>
            <category><![CDATA[linux-hardening]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Runcy Oommen]]></dc:creator>
            <pubDate>Wed, 25 Mar 2020 10:07:34 GMT</pubDate>
            <atom:updated>2020-03-25T10:07:34.331Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Amazon Linux Security Hardening</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*PsQ2UDzU3tX9rfodCV-Kqg.png" /></figure><p>The default security settings of Amazon Linux 2 may not be the most strictest. In this brief write-up, I will try to explain how a couple of these configs can be hardened from a security perspective. Let’s get started…</p><h4>Upgrading OpenSSH to latest available version:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*lYxIcZgFOoCEd2CXgi51YQ.png" /></figure><p>The stock package of Amazon Linux comes with OpenSSH v7.4</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*63v0t8N482r1Bvc9dr87Yw.png" /></figure><p>This particular release happened sometime on 2016-Dec!!!</p><p>Multiple vulnerabilities have been reported on these older versions of OpenSSH with the most notable being the user enumeration attack as tracked by <a href="https://www.cvedetails.com/cve/CVE-2018-15473/">CVE-2018–15473</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*rHYuGpcdieMLAzHxq1FBGg.png" /></figure><p>Without further ado, let’s upgrade <strong>NOW!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*vQV9blIAEMiwgz3iK_2xog.png" /><figcaption>Query returns existing SSH package version</figcaption></figure><p>A word of caution here — If you try to upgrade with the old tried and tested way of <em>sudo yum update</em> it would not be fruitful as OpenSSH package does not get picked up during the upgrade</p><p>The way ahead would to be download the relevant <a href="https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/">latest available package</a> from openbsd.org, install all the relevant dependencies and compile/install the package for the upgrade. Phew! That’s a lot of work…well worry not as I’ve got you covered.</p><p>Use <a href="https://gist.github.com/roommen/18cd78d07b0fbc962de4e79c1d468f92">*this*</a> handy little script to do work this for you and maybe you can thank me by clapping on this article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*pn29Hb7qUYxvlvhLKIEQHA.png" /><figcaption>OpenSSH successfully upgraded</figcaption></figure><p>Once run, you should be able to see the upgraded SSH version</p><p><strong>SSH upgrade to the strongest available KeyExchanges &amp; Ciphers:</strong></p><p>Amazon Linux 2 comes with weak Ciphers and KeyExchange algorithms that have been proven to be cryptographically weak and susceptible for attack</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*wtkG3VExV99kLnTtyU1_tw.png" /><figcaption>Presence of weak ciphers/kex upon querying</figcaption></figure><p>Some of the know attacks possible with the above weak ciphers/kex are birthday attacks and Logjam-style attack that can undermine SSH security.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jfvjZqDZqpTkHtFi51obqA.png" /></figure><p>These should be removed and only strong ones kept for negotiations while establishing the client&lt;-&gt;server connectivity. So how do we do it? Well, if you had followed the first part of this blog above in upgrading the OpenSSH version, you already have the latest Ciphers &amp; KeyExchanges. You only have to re-enable the strong ones after the upgrade.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*MfXxnfYO2YJiglApogsemw.png" /><figcaption>The default Ciphers/KexAlgorithms</figcaption></figure><p>Query the man page for <em>sshd_config</em> and search for <strong>Ciphers</strong> and <strong>KexAlgorithms</strong> to get the default values after the latest OpenSSH upgrade</p><p>Now edit the <em>/etc/ssh/sshd_config</em> file to add the above provided default values in the preferred order as given below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hYO8szJo6gvXYlbtHLAaEA.png" /></figure><p>Restart (<em>sudo /etc/init.d/sshd restart</em>) the sshd service. Lo and behold your SSH is hardened to take on the big bad world of internet!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*RpAhYlBeyZqbuJ-UAEvrZg.png" /><figcaption>Weak CIphers/Kex removed successfully</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=589cf4fbe7c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GCP Professional Cloud Security Engineer — Preparation tips]]></title>
            <link>https://runcyoommen.medium.com/gcp-pcse-prep-tips-89d3b39eee4b?source=rss-5fe3b3b298b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/89d3b39eee4b</guid>
            <category><![CDATA[cloud-security-training]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[cloud-certification]]></category>
            <category><![CDATA[security-certifications]]></category>
            <dc:creator><![CDATA[Runcy Oommen]]></dc:creator>
            <pubDate>Fri, 20 Sep 2019 09:22:51 GMT</pubDate>
            <atom:updated>2019-09-20T09:22:51.247Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*_JnsLY_8jgTgZOeTtE0ysw.png" /></figure><h3>GCP Professional Cloud Security Engineer — Preparation tips</h3><h3>GCP Professional Cloud Security Engineer — Preparation tips</h3><p>It’s always a great feeling when you achieve something new and double sweet when it’s a little challenging. This was precisely what I felt when I cleared my Professional Cloud Security Engineer (PCSE) certification from Google Cloud this week. Just thought of penning down an article of the resources, materials and tutorials I followed in achieving this.</p><p>*** YOUR MILEAGE MAY VARY ***</p><p>1. Familiarize yourselves with the <a href="https://cloud.google.com/certification/guides/cloud-security-engineer/"><strong>Official Exam Guide</strong></a>. This is a great way to understand the topics covered in the exam and would help you have a mental gauge on where you stand before beginning the preparation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*RlWL6LA0INnBAZGEYx_8Kw.png" /></figure><p>2. Next up, attend the video lecture available at Pluralsight on <a href="https://www.pluralsight.com/courses/gcp-fundamentals">GCP Fundamentals: Core Infrastructure</a> that provides a 101 overview of core components w.r.t Google Cloud Platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*xzB_H1AEVR6k4doHBHTQNA.png" /></figure><p>3. Another great 101 course for GCP familiarity can be found at <a href="https://learn.acloud.guru/course/gcp-101/dashboard">A Cloud Guru</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*vyBjTQiHxuE_GaKsOpt6Dg.png" /></figure><p>4. If that’s not enough, there’s also a great video playlist on YouTube for <a href="https://www.youtube.com/playlist?list=PLIivdWyY5sqI_-9KtGd4aEMu7gEO2ZWja">Getting Started with Google Cloud Platform</a> and a great video on <a href="https://www.youtube.com/watch?v=vmOMataJZWw">GCP 101</a> from Cloud Next’19 too.</p><p>5. Associate Cloud Engineer (ACE) exam covers some aspects on security and it is recommended to look at the security sections from <a href="https://learn.acloud.guru/course/gcp-certified-associate-cloud-engineer/dashboard">this course</a> available at A Cloud Guru.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*OkCAo_0l7whlkHs4vaHc2g.png" /></figure><p>6. <a href="https://www.coursera.org/learn/managing-security-in-google-cloud-platform">Managing Security in Google Cloud Platform</a> is the official course from Google available at Coursera</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w0jIhzvfmXN6TdbNXHPayA.png" /></figure><p>7. Another must attend course — <a href="https://www.coursera.org/learn/mitigating-security-vulnerabilites-gcp">Mitigating Security Vulnerabilities on Google Cloud Platform</a> — again from the official GCP curriculum available at Coursera</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*buXk8YgK3nxn51hFfv7ejw.png" /></figure><p>8. <a href="https://linuxacademy.com/course/google-security-essentials/">Google Cloud Security Essentials</a> is a great video lecture course available at Linux Academy that I would recommend to supplement the security concepts learned above</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*8uadLLX3PpgLBl0IU0LM0w.png" /></figure><p>9. QwikLabs from Google is a great way to practice in real-time the concepts learnt above with a temporary GCP environment provisioned with appropriate resources. I would highly recommend to familiarize with these quests — <a href="https://www.qwiklabs.com/quests/40">Security &amp; Identity Fundamentals</a>, <a href="https://www.qwiklabs.com/quests/31">Networking in the Google Cloud</a>, <a href="https://www.qwiklabs.com/quests/64">Google Kubernetes Engine Best Practices: Security</a> and the logging/monitoring sections from <a href="https://www.qwiklabs.com/quests/35">StackDriver</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*FAM9HNESLdrJd9Ui36uCQg.png" /></figure><p>10. Understand aspects on <a href="https://www.pluralsight.com/courses/google-cloud-armor-security-scanner-data-loss-prevention-api-leveraging">Cloud Armor, Security Scanner and the DLP</a> aspects from a great course available at Pluralsight</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9lPzDV4jre3TI1CGvanO_g.png" /></figure><p>11. Lastly, <a href="https://linuxacademy.com/course/google-cloud-certified-professional-cloud-security-engineer/">Linux Academy</a> has also recently started a full blow PCSE course which at the time of this writing is at early access. You could definitely check that out too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*g4oHhvCrPMs6F2Aq-ambFg.png" /></figure><p>12. Test your skills with a <a href="https://cloud.google.com/certification/practice-exam/cloud-security-engineer">FREE practice exam</a></p><p>Phew! I guess that’s all to clearing this exam :) Please do let me know your thoughts and suggestions as well in the comments section.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89d3b39eee4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux permissions deep dive — Part 2]]></title>
            <link>https://runcyoommen.medium.com/linux-permissions-deep-dive-part-2-84a342c15eb7?source=rss-5fe3b3b298b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/84a342c15eb7</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[permission]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[file-management]]></category>
            <dc:creator><![CDATA[Runcy Oommen]]></dc:creator>
            <pubDate>Mon, 05 Dec 2016 19:42:49 GMT</pubDate>
            <atom:updated>2016-12-08T19:24:57.929Z</atom:updated>
            <content:encoded><![CDATA[<p>Managing Advanced Permissions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*4vWe0zr1glzkNcGtMzceVA.jpeg" /><figcaption>Credit: Google Images</figcaption></figure><p>You can find Part 1 of this series <a href="https://medium.com/@runcyoommen/linux-permissions-deep-dive-part-i-98cb577b7628#.fuux0a6e9">here</a>.</p><p>There are three advanced permissions — <em>set user ID</em> (<strong>SUID</strong>), <em>set group ID</em> (<strong>SGID</strong>) and <em>sticky bit</em>. Let’s look each of these permissions in detail:</p><p>Sometimes a user would need special permissions just for execution of a certain task (for e.g change his password). This would require writing to the <em>/etc/shadow</em> file which is write protected from users not having root permissions. <strong>SUID</strong> comes in handy for these situations and the utility (<em>/usr/bin/passwd) </em>to change one’s password has it enabled by default.</p><p>Here’s the output of 1s -1 which shows an <strong>s</strong> at the position of <strong>x</strong> in ‘user rights’ column:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*MWW4n0BqcrYe2CG7Y75Llg.png" /></figure><p>A practical use for the second special permission is a shared workspace between various users with common membership of a group. In this scenario the users can access others files. However, if <strong>SGID</strong> is applied to this shared directory all new files/directory created will get the group ownership.</p><p>Here’s the output of ls -1 which shows an <strong>s</strong> at the position of <strong>x</strong> in the ‘group rights’ column:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*d0qO8cLPHnqihtr-Uj_5cg.png" /></figure><p>The last of the special permission, <strong>sticky bit</strong>, is useful in shared environments with multiple users having write permission and where you would need to protect your files from accidental deletion. The /tmp directory by default has this permission turned on.</p><p>Here’s the output of ls -1 which shows a t at the position of x in the ‘other rights’ column:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*b57z4rfkD5fivoHo95nm-g.png" /></figure><p>It’s also important to bear in mind that these special permissions have varied effects when applied to files and directories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*mrdEMSU0JNrMDKyublvX2Q.png" /></figure><p>You use the <a href="https://linux.die.net/man/1/chmod"><em>chmod</em></a> command to set these permissions. Even they have numerical values associated which makes it easy to refer and manipulate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/304/1*yr1Z98y5NgZX5tidZ-UsSg.png" /></figure><p>Let’s look at few examples with these additional permissions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/183/1*JCq1uQw6XUqSut2eo7HnUQ.png" /></figure><p>Notice the extra digits at the beginning that signify sticky bit, SUID and SGID respectively.</p><p>We’re not finished yet. There’s also a slight deviation for all the three advanced permissions represented by <strong>S</strong> and <strong>T</strong> (both in capital letters). Let’s look at a sample ls -l listing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*lM9RX5halsu-2Zp_GcfPzg.png" /></figure><p>What this signifies is that the SUID, SGID and sticky bit are applied on the above file/directory <em>without</em> the execute bit (<strong>x</strong>). If the execute bit is set, they will be represented as <strong>s</strong> and <strong>t</strong> (both small letters).</p><h4><strong>Conclusion:</strong></h4><p>I hope to have given, with this two part blog series enough insight on the Linux permissions and hopefully widened your perspective of working with files/directories. Please let me know your thoughts (bouquets and brickbats) in the comments section.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84a342c15eb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux permissions deep dive — Part 1]]></title>
            <link>https://runcyoommen.medium.com/linux-permissions-deep-dive-part-i-98cb577b7628?source=rss-5fe3b3b298b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/98cb577b7628</guid>
            <category><![CDATA[file-management]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[permission]]></category>
            <category><![CDATA[terminal]]></category>
            <dc:creator><![CDATA[Runcy Oommen]]></dc:creator>
            <pubDate>Tue, 29 Nov 2016 13:49:22 GMT</pubDate>
            <atom:updated>2016-12-08T19:22:32.273Z</atom:updated>
            <content:encoded><![CDATA[<h4>Managing Basic Permissions:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*doC_qzokTdB0vIxGac6KHg.jpeg" /><figcaption>Credit: Google Images</figcaption></figure><p>Linux file/directory permission can be broken down as 3 columns each having three permissions (<strong><em>r</em></strong>ead, <strong><em>w</em></strong>rite and e<strong><em>x</em></strong>ecute) grouped for three types (<strong><em>u</em></strong>sers, <strong><em>g</em></strong>roups and <strong><em>o</em></strong>thers)</p><p>There’s also an additional column at the beginning which would indicate if it’s either a <em>d</em>irectory or a <em>l</em>ink.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*lA_PkCwrP2lKzG07F8HZuA.gif" /></figure><p>Here’s a sample output of <a href="https://linux.die.net/man/1/ls"><em>ls</em></a><em> -l</em> command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*-9L6MjNfLnPK3bGd6upcbw.png" /></figure><p>Let’s break it up to understand better:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*hR_N69PT3dc4DD0UlHy7Sg.png" /></figure><p>It is important to remember that these three permissions differs when applied to files or directories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*3UGP5hjqz0rvNi6OIhE0GQ.png" /></figure><p>You use the <a href="https://linux.die.net/man/1/chmod"><em>chmod</em></a> command which can be used to set the permissions (<strong>r</strong>ead, <strong>w</strong>rite and e<strong>x</strong>ecute) for user (<strong>u</strong>), group (<strong>g</strong>) and others (<strong>o</strong>). Few examples are shown for reference:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/191/1*KBwSkI3igeQnxwjxKy76ag.png" /></figure><p>Grants execute permission to user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/208/1*8CV7mgnJZZjpQUieT7_H7w.png" /></figure><p>Grants read to user and execute to group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/187/1*gDWdBvbCtvWO69V-g4QyJA.png" /></figure><p>Revokes read and execute from user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/178/1*ujRyz__tbh4Wv0EqAMIOYw.png" /></figure><p>Grants execute for user, group and other.</p><p>Linux permission also have a numerical value associated with each of them which makes it easy to refer and manipulate for each roles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/232/1*M42V2im5FFfKDdotQpsWBQ.png" /></figure><p>Few examples:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*MbDtTptnYWn6hCORr7z70Q.png" /></figure><p>Grants r,x to user and r to groups and others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/175/1*i2bTGyXOPmh8LVRYYhLwVw.png" /></figure><p>Grants r,w,x to user, w to group and nothing to others</p><p>The below Venn diagram gives a good perspective of the numerical values for easy reference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*M9n5hRdszy2rww4rJTXDrQ.png" /></figure><h4>Recursive e<em>X</em>ecute permission for only directories and not files:</h4><p>If you recall from the beginning of this article, execute permission when set on a directory makes you enter/access it, whereas setting execute permission on a file makes it run like a program or script. A directory created on the Linux filesystem has execute rights by default which makes directory traversal possible.</p><p>However, there may be situations when this could be missing and you would need to set execute permission for all folders and it’s sub-folders. Sure, this could be achieved with the <em>-R</em> (recursive) option of the chmod command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/172/1*vELcZzr2hOBOD6dv51MYFQ.png" /></figure><p>What the above command does is to set execute permission recursively not just for all the sub-folders but also for all the files (a potentially dangerous situation). You only need to selectively set it for just the folders and not any of the files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/171/1*tVpkLstyjBcktGVp0bMdhg.png" /></figure><p>With X (uppercase), it ensures that files will not get the execute permission unless the file has it set already which makes it a more intelligent way of dealing with execute permissions.</p><h4>Conclusion:</h4><p>Hope this post gave some insight into working with basic file/directory permissions of Linux. Please let me know your thoughts (bouquets and brickbats) in the comments section.</p><p><strong>Update:</strong> You can find <a href="https://medium.com/@runcyoommen/linux-permissions-deep-dive-part-2-84a342c15eb7#.fe6sdc57d">part 2</a> of this series which talks about advanced Linux permissions (SUID, SGID &amp; Sticky Bit).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98cb577b7628" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>