<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Uri Peled</title>
    <description>The latest articles on DEV Community by Uri Peled (@uripld).</description>
    <link>https://dev.to/uripld</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F272121%2Fd186dd74-3a3a-43e8-8fa2-63c051398e9f.jpg</url>
      <title>DEV Community: Uri Peled</title>
      <link>https://dev.to/uripld</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/uripld"/>
    <language>en</language>
    <item>
      <title>Zero-Trust Security in K8s Made Simple: Istio Ambient Mesh, No Sidecar Needed</title>
      <dc:creator>Uri Peled</dc:creator>
      <pubDate>Tue, 12 Nov 2024 20:36:31 +0000</pubDate>
      <link>https://dev.to/uripld/achieve-sidecar-less-mtls-for-k8s-pods-with-istios-ambient-mesh-28k</link>
      <guid>https://dev.to/uripld/achieve-sidecar-less-mtls-for-k8s-pods-with-istios-ambient-mesh-28k</guid>
      <description>&lt;p&gt;Service meshes have become a critical tool for managing the complexity and security of microservices architectures. However, the sidecar-based model, while powerful, has often introduced notable operational and resource overheads. &lt;/p&gt;

&lt;p&gt;Enter Ambient Mesh: Istio’s new, &lt;strong&gt;sidecar-free alternative&lt;/strong&gt; that simplifies service mesh adoption and reduces resource demands. Introduced as a GA feature, Ambient Mesh offers an innovative way to leverage Istio's robust zero-trust security without the complexity of sidecar proxies.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Sidecar Challenge
&lt;/h2&gt;

&lt;p&gt;Sidecar proxies are essential in traditional service mesh architectures, providing traffic management, security, and observability features alongside each service. However, they also bring substantial trade-offs, especially in large clusters where each service instance requires its own sidecar. This model often leads to high memory and CPU usage and increased operational complexity due to sidecar management and application restarts. For many teams, these drawbacks can hinder scalability and adoption. Ambient Mesh addresses these pain points by decoupling traffic control and security from individual application containers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;istioctl install --set profile=ambient --skip-confirmation

        |\
        | \
        |  \
        |   \
      /||    \
     / ||     \
    /  ||      \
   /   ||       \
  /    ||        \
 /     ||         \
/______||__________\
____________________
  \__       _____/
     \_____/

✔ Istio core installed ⛵️
✔ Istiod installed 🧠
✔ CNI installed 🪢
✔ Ztunnel installed 🔒
✔ Installation complete
The ambient profile has been installed successfully, enjoy Istio without sidecars!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How Ambient Mesh Works
&lt;/h2&gt;

&lt;p&gt;Ambient Mesh introduces ztunnels (zero-trust tunnels) on each node instead of injecting sidecar proxies into individual services. These ztunnels create a secure Layer 4 overlay network, supporting essential functions like mTLS encryption and basic traffic routing with significantly reduced resource demands. Since ztunnels handle only Layer 4 traffic, their lightweight nature makes Ambient Mesh resource-efficient and straightforward to implement.&lt;/p&gt;

&lt;p&gt;For teams needing more advanced Layer 7 functionality, such as detailed routing, retries, and telemetry, waypoint proxies can be deployed selectively to handle these tasks. This division of responsibilities between ztunnels and waypoint proxies offers fine-grained control, allowing teams to adopt a zero-trust foundation and layer on additional features only when needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fekfj1azzy6h9fuct38s9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fekfj1azzy6h9fuct38s9.png" alt="Image description" width="800" height="89"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You now have mTLS encryption between all your pods — 
without even restarting or redeploying any of the applications!

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Istio's model for redirecting traffic within pods:
&lt;/h2&gt;

&lt;p&gt;The core design principle of Istio's in-pod traffic redirection model in ambient mode is that the ztunnel proxy can capture data paths within the Linux network namespace of the workload pod. This capability is made possible through the collaboration between the istio-cni node agent and the ztunnel node proxy. A significant advantage of this model is that it allows Istio's ambient mode to function seamlessly with any Kubernetes CNI plugin, without disrupting Kubernetes networking features.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F56h8yv8p9mzn4pqgt53v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F56h8yv8p9mzn4pqgt53v.png" alt="mTLS status between the services" width="800" height="566"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Benefits of Ambient Mesh
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Resource Efficiency: By eliminating sidecars, Ambient Mesh cuts CPU and memory requirements by over 90% in many cases, freeing resources across the Kubernetes cluster.&lt;/li&gt;
&lt;li&gt;Simplified Operations: Ambient Mesh streamlines mesh deployment by removing the need for sidecar injection, enabling users to add applications to the mesh without downtime or container restarts.&lt;/li&gt;
&lt;li&gt;Flexible Security and Traffic Management: Organizations can begin with lightweight Layer 4 security through ztunnels, adding waypoint proxies only for services that require advanced Layer 7 traffic management, aligning with zero-trust principles and scalability needs.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Ideal Use Cases
&lt;/h2&gt;

&lt;p&gt;Ambient Mesh is particularly suited to organizations aiming to implement a zero-trust architecture with minimal resource and operational overhead. It’s also a perfect fit for teams looking to incrementally scale mesh adoption, starting with security and expanding to more complex traffic management only when required.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;In Mesh: a pod that is included in the ambient data plane, 
and has traffic intercepted at the Layer 4 level by ztunnel. 
In this mode, L4 policies can be enforced for pod traffic. 
This mode can be enabled by setting the
 ״istio.io/dataplane-mode=ambient״ label. 

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxvv7kl4se7e17rkgvwf7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxvv7kl4se7e17rkgvwf7.png" alt="Dataplane example for Layer 4 traffic" width="800" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Istio's Ambient Mesh mode offers a streamlined approach to service mesh architecture, removing the complexity of sidecar proxies while maintaining robust security and observability. For teams previously deterred by sidecar management, Ambient Mesh provides a compelling path forward, with reduced resource costs and an adaptable model that grows with application needs. As the feature matures, Ambient Mesh is poised to become an essential tool for Kubernetes users managing large, secure, and efficient clusters.&lt;/p&gt;

&lt;p&gt;For more details, check out the official &lt;a href="https://istio.io/latest/docs/ambient/" rel="noopener noreferrer"&gt;Istio documentation on Ambient Mesh&lt;/a&gt;&lt;/p&gt;

</description>
      <category>k8s</category>
      <category>mtls</category>
      <category>istio</category>
      <category>security</category>
    </item>
    <item>
      <title>How-to Connect JetBrains IDEs to Amazon RDS with AWS SSO</title>
      <dc:creator>Uri Peled</dc:creator>
      <pubDate>Mon, 06 Nov 2023 09:37:55 +0000</pubDate>
      <link>https://dev.to/uripld/how-to-connect-jetbrains-ides-to-amazon-rds-with-aws-sso-3abm</link>
      <guid>https://dev.to/uripld/how-to-connect-jetbrains-ides-to-amazon-rds-with-aws-sso-3abm</guid>
      <description>&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;Connecting your JetBrains IDE to Amazon RDS databases with AWS Single Sign-On (SSO) can be a powerful way to streamline your development workflow. This guide will walk you through the steps required for setup, both on the administrative and user sides. Let's get started!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2aEGcjKG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxkhedm48vd41wmpd7wp.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2aEGcjKG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxkhedm48vd41wmpd7wp.jpeg" alt="AWS SSO" width="315" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites for accessing Amazon RDS databases
&lt;/h3&gt;

&lt;p&gt;Before you can connect to an Amazon RDS database using AWS Toolkit for JetBrains, you need to complete the following tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/sdkref/latest/guide/access-sso.html"&gt;AWS organization with IAM Identity Center authentication configured &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AWS IAM Identity Center is the recommended best practice for managing your AWS account authentication.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/rds-access-prerequisities.html#db-authentication"&gt;Create a DB instance and set up its authentication method&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AWS Toolkit for JetBrains enables you to connect to an Amazon RDS DB instance that's already been created and configured in AWS. A DB instance is an isolated database environment running in the cloud that can contain multiple user-created databases.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/rds-access-prerequisities.html#datagrip-info"&gt;Download and install DataGrip&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ph3gBf54--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5608y7giilode70irr28.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ph3gBf54--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5608y7giilode70irr28.jpeg" alt="DataGrip" width="284" height="177"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Step 1: Creating a database account using IAM authentication&lt;br&gt;
 (By Admins)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With IAM database authentication, you don't need to assign database passwords to the user accounts you create. If you remove a user that is mapped to a database account, you should also remove the database account with the DROP USER statement.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using IAM authentication with MariaDB and MySQL&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With MariaDB and MySQL, authentication is handled by AWSAuthenticationPlugin—an AWS-provided plugin that works seamlessly with IAM to authenticate your users. Connect to the DB instance as the master user or a different user who can create users and grant privileges. After connecting, issue the CREATE USER statement, as shown in the following example.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;CREATE USER data_scientist IDENTIFIED WITH AWSAuthenticationPlugin AS 'RDS';&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using IAM authentication with PostgreSQL&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To use IAM authentication with PostgreSQL, connect to the DB instance as the master user or a different user who can create users and grant privileges. After connecting, create database users and then grant them the rds_iam role as shown in the following example.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;CREATE USER data_scientist; &lt;br&gt;
GRANT rds_iam TO data_scientist;&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Step 2: IAM Policy Setup (By Admins)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the AWS account, an IAM policy needs to be created with the following permissions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Grant the user permission to DescribeDBInstances and DescribeDBClusters.&lt;/li&gt;
&lt;li&gt;Grant the user permission to rds-db:connect, but only to the specified database instance (e.g., data-db) and for the database user (e.g., data_scientist). Note that you can set both permissions with conditional access based on your VPN IP.
Here's the IAM policy for reference:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "rds:DescribeDBInstances",
                "rds:DescribeDBClusters"
            ],
            "Resource": [
                "arn:aws:rds:us-east-1:01233456789:db:*",
                "arn:aws:rds:us-east-1:01233456789:cluster:*"
            ],
            "Condition": {
                "IpAddress": {
                    "aws:SourceIp": "123.456.78.901"
                }
            }
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "rds-db:connect",
            "Resource": "arn:aws:rds-db:us-east-1:01233456789:dbuser:*data-db*/data_scientist",
            "Condition": {
                "IpAddress": {
                    "aws:SourceIp": "123.456.78.901"
                }
            }
        }
    ]
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;Step 3: Attach the IAM Policy to Permission Set (By Admins)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/howtocmp.html"&gt;Attach the IAM policy (Customer managed policies)&lt;/a&gt; created in Step 1 to the Developers-Permission-Set or any other existing permission set. This step enables users to use JetBrains IDEs like DataGrip.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Step 4: DataGrip Setup (By Users)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Install DataGrip or any other JetBrains product like PyCharm.&lt;br&gt;
Install the DataGrip's &lt;a href="https://plugins.jetbrains.com/plugin/11349-aws-toolkit"&gt;AWS Toolkit&lt;/a&gt; plugins: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to Preferences &amp;gt; Plugins, search for AWS Toolkit, install it, and restart DataGrip.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The user should have the ~/.aws/credentials file on their computer.&lt;br&gt;
The profile must include the following additional arguments:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[profile test-rds-iam-auth]
sso_session = test-rds-iam-auth
sso_account_id = 01233456789
sso_role_name = test-rds-iam-auth
region = us-east-1
sso_start_url = https://uri-peled.awsapps.com/start#
sso_region = us-east-1

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Please note that the below 2 arguments are MUST:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sso_start_url = https://uri-peled.awsapps.com/start#
sso_region = us-east-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Step 5: SSO Configuration in DataGrip (By Users)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Complete the following steps to authenticate with your AWS account using existing IAM Identity Center credentials, from the AWS Toolkit for JetBrains.&lt;/p&gt;

&lt;p&gt;To sign in with IAM Identity Center using the AWS Toolkit for DataGrip (JetBrains), follow these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open AWS Connection Settings from the AWS Toolkit for JetBrains by clicking the ... (ellipsis) icon.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the AWS Connection Settings menu, select "Add New Connection" to open the AWS Toolkit: Add Connection dialog.&lt;br&gt;
In the AWS Toolkit: Add Connection dialog, choose the "Connect using AWS IAM Identity Center" option, enter your IAM Identity Center portal URL into the "Start URL" field, and click "Connect."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follow the prompts to complete the authentication process.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Step 6: Connect to Amazon RDS Database (By Users - when connecting)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In DataGrip:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the AWS Explorer if it isn't already open.&lt;/li&gt;
&lt;li&gt;Click the Amazon RDS node to expand the list of supported database engines.&lt;/li&gt;
&lt;li&gt;Right-click on a database and choose "Connect with IAM credentials."&lt;/li&gt;
&lt;li&gt;Verify connection settings and test the connection.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;This guide was created based on several AWS, JetBrains and GitHub issues, such as:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/rds-access-prerequisities.html#db-authentication"&gt;https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/rds-access-prerequisities.html#db-authentication&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/welcome.html"&gt;https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/welcome.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.DBAccounts.html#UsingWithRDS.IAMDBAuth.DBAccounts.PostgreSQL"&gt;https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.DBAccounts.html#UsingWithRDS.IAMDBAuth.DBAccounts.PostgreSQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/aws/aws-toolkit-jetbrains/issues/1238"&gt;https://github.com/aws/aws-toolkit-jetbrains/issues/1238&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/aws/aws-toolkit-jetbrains/issues/3032"&gt;https://github.com/aws/aws-toolkit-jetbrains/issues/3032&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion:
&lt;/h2&gt;

&lt;p&gt;With these steps, you can seamlessly connect your JetBrains IDE to Amazon RDS or even Redshift databases using AWS SSO. If you encounter any issues or have further questions, don't hesitate to reach out to me.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iY-lTQsU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vdpii7uadoq24evki1ae.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iY-lTQsU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vdpii7uadoq24evki1ae.png" alt="sso1" width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>jetbrains</category>
      <category>aws</category>
      <category>sso</category>
      <category>security</category>
    </item>
    <item>
      <title>Secure human Identity and access management for AWS EKS with SSO</title>
      <dc:creator>Uri Peled</dc:creator>
      <pubDate>Sun, 20 Mar 2022 12:51:37 +0000</pubDate>
      <link>https://dev.to/uripld/secure-human-identity-and-access-management-for-aws-eks-with-sso-36ni</link>
      <guid>https://dev.to/uripld/secure-human-identity-and-access-management-for-aws-eks-with-sso-36ni</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ix10ze6s42rs6omzhux.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ix10ze6s42rs6omzhux.jpeg" alt="AWS-EKS-IAM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the basics:
&lt;/h2&gt;

&lt;p&gt;AWS Identity and Access Management (&lt;a href="https://aws.amazon.com/iam/#:~:text=AWS%20Identity%20and%20Access%20Management%20(IAM)%20provides%20fine%2Dgrained,to%20ensure%20least%2Dprivilege%20permissions." rel="noopener noreferrer"&gt;IAM&lt;/a&gt;) provides fine-grained access control across all of AWS. With IAM, you can specify who can access which services and resources, and under which conditions.&lt;/p&gt;

&lt;p&gt;AWS Single Sign-On (&lt;a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html" rel="noopener noreferrer"&gt;AWS SSO&lt;/a&gt;) is a cloud service that allows you to grant your users access to AWS resources, such as Amazon EC2 instances, across multiple AWS accounts&lt;/p&gt;

&lt;p&gt;Amazon Elastic Kubernetes Service (&lt;a href="https://aws.amazon.com/eks/" rel="noopener noreferrer"&gt;Amazon EKS&lt;/a&gt;) is a managed service that you can use to run Kubernetes on AWS without needing to install, operate, and maintain your own Kubernetes control plane or nodes.&lt;/p&gt;

&lt;p&gt;Role-based access control (&lt;a href="https://en.wikipedia.org/wiki/Role-based_access_control" rel="noopener noreferrer"&gt;RBAC&lt;/a&gt;) is a method of restricting network access based on the roles of individual users within an enterprise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Authentication to your Kubernetes cluster
&lt;/h2&gt;

&lt;p&gt;Amazon EKS uses IAM to provide &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/cluster-auth.html" rel="noopener noreferrer"&gt;authentication to your Kubernetes cluster&lt;/a&gt; (through the aws eks get-token command, available in version 1.16.156 or later of the AWS CLI, or the AWS IAM Authenticator for Kubernetes), but it still relies on native Kubernetes Role Based Access Control (RBAC) for authorization.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkvvi6yut4j9eusy2zuzr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkvvi6yut4j9eusy2zuzr.png" alt="RBAC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The below should help you configure AWS EKS with SSO:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Ensure the cluster admin or whoever has access to run kubectl commands adds the SSO role to the aws-auth ConfigMap (this is used to manage access on the cluster):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; kubectl create configmap my-config-aws-auth --from-file=path/to/file/aws-auth.properties
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The file "aws-auth.properties" can look like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: v1 
kind: ConfigMap 
metadata: 
  name: aws-auth 
  namespace: kube-system 
data: 
  mapRoles: | 
    - rolearn: arn:aws:iam::11122223333:role/EKS-DevOpsAdmin 
      username: system:node:{{EC2PrivateDNSName}} 
      groups: 
        - system:bootstrappers 
        - system:nodes 
  mapUsers: | 
    - userarn: arn:aws:iam::11122223333:user/designated_user 
      username: designated_user 
      groups: 
        - system:masters
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Ensure you are logged into the SSO role from your CLI/Shell/CMD. Run ($ 'aws sts get-caller-identity' ) to verify&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you are not sure how-to login into the SSO role, see this &lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html" rel="noopener noreferrer"&gt;Configuring the AWS CLI to use AWS Single Sign-On
&lt;/a&gt;. Basically you will need to run &lt;code&gt;aws sso login&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Ensure that the SSO role has access to run eks:DescribeCluster on the cluster you intend to connect to.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;You can use &lt;a href="https://awspolicygen.s3.amazonaws.com/policygen.html" rel="noopener noreferrer"&gt;AWS Policy Generator&lt;/a&gt; tool that enables you to create policies that control access to Amazon Web Services (AWS) products and resources.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;For least privilege use the below IAM Policy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "EKSDescribeClusterPolicy",
      "Action": [
        "eks:DescribeCluster"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For managing the entire AWS EKS service you can either go with your AdministratorAccess role or EKS specific admin policy :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "EKSAdminPolicy",
      "Action": "eks:*",
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Configures kubectl so that you can connect to an Amazon EKS cluster:
$ &lt;code&gt;aws eks update-kubeconfig --name cluster_name&lt;/code&gt; 
this creates the kubeconfig in &lt;code&gt;/home/user/.kube/config&lt;/code&gt; and the kubeconfig also have the aws eks get token command inside&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The above instructions are for an existing cluster and you should be able to use them one by one in order to secure human Identity and access management for AWS EKS with SSO.
&lt;/h3&gt;

&lt;p&gt;Please let me know if you have any questions or feedback&lt;/p&gt;

</description>
      <category>aws</category>
      <category>sso</category>
      <category>eks</category>
      <category>devops</category>
    </item>
    <item>
      <title>Iron Dome = 'Security Policies' at scale for your Multi-Cloud accounts</title>
      <dc:creator>Uri Peled</dc:creator>
      <pubDate>Mon, 27 Dec 2021 16:59:27 +0000</pubDate>
      <link>https://dev.to/uripld/iron-dome-security-policies-at-scale-for-your-multi-cloud-accounts-2ke0</link>
      <guid>https://dev.to/uripld/iron-dome-security-policies-at-scale-for-your-multi-cloud-accounts-2ke0</guid>
      <description>&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=_eSZaCHXBVA"&gt;IRON DOME&lt;/a&gt; (AKA Kippat Barzel) is a mobile all-weather, multi-purpose combat proven system that detects, assesses and intercepts incoming artillery, It truly protects the cloud of Israel day and night.&lt;br&gt;
Also in the Star Trek fictional universe, shields refer to a 23rd and 24th century technology that provides starships, space stations, and entire planets with limited protection against damage.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Pragmatic Approach to Scaling Security in the Cloud
&lt;/h3&gt;

&lt;p&gt;Companies that provide "cloud" computing services, such as Amazon, Google and Microsoft put in place Defense in Depth strategy, adding an additional layer of protection to mitigate unknown vulnerabilities on complex infrastructures.&lt;br&gt;
In this post we will review some of the best preventive protection you can define in your cloud accounts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6EoYDwJR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/larf6uc2hj0lzi7970w9.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6EoYDwJR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/larf6uc2hj0lzi7970w9.jpeg" alt="star trek" width="697" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's start with AWS
&lt;/h2&gt;

&lt;p&gt;AWS Service Control Policies (SCPs) are a way of restricting the actions that can be taken in an AWS account so that all IAM users and roles, and even the root user cannot perform them. This feature is part of AWS Organizations, and the SCPs are controlled by the Organization Master account. &lt;br&gt;
See the &lt;a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html#scp-effects-on-permissions"&gt;Effects on permissions&lt;/a&gt; in the AWS Organizations User Guide and Determining whether a request is allowed or denied within an account in the IAM User Guide.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iK93-pnO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/14cu6u02xtbh3s1nfxy1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iK93-pnO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/14cu6u02xtbh3s1nfxy1.png" alt="Effects on permissions" width="800" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At &lt;a href="https://asecure.cloud/l/scp/"&gt;asecure.cloud&lt;/a&gt; you can find a repository of AWS SCP templates and examples that can be deployed using CloudFormation custom resource or AWS CLI scripts. &lt;br&gt;
Not like in the Israeli film, Operation Grandma, I will quote and will not recommend you "to start your fastest, and slowly to increase the pace", but you can start by deny console access to newly created IAM users, The SCP is constructed to prevent  action which would deny creating of password for IAM user. What we achieve with such a policy is that all the new users we create will have only programmatic access, and all human users will login through AWS Single Sign-On. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KbN4BhS---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ou8ace0kzwabsws2xwng.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KbN4BhS---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ou8ace0kzwabsws2xwng.png" alt="CreateLoginProfile" width="510" height="201"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will be able to create an IAM user, however, the new user will have the  section disabled by default, thus restricting the new IAM users from accessing the console.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pWFqoQtv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/91m6r67axd2kd1zio2c1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pWFqoQtv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/91m6r67axd2kd1zio2c1.png" alt="Console password2" width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One more cool &lt;a href="https://asecure.cloud/a/scp_protect_iam_principal/"&gt;policy&lt;/a&gt; you can use is restricted IAM principals in any account from making changes to our Security Audit IAM roles created in each AWS account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iwbFTAVE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qtvzpt4comhymzpyym98.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iwbFTAVE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qtvzpt4comhymzpyym98.png" alt="master account" width="800" height="84"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  We will continue with GCP
&lt;/h2&gt;

&lt;p&gt;Google's Organization Policy Service gives you centralized and programmatic control over your organization's cloud resources. As the organization policy administrator, you will be able to configure constraints across your entire resource hierarchy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G9txviPz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4mia0cfboen70ct112la.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G9txviPz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4mia0cfboen70ct112la.png" alt="Google's Organization Policy Service" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would start here from those that will help us minimize as much future misconfiguration as for example&lt;br&gt;
&lt;a href="https://cloud.google.com/storage/docs/org-policy-constraints#public-access-prevention"&gt;Enforce public access prevention&lt;/a&gt; When you apply the publicAccessPrevention constraint on a resource, public access is restricted for all buckets and objects, both new and existing, under that resource.&lt;/p&gt;

&lt;p&gt;The 2nd constraint I would go for in GCP is the&lt;br&gt;
&lt;a href="https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints#:~:text=Cloud%20SQL-,Restrict%20Public%20IP%20access%20on%20Cloud%20SQL%20instances,-This%20boolean%20constraint"&gt;Restrict Public IP access on Cloud SQL instances&lt;/a&gt;&lt;br&gt;
I encourage you to read this article by Google about &lt;a href="https://medium.com/google-cloud/cloud-sql-with-private-ip-only-the-good-the-bad-and-the-ugly-de4ac23ce98a"&gt;Cloud SQL with private IP only: the Good, the Bad and the Ugly&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I recommend you to use a native tool that Google has developed that will help you with Investigating issues as to why a user has access to a resource or does not have permission to call an API - you can find more and how to use it in this video about &lt;a href="https://www.youtube.com/watch?v=CbU2NKX6Dxc"&gt;Policy Troubleshooter&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  And let's wind up with Azure
&lt;/h1&gt;

&lt;p&gt;Azure Policy helps to enforce organizational standards and to assess compliance at-scale. Through its compliance dashboard, it provides an aggregated view to evaluate the overall state of the environment, with the ability to drill down to the per-resource, per-policy granularity.&lt;br&gt;
I regularly find that Azure always like to complicate the settings and are most of the time much more difficult for implementation, compared to other cloud providers, so keep that in mind. Therefore I highly recommend you to watch this &lt;a href="https://www.youtube.com/watch?v=9WO4EBgUJXk"&gt;video&lt;/a&gt; that explains (not briefly) the service.&lt;/p&gt;

&lt;p&gt;Azure shared with us a &lt;a href="https://github.com/Azure/azure-policy"&gt;GitHub repository contains built-in samples of Azure Policies&lt;/a&gt; that can be used as reference for creating and assigning policies to your subscriptions and resource groups. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cfRrtGnC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tjy2tt7gmze5c8q2ctez.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cfRrtGnC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tjy2tt7gmze5c8q2ctez.png" alt="Azure Policies" width="602" height="251"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In some organizations there is a requirement from the FinOps team that all of Azure resources must be tagged with a specific set of tags, which were ultimately to be used for cost accounting when the bill came rolling in.&lt;br&gt;
I found that the best way to ensure that this rule is enforced is to use Azure Policy, You can use the &lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/tag-policies#:~:text=Inherit%20a%20tag%20from%20the%20resource%20group%20if%20missing"&gt;Inherit a tag from the resource group if missing&lt;/a&gt;, the policy description: Adds the specified tag with its value from the parent resource group when any resource missing this tag is created or updated. Existing resources can be remediated by triggering a remediation task. If the tag exists with a different value it will not be changed. &lt;/p&gt;

&lt;p&gt;Thanks for reading this tutorial.&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>security</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>The Back-Pass Rule That Changed the Game</title>
      <dc:creator>Uri Peled</dc:creator>
      <pubDate>Sun, 29 Aug 2021 20:36:15 +0000</pubDate>
      <link>https://dev.to/uripld/the-back-pass-rule-that-changed-the-game-1981</link>
      <guid>https://dev.to/uripld/the-back-pass-rule-that-changed-the-game-1981</guid>
      <description>&lt;h2&gt;
  
  
  It’s good to have goals
&lt;/h2&gt;

&lt;p&gt;With Higuita behind them, the defensive line of Colombia could push higher up the field, pressing the opposition to win the ball back. Then, when in possession, they were a more compact unit, with lots of options for their trademark short passing.&lt;/p&gt;

&lt;p&gt;Not even &lt;em&gt;David Beckham&lt;/em&gt;, &lt;em&gt;Diego Maradona&lt;/em&gt; or &lt;em&gt;Messi&lt;/em&gt; can say they changed the game. &lt;br&gt;
But to your surprise, the former Colombian &lt;strong&gt;goalkeeper&lt;/strong&gt; Rene Higuita, &lt;strong&gt;changed the game&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At 1992, with Higuita's high-risk 'sweeper-keeper' playing style in mind, it was decided by FIFA that goalkeepers had to play with their feet. You must play the ball back to them and they can’t pick it up.&lt;/p&gt;
&lt;h2&gt;
  
  
  Pause, rewind, play:
&lt;/h2&gt;

&lt;p&gt;Now days we have video referees and goalline technology, but while this tech have started fresh conversations about the hard laws of the soccer game, the machines themselves have not changed the rules instead they have allowed them to be scrutinised more closely – perhaps too closely, but that’s an argument for another time.&lt;/p&gt;
&lt;h3&gt;
  
  
  Now you're probably wondering why you're reading a soccer story in a post about cloud security
&lt;/h3&gt;

&lt;p&gt;Just like today's "modern football", these days, the advent of SaaS applications has accelerated the pace of business and introduced a host of new cybersecurity concerns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q: So how can goalkeepers in the cloud-native world ensure security?&lt;br&gt;
A: They change the rules!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So while FIFA/Hackers continues to toy with the Laws of the Game, here is a suggested rule change to make this beautiful game of ours even more beautiful/secure:&lt;/p&gt;

&lt;p&gt;Imagine you have a group named &lt;code&gt;R.Madrid&lt;/code&gt;. &lt;br&gt;
Members of &lt;code&gt;R.Madrid&lt;/code&gt; should not be allowed to access any Amazon S3 resources except the &lt;code&gt;Madrid&lt;/code&gt; folder in the &lt;code&gt;Spanish League&lt;/code&gt; bucket. And certainly not to access anything related to the &lt;code&gt;Barcelona&lt;/code&gt; folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
   "Version":"2012-10-17",
   "Statement":[
      {
         "Effect":"Allow",
         "Action":[
            "s3:ListBucket"
         ],
         "Resource":[
            "arn:aws:s3:::SpanishLeagueBucket/Madrid"
         ]
      },
      {
         "Effect":"Allow",
         "Action":[
            "s3:PutObject",
            "s3:GetObject",
            "s3:DeleteObject"
         ],
         "Resource":[
            "arn:aws:s3:::SpanishLeagueBucket/Madrid/*"
         ]
      },
      {
         "Effect":"Deny",
         "NotAction":"s3:*",
         "NotResource":[
            "arn:aws:s3:::SpanishLeagueBucket/Madrid",
            "arn:aws:s3:::SpanishLeagueBucket/Madrid/*"
         ]
      }
   ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above is &lt;code&gt;IAM resource-based policy&lt;/code&gt; that can be used in order to limit access to a specific resource by explicitly deny all operations that require other services. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"NotResource is an advanced policy element that explicitly matches every resource except those specified"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Cool Links: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/awsdocs/iam-user-guide/blob/main/doc_source/reference_policies_elements_notresource.md"&gt;github-awsdocs&lt;/a&gt; IAM JSON policy elements: NotResource.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html"&gt;awsdocs&lt;/a&gt; IAM JSON policy elements reference.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://ermetic.com/whats-new/blog/the-importance-of-identity-and-access-management-iam-in-cloud-infrastructure/"&gt;ermetic.com&lt;/a&gt; The Importance of Identity and Access Management (IAM) in Cloud Infrastructure.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Ren%C3%A9_Higuita"&gt;René Higuita From Wikipedia&lt;/a&gt; pioneering in influencing goalkeepers to take more responsibility for situations further from the goal.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=TRj3dKKp9tI"&gt;Higuita's Incredible Scorpion Kick&lt;/a&gt; Goalkeeper René Higuita's Incredible Scorpion Kick.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>soccer</category>
      <category>iam</category>
      <category>cloud</category>
      <category>security</category>
    </item>
  </channel>
</rss>
