<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Security &amp; Compliance Archives | Cloudar</title>
	<atom:link href="https://cloudar.be/category/security-compliance/feed/" rel="self" type="application/rss+xml" />
	<link>https://cloudar.be/category/security-compliance/</link>
	<description>100% Focus On AWS // 100% Customer Obsession</description>
	<lastBuildDate>Tue, 17 Mar 2026 08:10:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Dear SaaS Vendor, We&#8217;ve Been Waiting Since 2017.</title>
		<link>https://cloudar.be/awsblog/dear-saas-vendor-weve-been-waiting-since-2017/</link>
		
		<dc:creator><![CDATA[Tom De Blende]]></dc:creator>
		<pubDate>Tue, 17 Mar 2026 07:27:19 +0000</pubDate>
				<category><![CDATA[Managed Services]]></category>
		<category><![CDATA[MSP]]></category>
		<category><![CDATA[Security & Compliance]]></category>
		<category><![CDATA[Serverless]]></category>
		<category><![CDATA[Well-Architected]]></category>
		<guid isPermaLink="false">https://cloudar.be/?p=22717</guid>

					<description><![CDATA[<p>Let me tell you about two feature requests. The first one was filed on November 19, 2017. Seven years ago. The ask: let an admin change a customer&#8217;s email address in Jira Service Management. Not migrate accounts through a four-step workaround involving Atlassian ID. Just&#8230; change an email address. The kind of thing you&#8217;d expect [&#8230;]</p>
<p>The post <a href="https://cloudar.be/awsblog/dear-saas-vendor-weve-been-waiting-since-2017/">Dear SaaS Vendor, We&#8217;ve Been Waiting Since 2017.</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Let me tell you about two feature requests.</p>
<p>The first one was filed on November 19, 2017. Seven years ago. The ask: let an admin change a customer&#8217;s email address in Jira Service Management. Not migrate accounts through a four-step workaround involving Atlassian ID. Just&#8230; change an email address. The kind of thing you&#8217;d expect a junior developer to ship on a Tuesday afternoon. As of today, it has 779 votes, 447 watchers, and a status of <em>&#8220;Future Consideration.&#8221;</em> Which, in SaaS-speak, translates roughly to: &#8220;we heard you, we filed it, please stop asking.&#8221;</p>
<p>The second one landed in January 2019. The request: make Confluence&#8217;s alphabetical page sorting persistent, so new pages don&#8217;t just pile up at the bottom like uninvited guests. Six years later: 600 votes, 261 watchers, status <em>&#8220;Under Consideration.&#8221;</em> Progress!</p>
<p>Now, to be fair to Atlassian, they&#8217;re not uniquely terrible. Every major SaaS vendor has a graveyard of feature requests exactly like these. Sensible, obvious, clearly wanted by thousands of paying customers. Just&#8230; never quite prioritized. Because they have a roadmap. And you&#8217;re not on it.</p>
<p>This is the part of the SaaS brochure they don&#8217;t show you.</p>
<p><strong>The Pitch vs. The Reality</strong></p>
<p>SaaS vendors are exceptionally good at one thing before you sign: making you feel like you&#8217;re about to get exactly what you need. The demos are polished. The slide decks are beautiful. The onboarding is smooth. Eighty percent of your requirements? Covered, on day one.</p>
<p>It&#8217;s that remaining twenty percent where things get interesting.</p>
<p>That twenty percent is where your actual workflows live. The edge cases. The things specific to how your organization actually operates. And when you file a support ticket asking about them, you enter a fascinating parallel universe where time moves differently. Features are &#8220;on the roadmap.&#8221; Updates will come &#8220;in a future release.&#8221; Your vote has been registered. Thank you for your feedback.</p>
<p>Meanwhile, you&#8217;re paying. Every month. For the product as it exists, not as it was promised.</p>
<p><strong>The Numbers Are Telling</strong></p>
<p>The scale of SaaS sprawl is difficult to overstate. According to BetterCloud&#8217;s annual State of SaaSOps report, the average number of SaaS applications per company peaked at 130 in 2022 and even after a wave of consolidation, still sits at over 100 today. That&#8217;s more than 100 subscriptions to manage, renew, secure, and integrate. For every single organization.</p>
<p>The waste embedded in that sprawl is just as striking. Gartner estimates that approximately 30% of purchased SaaS licenses go unused, what they bluntly call &#8220;toxic spend.&#8221; BetterCloud puts a price tag on it: companies report wasting an average of more than $135,000 per year on unused software licenses alone. And Gartner projects SaaS spending will continue growing at around 19% annually, reliably outpacing the budgets meant to fund it.</p>
<p>Do the arithmetic on a typical mid-market tool. Fifty users. €50 per user per month. That&#8217;s €30,000 per year. Every year. With annual price increases that arrive in your renewal email as a polite fait accompli. After five years, you&#8217;ve spent €150,000-plus on software you don&#8217;t own, can&#8217;t modify, and can&#8217;t easily leave and somewhere between a quarter and a third of those licenses have been sitting idle.</p>
<p><strong>Something Changed</strong></p>
<p>Here&#8217;s what&#8217;s different in 2026: building software got dramatically cheaper and faster. Not incrementally but by an order of magnitude.</p>
<p>Tools like Claude Code and Kiro represent a new category of agentic coding assistants. They don&#8217;t just suggest the next line. They can take a requirement, reason through a solution, write the code, test it, catch errors, and iterate, with minimal human supervision. What previously required a team of developers and months of work can now be done by one technically capable person in days.</p>
<p>This isn&#8217;t science fiction. It&#8217;s happening right now in engineering teams across the world.</p>
<p>And it fundamentally changes the math on one of the oldest questions in IT: should we build or buy?</p>
<p><strong>What You Get When You Build Your Own</strong></p>
<p>When you build a custom application -even a relatively simple internal tool- you build exactly what you need. No more, no less. You control the data model, the workflow, the integrations, and the roadmap. And critically: you decide what gets built next. Not a product manager in Sydney who&#8217;s never seen your workflows.</p>
<p>Running on cloud-native infrastructure like AWS means scalability, security, and availability are largely handled by the platform. The operational gap between &#8220;something you built&#8221; and &#8220;something a vendor hosts for you&#8221; has narrowed considerably. And the cost gap has flipped.</p>
<p>A custom-built equivalent to that €30,000/year SaaS tool, developed with AI-assisted tooling and running on serverless AWS infrastructure, might cost a fraction of that annually in operational expenses, after a one-time build investment that has also come down dramatically. More importantly: you own the asset. It does exactly what you need. And you&#8217;re not waiting seven years for someone to let you update an email address.</p>
<p><strong>A Word of Honesty</strong></p>
<p>Custom software isn&#8217;t free of responsibility. Someone has to maintain it, secure it, and evolve it. The SaaS argument, that someone else handles the infrastructure, the uptime and the patches, is not without merit. And for commodity functions like email, video conferencing, or payroll, that argument still wins. These are solved problems. Building your own would be an expensive act of reinvention.</p>
<p>But pairing custom-built applications with managed cloud services gives you the operational coverage of SaaS without the product dependency. You get uptime. You get security. You get to decide what comes next.</p>
<p><strong>So What Should You Actually Do?</strong></p>
<p>Not everything should be custom-built. That would be its own kind of madness.</p>
<p>The question worth asking is simpler: where are your core differentiating workflows? The processes that encode years of operational knowledge. The edge cases that keep showing up in feature request threads, yours and everyone else&#8217;s, year after year, status unchanged.</p>
<p>Those are exactly the features that will never quite make it onto a SaaS vendor&#8217;s roadmap.</p>
<p>The question is no longer &#8220;can we afford to build?&#8221; The question, in 2026, is whether you can afford to keep waiting.</p>
<p>JSDCLOUD-5746 would like a word.</p>
<p>The post <a href="https://cloudar.be/awsblog/dear-saas-vendor-weve-been-waiting-since-2017/">Dear SaaS Vendor, We&#8217;ve Been Waiting Since 2017.</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>AWS Secrets Management: Protecting Your Digital Keys in the Cloud</title>
		<link>https://cloudar.be/awsblog/aws-secrets-management-protecting-your-digital-keys-in-the-cloud/</link>
		
		<dc:creator><![CDATA[Bart Coddens]]></dc:creator>
		<pubDate>Mon, 26 Jan 2026 09:53:12 +0000</pubDate>
				<category><![CDATA[Compliance]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Security & Compliance]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://cloudar.be/?p=22648</guid>

					<description><![CDATA[<p>Introduction Creating and managing secrets is perhaps as old as humans interacting with each other. Yet despite their critical importance, secrets remain one of the most vulnerable aspects of AWS infrastructure today. In our practice as Dev(Sec)Ops Engineers, we see these challenges daily accross our client environments. To start, the question needs to be asked: [&#8230;]</p>
<p>The post <a href="https://cloudar.be/awsblog/aws-secrets-management-protecting-your-digital-keys-in-the-cloud/">AWS Secrets Management: Protecting Your Digital Keys in the Cloud</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>Creating and managing secrets is perhaps as old as humans interacting with each other. Yet despite their critical importance, secrets remain one of the most vulnerable aspects of AWS infrastructure today. In our practice as Dev(Sec)Ops Engineers, we see these challenges daily accross our client environments.</p>
<p>To start, the question needs to be asked: “What exactly is a secret?”  In AWS and Cloud environments in general, a secret is anything used to access systems and/or data. These digital keys unlock potentially critical systems and must be protected from unauthorized access at all costs.</p>
<p>&nbsp;</p>
<p>As Dev(Sec)Ops Engineers working in AWS, you are responsible for managing an extensive arry of secrets:</p>
<p>&nbsp;</p>
<ul>
<li>RDS database usernames and passwords</li>
<li>API keys for AWS services and third-party integrations</li>
<li>CodeDeploy and deployment system credentials</li>
<li>KMS encryption keys for data protection</li>
<li>Private keys for SSL/TLS certificates and secure communications</li>
<li>EC2 SSH keys and key pairs</li>
<li>IAM user credentials for developers, QA, and operations teams</li>
<li>Application service accounts and roles</li>
<li>Any username/password combinations</li>
<li>Sensitive configuration data that could aid attackers</li>
</ul>
<p>&nbsp;</p>
<p>The challenge is not just the volume … it&#8217;s the complexity of securing these secrets across multiple AWS accounts and other environments while maintaining operational efficiency.</p>
<p>&nbsp;</p>
<h2>The Hidden Dangers: How Secrets Get Compromised in AWS</h2>
<h3> The Configuration File Trap</h3>
<p>Storing secrets in configuration files is convenient but dangerous, especially in AWS environments where these files often end up in S3 buckets or EC2 instances. This risk was nicely illustrated in the RSA conference presentation &#8220;Red Team vs Blue Team on AWS&#8221; by Kolby Allen and Teri Radichel: <a href="https://www.youtube.com/watch?v=pnwNtlwFYus" target="_blank" rel="noopener">Link to video</a></p>
<p>In the video Kolby deployed AWS resources using sample code found easily on the Internet.  Teri, simulating an attacker, conducted a penetration test and discovered a Lambda function’s configuration file stored in a S3 bucket (for convenience) complete with REDS database credentials in plain tekst.</p>
<p>&nbsp;</p>
<p>If you must use configuration files in AWS:</p>
<ul>
<li>Maintain separate files for development, QA, and production AWS accounts</li>
<li>NEVER commit these files to source control systems (GitHub, GitLab, Bitbucket)</li>
<li>Use S3 bucket policies and encryption, but understand this is still suboptimal</li>
<li>Consider AWS Systems Manager Parameter Store as a minimum improvement</li>
</ul>
<p>&nbsp;</p>
<p>This vulnerability is so important that it’s formally recognized in the MITRE attack framework:  [CWE-200: Exposure of Sensitive Information] (<a href="https://cwe.mitre.org/data/definitions/200.html" target="_blank" rel="noopener">link</a>)</p>
<p>&nbsp;</p>
<h2>Public Source Control: A Goldmine for AWS Account Takeovers</h2>
<p>The most devastating secrets management failures occur when AWS credentials are committed to public repositories. The scale of this problem is staggering.</p>
<p>The people at TruffleHog constructed a live scanner for this:</p>
<p><a href="https://forager.trufflesecurity.com/explore">https://forager.trufflesecurity.com/explore</a></p>
<p>This scanner continuously detects AWS access keys, secrets keys and other credentials in public Github commits, revealing the massive and constant stream of exposed AWS and other secrets.</p>
<p>&nbsp;</p>
<p>This has a widespread impact: TruffleHog researchers discovered approximately 4,500 secrets among the top 1 million websites, many of which were AWS credentials, as detailed in their comprehensive analysis:</p>
<p><a href="https://trufflesecurity.com/blog/4500-of-the-top-1-million-websites-leaked-source-code-secrets">https://trufflesecurity.com/blog/4500-of-the-top-1-million-websites-leaked-source-code-secrets</a></p>
<p>&nbsp;</p>
<p>Leaking these secrets can have far reaching financial consequences:</p>
<p>&nbsp;</p>
<p>A Reddit user faced a 26.000 $ bill after IAM was compromised to execute crypto miners:</p>
<p><a href="https://www.reddit.com/r/aws/comments/17p3v1e/account_got_hacked_and_get_26000k_bill/">https://www.reddit.com/r/aws/comments/17p3v1e/account_got_hacked_and_get_26000k_bill/</a></p>
<p>&nbsp;</p>
<p>A Developper was billed 14.000 $ on AWS following similar exposure:</p>
<p><a href="https://dev.to/juanmanuelramallo/i-was-billed-for-14k-usd-on-amazon-web-services-17fn">https://dev.to/juanmanuelramallo/i-was-billed-for-14k-usd-on-amazon-web-services-17fn</a></p>
<p>&nbsp;</p>
<p>AWS responded on these massive bills and is now actively scanning GitHub respositories through their AWS Credentials Exposed program and automatically disables discovery IAM access keys, but the frequency of these incidents remains alarmingly high as shown by the Trufflehog data.</p>
<p>&nbsp;</p>
<h2>Internal Systems: The False Security Blanket in AWS</h2>
<p>Private repositories and internal systems create a dangerous illusion of security, even within AWS environments. The 2020 Twitter breach perfectly illustrates this vulnerability:</p>
<p>&nbsp;</p>
<p>Attackers breached the perimeter, accessed internal Slack channels where developers had stored AWS credentials and other secrets, and used these to compromise infrastructure in a widely publicized incident:</p>
<p><a href="https://www.zdnet.com/article/twitter-says-hackers-accessed-dms-for-36-users-in-last-weeks-hack">https://www.zdnet.com/article/twitter-says-hackers-accessed-dms-for-36-users-in-last-weeks-hack</a></p>
<p>&nbsp;</p>
<p>Secrets embedded in code even in fully private AWS services, proliferate across AWS services and do appear in:</p>
<ul>
<li>CloudWatch logs from Lambda functions and EC2 instances</li>
<li>S3 bucket access logs</li>
<li>CloudTrail event data</li>
<li>Application Load Balancer logs</li>
<li>Systems Manager Session Manager history</li>
</ul>
<p>As such they do create additional attack vectors within your AWS environment.</p>
<p>&nbsp;</p>
<h2>Runtime Exposure: Secrets in AWS Production Workloads</h2>
<p>Running AWS applications create numerous opportunities for secret exposure:</p>
<ul>
<li>Configuration files within EC2 instances or container images</li>
<li>Environment variables visible in ECS task definitions or Lambda configurations</li>
<li>Memory dumps from EC2 instances containing sensitive data</li>
<li>Application caches in ElastiCache storing credentials</li>
<li>CloudWatch logs revealing secrets in error messages</li>
<li>EC2 instance metadata (IMDSv1) exposing IAM credentials</li>
<li>Unencrypted S3 bucket metadata and tags</li>
<li>AWS CloudShell command history</li>
<li>Bash history on EC2 instances</li>
<li>Container image layers in ECR with embedded secrets</li>
</ul>
<p>This non-exhaustive list demonstrates how secrets can leak from multiple AWS vectors without proper handling.</p>
<p>&nbsp;</p>
<h2>What does AWS offer to fight this battle ? AWS Native Secrets Management</h2>
<h3>Adopt Just-in-Time Secret Retrieval with AWS Services</h3>
<p>Core Principle: Store secrets in AWS-native management systems and retrieve them only when needed.</p>
<p>Instead of embedding secrets in configuration files, implement this AWS-secure workflow:</p>
<ol>
<li>Store secrets in AWS Secrets Manager or Systems Manager Parameter Store</li>
<li>Retrieve secrets programmatically using AWS SDKs at runtime</li>
<li>Use IAM roles and policies for access control</li>
<li>Clear secrets from memory when no longer needed</li>
</ol>
<p>&nbsp;</p>
<h3>AWS Access Control: Implement least-privilege IAM principles</h3>
<ul>
<li>Developers cannot access production secrets via IAM policies</li>
<li>Applications use IAM roles to retrieve only their required secrets</li>
<li>Cross-account access is controlled via resource-based policies</li>
</ul>
<p>&nbsp;</p>
<h3>AWS-Native Secrets Management Solutions</h3>
<ul>
<li>AWS Systems Manager Parameter Store</li>
<li>AWS Secrets Manager (Recommended for Production)</li>
<li style="list-style-type: none;"></li>
</ul>
<p>&nbsp;</p>
<p>As an MSSP, we recommend AWS Secrets Manager as the gold standard for AWS environments.</p>
<p>&nbsp;</p>
<h3>Why Secrets Manager over Parameter Store?</h3>
<ul>
<li>Enhanced security controls with fine-grained IAM integration</li>
<li>Automatic secret rotation for RDS, DocumentDB, and Redshift</li>
<li>Cross-account access capabilities essential for multi-account AWS strategies</li>
<li>Comprehensive audit trails via CloudTrail integration</li>
<li>No CloudFormation exposure risks unlike Parameter Store</li>
<li>Encryption at rest using AWS KMS by default</li>
</ul>
<p>As such we recommend the AWS Secrets Manager for Production workloads, the Encrypted Parameter Store can be used as a configuration store to fetch certain parameters.</p>
<p>&nbsp;</p>
<p>How to use this in code ?</p>
<p>&nbsp;</p>
<h3>Python with boto3:</h3>
<p>&nbsp;</p>
<pre><code class="" data-line="">
import boto3
import json

# Using IAM role-based authentication (recommended)
client = boto3.client(&#039;secretsmanager&#039;, region_name=&#039;us-east-1&#039;)

try:
    secret_response = client.get_secret_value(SecretId=&#039;prod/rds/mysql-credentials&#039;)
    secret_dict = json.loads(secret_response[&#039;SecretString&#039;])
    
    # Use the secret
    db_username = secret_dict[&#039;username&#039;]
    db_password = secret_dict[&#039;password&#039;]
    
except ClientError as e:
    # Handle AWS-specific errors
    if e.response[&#039;Error&#039;][&#039;Code&#039;] == &#039;DecryptionFailureException&#039;:
        # Secrets Manager can&#039;t decrypt the protected secret text using the provided KMS key
        raise e
    elif e.response[&#039;Error&#039;][&#039;Code&#039;] == &#039;InternalServiceErrorException&#039;:
        # An error occurred on the server side
        raise e
    elif e.response[&#039;Error&#039;][&#039;Code&#039;] == &#039;InvalidParameterException&#039;:
        # Invalid parameter value
        raise e
    elif e.response[&#039;Error&#039;][&#039;Code&#039;] == &#039;InvalidRequestException&#039;:
        # Parameter value is not valid for the current state of the resource
        raise e
    elif e.response[&#039;Error&#039;][&#039;Code&#039;] == &#039;ResourceNotFoundException&#039;:
        # Can&#039;t find the resource that you asked for
        raise e


</code></pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3>Via Infrastructure as Code:</h3>
<ul>
<li>Cloudformation:
<ul>
<li><a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-secretsmanager-secret.html">https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-secretsmanager-secret.html</a></li>
</ul>
</li>
<li>Terraform:
<ul>
<li><a href="https://docs.aws.amazon.com/prescriptive-guidance/latest/secure-sensitive-data-secrets-manager-terraform/using-secrets-manager-and-terraform.html">https://docs.aws.amazon.com/prescriptive-guidance/latest/secure-sensitive-data-secrets-manager-terraform/using-secrets-manager-and-terraform.html</a></li>
</ul>
</li>
<li>AWS CDK:
<ul>
<li><a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/cdk.html">https://docs.aws.amazon.com/secretsmanager/latest/userguide/cdk.html</a></li>
</ul>
</li>
<li>Pulumi:
<ul>
<li><a href="https://www.pulumi.com/registry/packages/aws/api-docs/secretsmanager/secret/">https://www.pulumi.com/registry/packages/aws/api-docs/secretsmanager/secret/</a></li>
</ul>
</li>
</ul>
<p>&nbsp;</p>
<h2>AWS Key Management Service (KMS)</h2>
<p>AWS KMS provides dedicated encryption key management, solving the &#8220;where to store the encryption key&#8221; problem for AWS environments. KMS integrates seamlessly with Secrets Manager and most AWS services.</p>
<p>&nbsp;</p>
<p>KMS Best Practices for Secrets:</p>
<ul>
<li>Use customer-managed KMS keys for production secrets</li>
<li>Implement key rotation policies</li>
<li>Use separate KMS keys per environment/account</li>
<li>Leverage KMS key policies for fine-grained access control</li>
</ul>
<p>&nbsp;</p>
<h2>AWS Systems Manager Parameter Store</h2>
<p>While we recommend Secrets Manager for sensitive data, **Parameter Store** works well for:</p>
<ul>
<li>Non-sensitive configuration data</li>
<li>Cost-conscious environments (free tier available)</li>
<li>Simple use cases without rotation requirements</li>
</ul>
<p>&nbsp;</p>
<h2>Multi-Account AWS Strategies</h2>
<p>For AWS Organizations with multiple accounts (our recommended approach), consider:</p>
<h3>Cross-Account Secrets Access:</h3>
<p>&nbsp;</p>
<pre><code class="" data-line="">
{
  &quot;Version&quot;: &quot;2012-10-17&quot;,
  &quot;Statement&quot;: [
    {
      &quot;Effect&quot;: &quot;Allow&quot;,
      &quot;Principal&quot;: {
        &quot;AWS&quot;: &quot;arn:aws:iam::PROD-ACCOUNT-ID:role/ApplicationRole&quot;
      },
      &quot;Action&quot;: &quot;secretsmanager:GetSecretValue&quot;,
      &quot;Resource&quot;: &quot;*&quot;,
      &quot;Condition&quot;: {
        &quot;StringEquals&quot;: {
          &quot;secretsmanager:ResourceTag/Environment&quot;: &quot;production&quot;
        }
      }
    }
  ]
}
</code></pre>
<p>&nbsp;</p>
<h3>Multi-Region Considerations:</h3>
<ul>
<li>Replicate critical secrets across AWS regions</li>
<li>Use AWS Secrets Manager automatic replication</li>
<li>Consider data residency requirements</li>
</ul>
<p>&nbsp;</p>
<h2>AWS Implementation Best Practices from Our MSSP Experience</h2>
<h3>Security Architecture Considerations</h3>
<ul>
<li>Design secure AWS deployment pipelines** using CodePipeline, CodeBuild, Github Actions with ci-cd plugins like trufflehog : <a href="https://undercodetesting.com/how-to-hunt-for-sensitive-credentials-using-trufflehog">https://undercodetesting.com/how-to-hunt-for-sensitive-credentials-using-trufflehog</a></li>
<li>Implement comprehensive IAM access management with least-privilege principles</li>
<li>Establish governance policies using AWS Config and AWS Organizations SCPs/RCPs</li>
<li>Plan for secret rotation using AWS Secrets Manager automation</li>
<li>Monitor and audit secret access via CloudTrail and CloudWatch</li>
</ul>
<p>&nbsp;</p>
<h3>Operational Excellence in AWS</h3>
<ul>
<li>Automate secret provisioning using AWS Lambda and CloudFormation/Terraform/…</li>
<li>Implement emergency access procedures via AWS SSO and break-glass roles</li>
<li>Establish incident response for compromised secrets using AWS Security Hub or other CSPM/CNAPP</li>
<li>Regular security assessments using AWS Inspector and third-party tools</li>
<li>Cost optimization by right-sizing Secrets Manager usage vs. Parameter Store</li>
</ul>
<p>&nbsp;</p>
<h3>AWS-Specific Monitoring and Alerting</h3>
<p>Set up CloudWatch alarms for:</p>
<ul>
<li>Unusual Secrets Manager API calls</li>
<li>Failed secret retrievals</li>
<li>Cross-account secret access</li>
<li>KMS key usage anomalies</li>
</ul>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>Effective AWS secrets management is not just about choosing the right AWS service it&#8217;s about implementing a comprehensive security strategy that leverages AWS-native capabilities while addressing the entire lifecycle of sensitive data. The examples and breaches discussed here represent real financial and reputational risks that AWS customers face daily.</p>
<p>&nbsp;</p>
<h3>Key AWS Takeaways:</h3>
<ol>
<li>Never store secrets in configuration files, S3 buckets, or source control</li>
<li>Use AWS Secrets Manager for production secrets management</li>
<li>Implement just-in-time secret retrieval with AWS SDKs</li>
<li>Apply least-privilege IAM policies and roles</li>
<li>Leverage AWS KMS for encryption key management</li>
<li>Plan for multi-account and multi-region secret strategies</li>
</ol>
<p>The post <a href="https://cloudar.be/awsblog/aws-secrets-management-protecting-your-digital-keys-in-the-cloud/">AWS Secrets Management: Protecting Your Digital Keys in the Cloud</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Sign in with your eID: Using AWS IAM Roles Anywhere with a SmartCard Reader</title>
		<link>https://cloudar.be/awsblog/sign-in-with-your-eid-using-aws-iam-roles-anywhere-with-a-smartcard-reader/</link>
		
		<dc:creator><![CDATA[Ben Bridts]]></dc:creator>
		<pubDate>Thu, 26 Jun 2025 07:53:14 +0000</pubDate>
				<category><![CDATA[Security & Compliance]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Managed Services]]></category>
		<category><![CDATA[MSP]]></category>
		<guid isPermaLink="false">https://cloudar.be/?p=22584</guid>

					<description><![CDATA[<p>Using temporary credentials to access resources, has long been a best practice and is usually straight-forward if the person or machine that is starting the action is already known in AWS (either by using IAM Identity Center, or because you are running inside the AWS Cloud). However, if you are running on a machine that [&#8230;]</p>
<p>The post <a href="https://cloudar.be/awsblog/sign-in-with-your-eid-using-aws-iam-roles-anywhere-with-a-smartcard-reader/">Sign in with your eID: Using AWS IAM Roles Anywhere with a SmartCard Reader</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Using temporary credentials to access resources, <a href="https://docs.aws.amazon.com/wellarchitected/latest/framework/sec_identities_unique.html">has long been a best practice</a> and is usually straight-forward if the person or machine that is starting the action is already known in AWS (either by using IAM Identity Center, or because you are running inside the AWS Cloud). However, if you are running on a machine that exists outside of AWS you will need an extra component like AWS IAM Roles Anywhere to give you temporary credentials.</p>
<p>Interestingly, Roles Anywhere does not completely solve the problem of not needing to create long-lived credentials, instead it moves (and reduces) the problem from credential management (rotation) to certificate management (distribution).</p>
<p>Setting up a Certificate Authority (CA) that can create certificates can be done with AWS Private Certificate Authority, and there are some options out there to manage distribution (usually as part of a bigger Device Management solution), but wouldn&#8217;t it be nice if the government of Belgium would do that for us?</p>
<h1>The Belgian eID</h1>
<p>In Belgium every citizens gets an identity card. The government makes sure that these get distributed and renewed, and since 2005 they contain a chip that holds (among other things) a certificate that can be used for digital authentication. If we can tie this to Roles Anywhere, we don&#8217;t have to worry about certificate management ourselves.</p>
<p>This eID is the size of a bankcard and the chip can be interacted with using off the shelf smart card readers. Most information can be read without any additional authentication &#8211; if you have the correct middleware, but to sign something you need to enter a PIN code.</p>
<h2>The different certificates</h2>
<p>Every eID holds an &#8220;authentication certificate&#8221; that is tied to the owner of the eID and has been signed by the &#8220;Citizens CA&#8221;.  The Citizens CA&#8217;s certificate is in turn signed by the Belgium Root CA . The Root certificate is self-signed. If we trust the Belgium Root CA, we will be able to validate any authentication certificate. More information about this setup can be found at https://repository.eidpki.belgium.be/#/home</p>
<p>The authentication certificate has two pieces of information that are going to be useful to us:</p>
<ul>
<li>The Issuer, showing us that the certificate is indeed issued by the Citizen CA.</li>
<li>The Subject, containing the name and National Number (a number that uniquely points to one person) of the owner.</li>
</ul>
<h1>AWS IAM Roles Anywhere</h1>
<p>Roles Anywhere allows you to use a certificate and its private key to get temporary credentials. You can think of it as an AssumeRole call, but instead of starting from an Access Key, we start from a certificate.</p>
<p>There are a few components we need:</p>
<ul>
<li>Configuration in our AWS Account, to indicate which CA we trust, and which roles can be assumed by different Issuer and/or Subjects. This also includes the creation of IAM Roles.</li>
<li>Software on our computer to interact with the Card Reader so we can prove we have access to the eID and know its PIN.</li>
</ul>
<p>For our use case we are going to trust the Belgium Root CA, and create a Role that can be assumed with any certificate issued by the Citizen CA. We will than limit the permissions of that IAM Role, so it can only write to a unique prefix in S3.</p>
<p>We can do that because every component of the Subject in our certificate gets mapped to a principal tag on the role session. E.g. if the subject is &#8220;C=BE, SN=Doe, GN=John, serialNumber=70010112345, CN=John Doe (Authentication)&#8221;, we have the following principal tags, and we can use principal tags in any policy.</p>
<ul>
<li>x509Subject/C: BE</li>
<li>x509Subject/SN: Doe</li>
<li>x509Subject/GN: John</li>
<li>x509Subject/serialNumber: 70010112345</li>
<li>x509Subject/CN: John Doe (Authentication)</li>
</ul>
<h1>Putting it all together</h1>
<h2>In our AWS Account</h2>
<p>We will create the following resources in our AWS Account:</p>
<ul>
<li>An S3 Bucket</li>
<li>A trust anchor, configured to trust the Belgium Root CA certificate that is publicly available via https://crt.eidpki.belgium.be/eid/brca6.crt.  This way we can use any certificate created by the Root CA of any of its subordinate CAs (like the Citizen CA)</li>
<li>An IAM Role, where we configure the trust policy to only allow usage of the Role if:
<ul>
<li>The principal is the Roles Anywhere service (rolesanywhere.amazonaws.com)</li>
<li>The Issuer is Citizen CA (aws:PrincipalTag/x509Issuer/CN must equal &#8220;Citizen CA&#8221;)</li>
<li>The source is our trust anchor (aws:SourceArn equals the ARN of the Root CA trust anchor)</li>
</ul>
</li>
<li>An IAM Policy on this role that allows PutObject acces to all objects that start with the unique National Number (aws:PrincipalTag/x509Subject/serialNumber)</li>
<li>a (Roles Anywhere) profile that ties the trust anchor to the Role. We could configure more settings here, like a mapping of fields from the certificate or a session policy, but don&#8217;t need to.</li>
</ul>
<p>Of course we do not have to do this by hand, we create a CloudFormation template for this. It can be found in our sample repository: https://github.com/WeAreCloudar/cloudformation-samples/tree/main/templates/roles-anywhere-eid</p>
<h2>On our machine</h2>
<p>On our machine, we will need &#8211; besides the eID and its PIN (at least on macOS, where I tested this):</p>
<ul>
<li>a SmartCard Reader</li>
<li>the Roles Anywhere Credential Helper (<a href="https://docs.aws.amazon.com/rolesanywhere/latest/userguide/credential-helper.html">downloadable from the AWS Website</a>)</li>
<li>The AWS CLI (or any other tool we want to use with our AWS Credentials)</li>
</ul>
<p>We also need a few pieces of information:</p>
<ul>
<li>The ARNs of the trust anchor, profile and role we created</li>
<li>Our own National Number and the name of the bucket (to test our policy)</li>
</ul>
<p>Ideally we&#8217;d be able to configure the credential helper to read any eID we insert, and this is possible if you install the Belgian eID Middleware using the following command.<br />
<code class="" data-line=""><br />
aws_signing_helper credential-process \<br />
</code><code class="" data-line=""> --trust-anchor-arn $trust_anchor_arn \<br />
--profile-arn $profile_arn \<br />
--role-arn $role_arn \<br />
--certificate &quot;pkcs11:model=Belgium%20eID;object=Authentication&quot; \<br />
--pkcs11-lib &#039;/Library/Belgium Identity Card/Pkcs11/beid-pkcs11.bundle/Contents/MacOS/libbeidpkcs11.dylib<br />
</code><br />
However <a href="https://github.com/aws/rolesanywhere-credential-helper/issues/58">because of an issue with the helper, this only works on macOS if you build the helper yourself from source</a>. Since we do not want to do that, we can plug in our eID and find and identifier using &#8220;aws_signing_helper read-certificate-data&#8221;. You should get something like<br />
<code class="" data-line=""><br />
Matching identities<br />
1) bf013dd57aa34f8f9d4e22ab89dd8eb2 &quot;SERIALNUMBER=70010112345,CN=John Doe (Authentication),C=BE,...&quot;<br />
2) 786f7572198a4a8a82ee7ef3f205d7be &quot;SERIALNUMBER=70010112345,CN=John Doe (Signature),C=BE,...&quot;<br />
</code></p>
<p>Copying everything between quotes, allows us to create a new file, selector.json that looks like this:</p>
<p><code class="" data-line=""><br />
[<br />
{<br />
&quot;Key&quot;: &quot;x509Subject&quot;,<br />
&quot;Value&quot;: &quot;SERIALNUMBER=70010112345,CN=John Doe (Authentication),C=BE,...&quot;<br />
}<br />
]<br />
</code><br />
and use that to select our specific certificate:</p>
<p><code class="" data-line="">aws_signing_helper credential-process \<br />
</code><code class="" data-line=""> --trust-anchor-arn $trust_anchor_arn \<br />
--profile-arn $profile_arn \<br />
--role-arn $role_arn \<br />
--cert-selector file://selector.json</code></p>
<p>Our smart card reader will now prompt us for a PIN. If we enter the right one, we get credentials as output:<br />
<code class="" data-line=""><br />
{&quot;Version&quot;:1,&quot;AccessKeyId&quot;:&quot;ASIA...&quot;,&quot;SecretAccessKey&quot;:&quot;COA...&quot;,&quot;SessionToken&quot;:&quot;IQoJ...&quot;,&quot;Expiration&quot;:&quot;2025-03-28T14:16:07Z&quot;}<br />
</code></p>
<p>We can put this command in our ~/.aws/config file, so the AWS CLI will execute it for us, but for testing purposes it&#8217;s slightly easier to use the &#8220;serve&#8221; option.  The AWS Documentation has a longer explanation about how you can use the credential-process: https://docs.aws.amazon.com/rolesanywhere/latest/userguide/credential-helper.html#credential-helper-examples</p>
<h2>Testing with s3</h2>
<p>In one terminal we can run a credential / metadata server that can be used by the AWS CLI:</p>
<p><code class="" data-line="">~$ aws_signing_helper serve -process \<br />
</code><code class="" data-line=""> --trust-anchor-arn $trust_anchor_arn \<br />
--profile-arn $profile_arn \<br />
--role-arn $role_arn \<br />
--cert-selector file://selector.json<br />
</code></p>
<p>This gives us<code class="" data-line=""><br />
2025/03/28 14:28:12 Local server started on port: 9911<br />
2025/03/28 14:28:12 Make it available to the sdk by running:<br />
2025/03/28 14:28:12 export AWS_EC2_METADATA_SERVICE_ENDPOINT=http://127.0.0.1:9911/</code></p>
<p>We can than use a second terminal to run:</p>
<p><code class="" data-line="">AWS_EC2_METADATA_SERVICE_ENDPOINT=http://127.0.0.1:9911/ aws s3 cp example_file s3://$bucket/serialNumber/70010112345/example_file</code></p>
<p>and get our file in s3:</p>
<p><code class="" data-line="">upload: example_file to s3://.../serialNumber/70010112345/example_file</code></p>
<h1>Conclusion</h1>
<p>This experiment shows that being able to use an external device withIAM Roles, is a very powerful feature, because it can remove a lot of tasks related to certificate and credential management. Being able to do this with something I had in my backpocket made it extra cool.</p>
<p>However, the Belgian eID is probably not the best way to go about this in a real scenario:</p>
<ul>
<li>I just gave everyone living in Belgium access to my S3 Bucket. I could use a more scoped-down trust policy, but I would eventually run into limitations of trust-policy size.</li>
<li>I also didn&#8217;t tackle Certificate Revocation Lists (CRL). Every time someone loses their wallet, I would need to invalidate certain certificates &#8211; this also runs into size limitations</li>
<li>I already have a good way to give users access to AWS Accounts, using Identity Center or Cognito.</li>
<li>The pkcs11 support on macOS seems limited, and I would have to install the middleware everywhere,</li>
</ul>
<p>This does not mean that Roles Anywhere is not a good solution for this kind of cases:</p>
<ul>
<li>If you are already putting certificates on machines (e.g using an MDM solution), AWS IAM Roles Anywhere is a great fit</li>
<li>Instead of relying on the Belgian Government you can buy an hardware key like a yubikey and use it as your certificate source. This is as secure as using the eID (only the machine with the key plugged in will be able to request credentials), and you would be limiting it to the exact serial number(s) in your trust policy anyway &#8211; making CRLs mostly moot.</li>
</ul>
<p>The post <a href="https://cloudar.be/awsblog/sign-in-with-your-eid-using-aws-iam-roles-anywhere-with-a-smartcard-reader/">Sign in with your eID: Using AWS IAM Roles Anywhere with a SmartCard Reader</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Achievement Unlocked: Global Security &#038; Compliance Acceleration on AWS</title>
		<link>https://cloudar.be/awsblog/achievement-unlocked-global-security-compliance-acceleration-on-aws/</link>
		
		<dc:creator><![CDATA[Team Cloudar]]></dc:creator>
		<pubDate>Thu, 19 Dec 2024 10:08:36 +0000</pubDate>
				<category><![CDATA[AWS Blog]]></category>
		<category><![CDATA[Cloudar news]]></category>
		<category><![CDATA[Company news]]></category>
		<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Managed Services]]></category>
		<category><![CDATA[Security & Compliance]]></category>
		<category><![CDATA[security]]></category>
		<guid isPermaLink="false">https://cloudar.be/?p=22511</guid>

					<description><![CDATA[<p>Achievement Unlocked: Global Security &#38; Compliance Acceleration on AWS Cloudar has achieved the AWS Global Security &#38; Compliance Acceleration (GSCA) certification, underscoring our commitment to providing secure, compliant cloud solutions. For AWS users, this milestone brings several benefits, helping them streamline operations, meet compliance requirements, and ensure the highest levels of security. &#160; About the [&#8230;]</p>
<p>The post <a href="https://cloudar.be/awsblog/achievement-unlocked-global-security-compliance-acceleration-on-aws/">Achievement Unlocked: Global Security &#038; Compliance Acceleration on AWS</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1>Achievement Unlocked:<br />
Global Security &amp; Compliance Acceleration on AWS</h1>
<p><em>Cloudar has achieved the AWS Global Security &amp; Compliance Acceleration (GSCA) certification, underscoring our commitment to providing secure, compliant cloud solutions. For AWS users, this milestone brings several benefits, helping them streamline operations, meet compliance requirements, and ensure the highest levels of security.</em></p>
<p>&nbsp;</p>
<p><strong>About the AWS Global Security &amp; Compliance Acceleration Program</strong></p>
<p>AWS designed the GSCA program to support partners in strengthening the security and compliance of cloud environments. Through the GSCA program, we have gained access to advanced training, resources, and AWS experts, enabling us to fine-tune our security capabilities and stay ahead of ever-evolving threats.</p>
<p>This program emphasizes automation, governance, and continuous monitoring, empowering us to proactively address security challenges and scale securely in the cloud.</p>
<p>&nbsp;</p>
<p><strong>Enhanced security posture</strong></p>
<p>With this certification, Cloudar can provide customers with ready-to-go security solutions, customized to fit their unique requirements. From secure infrastructure setup to automated incident response, we can ensure your workloads are protected from day one.</p>
<p>By adhering to AWS’s best practices, we can ensure that your infrastructure is secure by design. We leverage tools like AWS Security Hub, Amazon GuardDuty and AWS Config to provide customers with continuous threat detection, rapid incident response, and real-time insights into security events. This means your business can identify and mitigate risks before they escalate.</p>
<p>&nbsp;</p>
<p><strong>Regulatory compliance</strong></p>
<p>Compliance is no longer an afterthought. Cloudar uses AWS-native tools to continuously monitor for regulatory compliance and offers pre-built templates to help meet industry standards, reducing the time and effort required to maintain compliance.</p>
<p>Whether your business operates in a heavily regulated industry like healthcare, finance, or government, the GSCA certification ensures that we can help you meet key regulatory requirements such as GDPR, HIPAA, SOC 2, and more.</p>
<p>&nbsp;</p>
<p><strong>Faster time-to-market:</strong></p>
<p>By automating security and compliance processes such as patch management, configuration drift detection, and log monitoring, we can significantly reduce the time it takes to implement secure, compliant workloads on AWS.</p>
<p>Cloudar ensures that our customers can maintain a high security posture without the overhead of manual intervention. This leads to lower operational costs and more efficient resource allocation, so you can focus on innovation and growth, while we handle the complexities of cloud security.</p>
<p>&nbsp;</p>
<p><strong>Cloudar helps you leverage the power of AWS Security</strong></p>
<p>Cloudar&#8217;s approach goes beyond simply implementing AWS’s built-in tools. We work closely with your teams to tailor solutions that fit your specific business needs, ensuring that you get the most out of the AWS cloud while keeping your data secure and compliant.</p>
<p>We design cloud architectures that follow AWS’s security best practices, but are customized to fit the scale, complexity, and compliance needs of your business.</p>
<p>Whether you&#8217;re migrating to the cloud or optimizing existing workloads, Cloudar ensures a smooth integration of AWS security services with your current operations.</p>
<p>But our support doesn’t stop after deployment: Cloudar continuously monitors your cloud environment, ensuring you stay compliant and secure as your business grows.</p>
<p>&nbsp;</p>
<p><strong>The Cloudar Difference</strong></p>
<p>At Cloudar, we understand that security and compliance aren’t just checkboxes &#8211; they’re critical to building trust with your customers and staying ahead in a competitive market.</p>
<p>By achieving the Global Security &amp; Compliance Acceleration on AWS, Cloudar once again proves that we are not just a partner, but a trusted ally in your cloud journey.</p>
<p>We provide peace of mind that your AWS workloads are not only running efficiently but are also secured against threats and aligned with the latest regulatory standards.</p>
<p>&nbsp;</p>
<p>If you’d like to learn more about how Cloudar can enhance your cloud security and compliance, or if you&#8217;re ready to take your AWS workloads to the next level, don’t hesitate to get in touch with our team today!</p>
<p>The post <a href="https://cloudar.be/awsblog/achievement-unlocked-global-security-compliance-acceleration-on-aws/">Achievement Unlocked: Global Security &#038; Compliance Acceleration on AWS</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Elevating cloud security to new heights: Cloudar earns AWS Security Competency!</title>
		<link>https://cloudar.be/elevating-cloud-security-to-new-heights-cloudar-earns-aws-security-competency/</link>
		
		<dc:creator><![CDATA[Andy Mommerency]]></dc:creator>
		<pubDate>Tue, 26 Sep 2023 07:49:47 +0000</pubDate>
				<category><![CDATA[AWS Blog]]></category>
		<category><![CDATA[Cloudar news]]></category>
		<category><![CDATA[Company news]]></category>
		<category><![CDATA[Security & Compliance]]></category>
		<guid isPermaLink="false">https://cloudar.be/?p=21033</guid>

					<description><![CDATA[<p>Introduction At Cloudar, we&#8217;ve always believed that security should be at the heart of every cloud strategy. Our commitment to delivering top-notch cloud security solutions has led us to achieve numerous milestones, and today, we&#8217;re excited to announce our latest achievement: Cloudar has earned the prestigious AWS Security Competency! Building on our ISO/IEC 27001 certification [&#8230;]</p>
<p>The post <a href="https://cloudar.be/elevating-cloud-security-to-new-heights-cloudar-earns-aws-security-competency/">Elevating cloud security to new heights: Cloudar earns AWS Security Competency!</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>At Cloudar, we&#8217;ve always believed that security should be at the heart of every cloud strategy. Our commitment to delivering top-notch cloud security solutions has led us to achieve numerous milestones, and today, we&#8217;re excited to announce our latest achievement: <strong>Cloudar has earned the prestigious AWS Security Competency!</strong></p>
<p>Building on our ISO/IEC 27001 certification since 2018 and our existing AWS competencies, this accomplishment marks a significant milestone in our journey to provide the highest level of security and service to our customers. In this blog post, we&#8217;ll dive into what the AWS Security Competency means for us and, more importantly, what benefits it brings to our valued customers.</p>
<p>&nbsp;</p>
<h2>What is AWS Security Competency?</h2>
<p>The AWS Security Competency is not just a fancy title; it&#8217;s a recognition of excellence in designing, implementing, and managing security solutions on the Amazon Web Services platform. AWS awards this competency to organizations that demonstrate exceptional proficiency in securing AWS workloads and infrastructure.</p>
<p>&nbsp;</p>
<h2>Why it matters</h2>
<h3>Expertise You Can Trust</h3>
<p>Achieving the AWS Security Competency is a rigorous process that involves a deep evaluation of an organization&#8217;s expertise in various security domains such as identity and access management, data protection, compliance, and more.<br />
This achievement is a seal of approval from Amazon Web Services itself.<br />
It means that Cloudar&#8217;s team of experts possesses a comprehensive understanding of AWS security best practices, threat detection, and incident response. It signifies that we have demonstrated proficiency and skill in protecting your cloud infrastructure and data, giving you peace of mind that your assets are in capable hands.</p>
<h3>Cutting-Edge Solutions</h3>
<p>Our team at Cloudar stays at the forefront of security technology. Achieving the AWS Security Competency ensures that we are equipped with the latest knowledge and tools to keep your AWS environments secure from evolving threats.<br />
Our partnership with Trend Micro played a crucial role in this accomplishment. Trend Micro is a global leader in cloud security, and our collaboration has allowed us to leverage their cutting-edge technology and expertise to enhance our security solutions. Together, we&#8217;ve created a formidable team dedicated to safeguarding our customers&#8217; cloud environments.</p>
<h3>Dedication to Continuous Improvement</h3>
<p>Security is not a static field; it&#8217;s an ever-evolving landscape. To maintain this competency, Cloudar continues to invest in training and staying up-to-date with the latest security trends and technologies. We are committed to providing our customers with the most advanced security solutions available.</p>
<h3>Proven Track Record</h3>
<p>Our attainment of this competency underscores our extensive experience in designing, implementing, and managing secure AWS solutions.<br />
We understand that one-size-fits-all security solutions rarely work. Cloudar&#8217;s expertise allows us to tailor security measures to your unique needs, ensuring that your AWS environment is both secure and efficient. We&#8217;ve successfully tackled complex security challenges for customers across various industries, consistently delivering exceptional results.</p>
<p>&nbsp;</p>
<h2>Benefits for our customers</h2>
<h3>Compliance Assurance</h3>
<p>As an ISO/IEC 27001 certified company, Cloudar understands the importance of compliance.<br />
With Cloudar&#8217;s AWS Security Competency, you can trust us to help you meet and exceed regulatory compliance requirements. Our deep understanding of AWS services ensures that your cloud infrastructure aligns with industry-specific standards, making audits and certifications a breeze.</p>
<h3>Enhanced Security Posture</h3>
<p>With our AWS Security Competency and other AWS competencies, you gain access to top-tier security practices and expertise.<br />
We go above and beyond to ensure your AWS environments are fortified against potential threats and vulnerabilities, significantly reducing the risk of data breaches and disruptions.</p>
<h3>Cost Savings</h3>
<p>Investing in security is an investment in your business&#8217;s longevity. By preventing costly breaches and downtime, Cloudar&#8217;s expertise can save you substantial financial resources in the long run.</p>
<h3>Increased Efficiency</h3>
<p>Our tailored security solutions are designed to integrate seamlessly with your existing AWS environment. This ensures that security measures do not impede your operations, allowing for increased efficiency and productivity.</p>
<h3>Peace of Mind</h3>
<p>In the event of a security incident, Cloudar&#8217;s well-practiced incident response teams are ready to spring into action. Our proactive security measures help mitigate threats before they become major issues, minimizing downtime and data loss.<br />
With Cloudar as your trusted AWS Security Competency partner, you can focus on growing your business, knowing that your cloud infrastructure is fortified against threats. Sleep better at night, knowing that experts are on guard.</p>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>Achieving the AWS Security Competency is not just an accolade for Cloudar; it&#8217;s a testament to our unwavering dedication to providing the highest level of security for our customers’ AWS environments.</p>
<p>We are committed to keeping your data safe, your operations efficient, and your business thriving. Your cloud&#8217;s security is our priority, and together, we&#8217;ll reach new horizons.</p>
<p>To learn more about how Cloudar can secure your AWS environment and help your business grow securely, contact us today and experience the difference of working with an AWS Security Competency holder!</p>
<p>&nbsp;</p>
<p>The post <a href="https://cloudar.be/elevating-cloud-security-to-new-heights-cloudar-earns-aws-security-competency/">Elevating cloud security to new heights: Cloudar earns AWS Security Competency!</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Managing Instances in Private Subnets with Session Manager or Instance Connect</title>
		<link>https://cloudar.be/awsblog/managing-instances-in-private-subnets-with-session-manager-or-instance-connect/</link>
		
		<dc:creator><![CDATA[Bart Coddens]]></dc:creator>
		<pubDate>Fri, 22 Sep 2023 07:02:02 +0000</pubDate>
				<category><![CDATA[AWS Blog]]></category>
		<category><![CDATA[Security & Compliance]]></category>
		<guid isPermaLink="false">https://cloudar.be/?p=20871</guid>

					<description><![CDATA[<p>1. How the Internet evolved and became more hostile As the Internet evolved from a small interconnect between universities where every resource had a public IP address, and resources were managed based on mutual respect and consensus to the Internet as we know it today with multiple threads, risks, and shortage of IP addresses, the [&#8230;]</p>
<p>The post <a href="https://cloudar.be/awsblog/managing-instances-in-private-subnets-with-session-manager-or-instance-connect/">Managing Instances in Private Subnets with Session Manager or Instance Connect</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>1. How the Internet evolved and became more hostile</h2>
<p>As the Internet evolved from a small interconnect between universities where every resource had a public IP address, and resources were managed based on mutual respect and consensus to the Internet as we know it today with multiple threads, risks, and shortage of IP addresses, the direct and public accessibility of all resources could no longer be sustained.</p>
<p>As stated in the security pillar of the Well Architected Framework, the main security principle in AWS Cloud is to create several network layers and defense in depth.</p>
<p>The framework states more specifically: “Do not place resources in public subnets of your VPC unless they absolutely must receive inbound network traffic from public sources” <a href="https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/sec_network_protection_create_layers.html">SEC05-BP01 Create network layers</a>.</p>
<p>So as a best practice, cloud engineers strive to deploy their resources in private subnets whenever possible. Because of the confidential nature of these subnets, engineers had to invent ways to manage their resources in these private subnets.</p>
<h2>2. How to Use Jump / Bastion Hosts to Manage Your Private Subnets</h2>
<p>A solution to manage the infrastructure in your private subnets is to deploy a bastion host. Before 2018, this was the recommended way, and it was well-documented:</p>
<p>For Linux Workloads:<br />
<a href="https://aws.amazon.com/solutions/implementations/linux-bastion/">https://aws.amazon.com/solutions/implementations/linux-bastion/</a></p>
<p>For Windows Workloads:<br />
<a href="https://aws.amazon.com/solutions/implementations/rd-gateway/">https://aws.amazon.com/solutions/implementations/rd-gateway/</a></p>
<p>Although these solutions do solve the problem stated above (how to manage your Linux and/or Windows workloads in their private subnets), these solutions have several drawbacks:</p>
<ul>
<li>These solutions still need a public IP address to be associated with the virtual machines and open ports to enable remote access.</li>
<li>The Linux solution is vulnerable to SSH multiplexing access.</li>
<li>As with all software that is publicly accessible, they need to be strictly maintained and patched:
<ul>
<li><a href="https://www.bleepingcomputer.com/news/security/remote-desktop-zero-day-bug-allows-attackers-to-hijack-sessions/">https://www.bleepingcomputer.com/news/security/remote-desktop-zero-day-bug-allows-attackers-to-hijack-sessions/</a></li>
<li><a href="https://www.microsoft.com/en-us/security/blog/2021/09/02/a-deep-dive-into-the-solarwinds-serv-u-ssh-vulnerability/">https://www.microsoft.com/en-us/security/blog/2021/09/02/a-deep-dive-into-the-solarwinds-serv-u-ssh-vulnerability/</a></li>
</ul>
</li>
<li>It&#8217;s hard to capture the remote access&#8217;s metadata and/or full session logs.</li>
<li>Password management and access control are needed for the management users.</li>
</ul>
<p>Because IT is all about answering questions, we are looking for an answer to this question: ‘How can I manage my resources in private subnets in a secure, encrypted, and auditable fashion?’ Luckily, AWS came up with two solutions that answer this question.</p>
<h2>3. AWS Systems Manager’s New Session Manager</h2>
<p>AWS listened to the drawbacks inherent to using bastion/jump hosts and introduced the Session Manager service as a component of AWS Systems Manager. The Session Manager supports both inside AWS and on-premises:</p>
<ul>
<li>Windows</li>
<li>Linux</li>
<li>MacOS</li>
</ul>
<p>This blog post will focus on using it with Elastic Compute Cloud (EC2) Linux instances running in AWS.</p>
<p>&nbsp;</p>
<h3>3.1 Why AWS Session Manager</h3>
<p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html">Session Manager</a> solves the problem mentioned above: to access instances within private subnets that don’t allow ingress connections from the Internet. This is made possible by the Systems Manager (SSM) agent running on the EC2 instances, which pushes traffic to the Session Manager service managed by AWS outside your EC2 environment. The configuration shown in the diagram below provides an example of how it can be configured:</p>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-20883" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding1.jpg" alt="" width="605" height="340" /></p>
<p>As you can see in the diagram above, the client machine is outside of AWS. It accesses the internal machines over the Internet using valid user credentials for the AWS environment. To access the internal machines, the client can use several methods:</p>
<p>Via the AWS console, you have two-fold access:</p>
<ul>
<li>The AWS Systems Manager console includes access to all the Session Manager capabilities for both administrators and end users.</li>
</ul>
<p><img decoding="async" class="alignnone size-full wp-image-20884" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding2.png" alt="" width="392" height="386" /></p>
<p><img decoding="async" class="alignnone size-full wp-image-20885" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding3.png" alt="" width="756" height="172" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20886" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding4.png" alt="" width="756" height="433" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20887" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding5.png" alt="" width="756" height="131" /></p>
<ul>
<li>The Amazon EC2 console allows end users to connect to the EC2 instances for which they have been granted session permissions.</li>
</ul>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20889" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding6.png" alt="" width="756" height="375" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20890" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding7.png" alt="" width="756" height="131" /></p>
<p>• Via the AWS Command Line Interface (CLI): this requires the installation of the Session Manager Plugin. It is possible to restrict how users launch sessions, so you could choose only to allow them to invoke a connection via the AWS CLI if your users don’t have access to the console or the other way around.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20891" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding8.png" alt="" width="756" height="175" /></p>
<p>• The Session Manager SDK consists of libraries and sample code that allows application developers to build front-end applications, such as custom shells or self-service portals for internal users that natively use Session Manager to connect to managed nodes. This allows you to integrate Session Manager into your own tooling or automation workflows.</p>
<h3>3.2 Configuration</h3>
<h4>3.2.1 Network Considerations</h4>
<p>As shown in the diagram above, the SSM agent actually uses HTTPS to communicate with the SSM endpoint. As such, port 22 for SSH or port 3389 for RDP are no longer required and should not be allowed as ingress traffic. To make this even more secure, we can use VPC endpoints: they use AWS PrivateLink, so traffic between the target EC2 instances and the Session Manager service does not traverse the Internet. To enable this, create these VPC endpoints in your target VPCs, replacing the region accordingly, for example, eu-west-1</p>
<h5>Interface endpoints:</h5>
<ul>
<li>
<h5>com.amazonaws.[region].ssm</h5>
</li>
<li>
<h5>com.amazonaws.[region].ssmmessages</h5>
</li>
<li>
<h5>com.amazonaws.[region].ec2messages</h5>
</li>
<li>
<h5>com.amazonaws.[region].ec2 [For Windows workloads]</h5>
</li>
</ul>
<h5>Optional but recommended:</h5>
<ul>
<li>
<h5>com.amazonaws.[region].kms = To encrypt logs in CloudWatch</h5>
</li>
<li>
<h5>com.amazonaws.[region].logs = To send logs to CloudWatch</h5>
</li>
</ul>
<h5>Gateway endpoint:</h5>
<ul>
<li>
<h5>com.amazonaws.region.s3</h5>
</li>
</ul>
<p>Systems Manager uses this endpoint to update SSM Agent and to perform patching operations. Systems Manager also uses this endpoint for tasks like uploading output logs that you choose to store in S3 buckets, retrieving scripts or other files you store in buckets, and so on.</p>
<p>If you restrict egress networking on the EC2 machines via security groups, you should use the prefix list of the S3 gateway endpoint to send traffic to this gateway endpoint only. Here is an example of security group configuration for a tightly controlled EC2 instance:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20894" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding9-1.png" alt="" width="605" height="99" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20893" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding10.png" alt="" width="605" height="96" /></p>
<p>&nbsp;</p>
<p>As the interface endpoints replace the DNS addresses of the SSM services, the network traffic with the configuration listed above only flows over AWS PrivateLink. You can even further limit access to the S3 buckets that SSM uses by using the structure listed in the AWS documentation: <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent-minimum-s3-permissions.html">S3 bucket list</a></p>
<h4>3.2.2 EC2 Prerequisites and IAM Configuration</h4>
<h5>EC2 Prerequisites</h5>
<p>The EC2 instance should run the Systems Manager (SSM) agent to support the Systems Manager. The Amazon Linux AMIs support the agent by default, and it can be installed manually on other Linux systems by <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-manual-agent-install.html">installing the Systems Manager</a>. The agent allows a lot more than just connecting with Session Manager. More information about its capabilities is available <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html">here</a>. Even if you want to use it on a system that is <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/operating-systems-and-machine-types.html#prereqs-operating-systems">not currently</a> supported, you can always download the <a href="https://github.com/aws/amazon-ssm-agent">open-source</a> code and modify it yourself. However, AWS will not support a modified version of the agent.</p>
<h5>IAM Configuration</h5>
<p>Each EC2 Instance must have permission to make API calls to the Session Manager Service. All necessary permissions are available in the Amazon-managed IAM policy: <strong>AmazonSSMManagedInstanceCore</strong>, and this policy should be attached to an Instance profile.</p>
<p>The policy listed above gives you a good baseline, but if you want to lock this down further, you can look up the information <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/getting-started-create-iam-instance-profile.html">here</a>.</p>
<p>Using this method to access the instances does not require any management of SSH keys. Access is only based on IAM policies since everything is managed through the Session Manager.</p>
<p>When configuring Session Manager access for your end-users, you can limit which instances they can access, whether it’s through the command line or the console, and if they are allowed to tunnel SSH or just use the regular Session Manager shell access.<br />
More information about how to configure the IAM policies is available <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started-restrict-access.html">here</a>.</p>
<p>Some AWS policy templates show how to restrict access to specific EC2 instances, but that will probably not be scalable if you really want to implement this for your organization.</p>
<p>Instead, you can refer to the templates available <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/getting-started-restrict-access-examples.html#restrict-access-example-instance-tags">here</a> to see how to configure the policies to allow access based on tags. As shown <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/getting-started-restrict-access-examples.html#restrict-access-example-user-sessions">here</a>, you will also want to ensure you add permissions for users to terminate only the sessions they started. Otherwise, a user may be able to terminate another user’s session.</p>
<h3>3.3. Logging</h3>
<h4>3.3.1. What the AWS CloudTrail Does</h4>
<p>Without configuring anything, AWS CloudTrail will collect basic information about sessions. When someone launches a remote access session with Session Manager, SSM will log an event named “StartSession.” This event will include a number of interesting things, such as:</p>
<ul>
<li>The username that launched the session</li>
<li>Whether the user was authenticated with multi-factor authentication (MFA)</li>
<li>The originating IP address</li>
<li>The unique ID of the target EC2 instance</li>
<li>The session ID</li>
</ul>
<p>The events in CloudTrail are helpful for getting a sense of who’s logging into your instances and when it’s happening. However, it does not provide any information about what they are doing once they’ve established a session.</p>
<h4>3.3.2. Session logs</h4>
<p>As mentioned in the overview of AWS Session Manager, SSM uses HTTPS to establish sessions, but it is also possible to use it as a tunnel for other protocols, such as SSH or RDP. Be aware that AWS cannot provide full session logs for those connections if you use the tunneling option. The diagram below shows an example configuration for logging full session data either to CloudWatch or S3 when tunneling is not used:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20895" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding11.jpg" alt="" width="605" height="340" /></p>
<p>The logs in CloudWatch look like this:</p>
<p>&nbsp;</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20896" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding12.png" alt="" width="1386" height="511" srcset="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding12.png 1386w, https://cloudar.be/wp-content/uploads/2023/09/Afbeelding12-768x283.png 768w, https://cloudar.be/wp-content/uploads/2023/09/Afbeelding12-1280x472.png 1280w" sizes="auto, (max-width: 1386px) 100vw, 1386px" /></p>
<p>Next to the CloudWatch logs, logging into S3 is also possible.</p>
<p>Please make sure that you attach a policy to your instance profile that allows writing to the S3 bucket you configured to store your session data. The result is that you will see log files written to the specified bucket with the name of the session (the username and a unique string). The logs contain the commands typed, along with their output, which is the same as what is shown in CloudWatch.</p>
<h3>3.4. Conclusion</h3>
<p>The question: “How can I manage my resources in private subnets in a secure, encrypted, and auditable fashion?” is answered by using the Systems Manager Sessions Manager.</p>
<h2>4. Instance Connect and Instance Connect Endpoint</h2>
<p>As there are often multiple ways to reach the same goal, AWS delivers a different option to answer the same question: “How can I manage my resources in private subnets in a secure, encrypted, and auditable fashion.” This can also be solved by using Instance Connect with its newest addition: Instance Connect Endpoint</p>
<h3>4.1. What Is Instance Connect?</h3>
<p>The Instance Connect feature was introduced in 2019 and offers a solution to control SSH access to your instances using AWS Identity and Access Management (IAM) policies and audit connection requests with AWS CloudTrail events. In addition, you can leverage your existing SSH keys or further enhance your security posture by generating one-time use SSH keys each time an authorized user connects.</p>
<p>Instance Connect works with any SSH client, but you can also easily connect to your instances from the EC2 Console.</p>
<p>The question: “How can I manage my resources in private subnets in a secure, encrypted, and auditable fashion?” is not solved by this approach because:</p>
<ul>
<li>The machine still needs a public IP address.</li>
<li>The connection logs cannot be stored in S3 or CloudWatch.</li>
</ul>
<p>A few months ago, AWS introduced a new Instance Connect Endpoint feature that solves the first drawback listed above.</p>
<h3>4.2. Instance Connect Endpoint</h3>
<p>With the Endpoint for Instance Connect (EIC) Service, you no longer need a public IP address on your resource or any agent to connect to your resources. The Instance Connect Endpoint Service works in three ways:</p>
<ul>
<li>AWS Management Console</li>
<li>AWS Command Line Interface (AWS CLI)</li>
<li>SSH Clients like PuTTY or OpenSSH</li>
</ul>
<h4>4.2.1. Instance Connect Endpoint Features</h4>
<p>The EIC Endpoint Service is an identity-aware TCP proxy. As described above, it has two modes:</p>
<ul>
<li>AWS CLI | SSH CLients</li>
<li>AWS Console</li>
</ul>
<p>The AWS CLI client is used to create a secure WebSocket tunnel from your workstation to the endpoint, where authorization happens with your AWS Identity and Access Management (IAM) credentials. When the tunnel is established, point your preferred SSH client at your loopback address (127.0.0.1 or localhost) and connect as usual.</p>
<p>Second, the Console gives you secure and seamless access to resources inside your VPC. Authentication and authorization are evaluated via IAM before traffic reaches the VPC. The diagram below illustrates a user connecting to an AWS EIC.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20906" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding13.png" alt="" width="605" height="514" /></p>
<p>As shown above, the EIC Endpoints Service provides a high degree of flexibility.</p>
<ul>
<li>It doesn’t require your VPC to have direct Internet connectivity</li>
<li>No agent is needed on the resource(s) you wish to connect to</li>
<li>It preserves existing workflows by allowing your preferred client software to connect</li>
<li>IAM and Security Groups can be used to control access</li>
</ul>
<h4>4.2.2. Instance Connect Endpoint Security and Logging</h4>
<h5>IAM</h5>
<p>The beauty of this solution lies in the fact that access can be limited to what the user needs: EIC Endpoints Service follows the important security requirements in terms of the separation of privileges for the control plane and the data plane. An administrator with full EC2 IAM privileges can create and control EIC Endpoints (the control plane). However, the same administrator cannot use those endpoints without also having EC2 Instance Connect IAM privileges (the data plane). The DevOps Engineers who may need to use EIC Endpoint to tunnel into VPC resources do not require control-plane privileges to do so.</p>
<h5>CloudTrail</h5>
<p>Records of data plane connections include the IAM principal making the request, their source IP address, the requested destination IP address, and the destination port. An example of connecting to the instance from the console:</p>
<p>{<br />
&#8220;eventVersion&#8221;: &#8220;1.08&#8221;,<br />
&#8220;userIdentity&#8221;: {<br />
&#8220;type&#8221;: &#8220;FederatedUser&#8221;,<br />
&#8220;principalId&#8221;: &#8220;123456789:Example&#8221;,<br />
&#8220;arn&#8221;: &#8220;arn:aws:sts::123456789:ExampleUser&#8221;,<br />
&#8220;accountId&#8221;: &#8220;123456789&#8221;,<br />
&#8220;accessKeyId&#8221;: &#8220;ExampleKey&#8221;,<br />
&#8220;sessionContext&#8221;: {<br />
&#8220;sessionIssuer&#8221;: {<br />
&#8220;type&#8221;: &#8220;IAMExample&#8221;,<br />
&#8220;principalId&#8221;: &#8220;ExampleID&#8221;,<br />
&#8220;arn&#8221;: &#8220;arn:aws:iam::123456789:user/exampleuser&#8221;,<br />
&#8220;accountId&#8221;: &#8220;123456789&#8221;,<br />
&#8220;userName&#8221;: &#8220;exampleuser&#8221;<br />
},<br />
&#8220;webIdFederationData&#8221;: {},<br />
&#8220;attributes&#8221;: {<br />
&#8220;creationDate&#8221;: &#8220;2023-07-24T12:24:55Z&#8221;,<br />
&#8220;mfaAuthenticated&#8221;: &#8220;true&#8221;<br />
}<br />
}<br />
},<br />
&#8220;eventTime&#8221;: &#8220;2023-07-24T13:19:22Z&#8221;,<br />
&#8220;eventSource&#8221;: &#8220;ec2-instance-connect.amazonaws.com&#8221;,<br />
&#8220;eventName&#8221;: &#8220;SendSSHPublicKey&#8221;,<br />
&#8220;awsRegion&#8221;: &#8220;eu-west-1&#8221;,<br />
&#8220;sourceIPAddress&#8221;: &#8220;123456789&#8221;,<br />
&#8220;userAgent&#8221;: &#8220;Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0&#8221;,<br />
&#8220;requestParameters&#8221;: {<br />
&#8220;instanceId&#8221;: &#8220;i-123456789&#8221;,<br />
&#8220;instanceOSUser&#8221;: &#8220;ec2-user&#8221;,<br />
&#8220;sSHPublicKey&#8221;: &#8220;ssh-ed25519Example\n&#8221;<br />
},<br />
&#8220;responseElements&#8221;: {<br />
&#8220;requestId&#8221;: &#8220;b2a9eeae-7189-4b6c-ac8a-a41e56ea1a42&#8221;,<br />
&#8220;success&#8221;: true<br />
},<br />
&#8220;requestID&#8221;: &#8220;b2a9eeae-7189-4b6c-ac8a-a41e56ea1a42&#8221;,<br />
&#8220;eventID&#8221;: &#8220;161427f7-8f1e-459a-83f1-2f54aca879ca&#8221;,<br />
&#8220;readOnly&#8221;: false,<br />
&#8220;eventType&#8221;: &#8220;AwsApiCall&#8221;,<br />
&#8220;managementEvent&#8221;: true,<br />
&#8220;recipientAccountId&#8221;: &#8220;123456789&#8221;,<br />
&#8220;eventCategory&#8221;: &#8220;Management&#8221;,<br />
&#8220;tlsDetails&#8221;: {<br />
&#8220;tlsVersion&#8221;: &#8220;TLSv1.3&#8221;,<br />
&#8220;cipherSuite&#8221;: &#8220;TLS_AES_128_GCM_SHA256&#8221;,<br />
&#8220;clientProvidedHostHeader&#8221;: &#8220;ec2-instance-connect.eu-west-1.amazonaws.com&#8221;<br />
},<br />
&#8220;sessionCredentialFromConsole&#8221;: &#8220;true&#8221;<br />
}</p>
<h3>4.3. Connection Examples</h3>
<h4>4.3.1. Via the Console</h4>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20908" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding14.png" alt="" width="756" height="548" /><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20909" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding15.png" alt="" width="756" height="246" /></p>
<p>This gives you:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20910" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding16.png" alt="" width="756" height="462" /></p>
<p>As you can see, the console does not login via SSM-user but via EC2-user and with a private IP.</p>
<h4>4.3.2 Via the AWS CLI</h4>
<p>To connect via the AWS CLI, make sure that you have the latest AWS CLI installed. Then you can use the new ec2-instance-connect ssh command from the AWS CLI. With this new command, AWS generates ephemeral keys for you to connect to your Instance.</p>
<p>Note that this command requires using the OpenSSH client and the latest version of the AWS CLI. You need IAM permissions, as detailed here, to use this command and connect. You can find an example below:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20911" src="https://cloudar.be/wp-content/uploads/2023/09/InstanceConnect.png" alt="" width="605" height="332" /></p>
<h4>4.3.3 Via SSH Clients</h4>
<p>Create your own private key:</p>
<p>ssh-keygen -t rsa -f mynew_key</p>
<p>Use the following AWS CLI command to authorize the user and push the public key to the Instance using the send-ssh-public-key command. To support this, you need the latest version of the AWS CLI.</p>
<p>aws ec2-instance-connect send-ssh-public-key &#8211;region eu-west-1 &#8211;instance-id i-0123456789example &#8211;availability-zone eu-west-1a &#8211;instance-os-user ec2-user &#8211;ssh-public-key file://mynew_key.pub</p>
<p>This gives back:</p>
<p>{<br />
&#8220;RequestId&#8221;: &#8220;9c4bf3df-799d-4f40-9e2d-cbc3ed3bbe08&#8221;,<br />
&#8220;Success&#8221;: true<br />
}</p>
<p>After authentication, the public key is made available to the Instance through the Instance metadata for 60 seconds. During this time, connect to the Instance using the associated private key:</p>
<p>ssh ec2-user@[INSTANCE] \<br />
-i [SSH-KEY] \<br />
-o ProxyCommand=&#8217;aws ec2-instance-connect open-tunnel \<br />
&#8211;instance-id %h&#8217;</p>
<p>This gives back:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-20927" src="https://cloudar.be/wp-content/uploads/2023/09/Afbeelding17.png" alt="" width="756" height="247" /></p>
<p>With this method, plain SSH clients can still be used via short-lived keys.</p>
<h4>4.3.4 Connecting to the Windows Machines</h4>
<p>How to connect to Windows machines is similar:</p>
<p>aws ec2-instance-connect open-tunnel \<br />
&#8211;instance-id i-0123456789example \<br />
&#8211;remote-port 3389 \<br />
&#8211;local-port any-port</p>
<p>In your RDP Client, set it up like this, mark that the &#8211;local-port is set to 5555</p>
<p>&nbsp;</p>
<h3>4.4 To Sum Up Instance Connect</h3>
<p>As shown in the blog post above, Instance Connect allows you to connect to your private resources privately and securely without needing long-lived SSH keys and/or bastion hosts.<br />
The drawback compared to AWS Sessions Manager is that you cannot log session logs towards Amazon S3 or Amazon CloudWatch. The benefit is that you don’t need to install custom agents on your machines, which makes this solution the preferred solution for older Instances and appliances running in your AWS environment.</p>
<h2>5. Final Conclusion</h2>
<p>AWS provides various methods to connect to Instances, including SSH, RDP, AWS Systems Manager Session Manager, EC2 Instance Connect and Endpoint, bastion hosts, and VPN. The choice of method depends on the operating system, security requirements, network configuration, and personal preference. By leveraging these connection methods, you can securely access and manage your AWS Instances based on your specific use cases and requirements.</p>
<p>What questions do you have after reading this blog post? We would love to answer them!</p>
<p>The post <a href="https://cloudar.be/awsblog/managing-instances-in-private-subnets-with-session-manager-or-instance-connect/">Managing Instances in Private Subnets with Session Manager or Instance Connect</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Get it covered: 7 essential practices for AWS security</title>
		<link>https://cloudar.be/awsblog/get-it-covered-7-essential-practices-for-aws-security/</link>
		
		<dc:creator><![CDATA[Andy Mommerency]]></dc:creator>
		<pubDate>Fri, 14 Jul 2023 13:42:15 +0000</pubDate>
				<category><![CDATA[AWS Blog]]></category>
		<category><![CDATA[Security & Compliance]]></category>
		<guid isPermaLink="false">https://cloudar.be/?p=20704</guid>

					<description><![CDATA[<p>In today’s ever-changing threat landscape, cloud security cannot be emphasized enough. Although the AWS platform provides organizations with a dependable, scalable and cost-effective solution for storing and processing sensitive data, organizations must implement their own AWS security best practices as part of the shared responsibility model. Here are seven crucial practices that can help you [&#8230;]</p>
<p>The post <a href="https://cloudar.be/awsblog/get-it-covered-7-essential-practices-for-aws-security/">Get it covered: 7 essential practices for AWS security</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>In today’s ever-changing threat landscape, cloud security cannot be emphasized enough. Although the AWS platform provides organizations with a dependable, scalable and cost-effective solution for storing and processing sensitive data, organizations must implement their own AWS security best practices as part of the shared responsibility model. Here are seven crucial practices that can help you secure your cloud infrastructure and mitigate the risk of security breaches:</strong></p>
<h2>#1 Develop a comprehensive strategy</h2>
<p>Before deploying your applications on AWS, it is essential to establish a well-defined cybersecurity strategy. This strategy should include conducting a risk assessment, performing threat modelling, and devising a mitigation plan. Identify potential risks and vulnerabilities specific to your cloud infrastructure and implement measures to address them. This will ensure compliance with industry standards and regulations while proactively preventing cyberattacks.</p>
<h2>#2 Become familiar with the AWS Well-Architected Framework</h2>
<p>AWS offers abundant resources to help organizations enhance their security posture. <a href="https://cloudar.be/services-solutions/aws-well-architected-review/">The AWS Well-Architected Framework</a> provides guidance for designing and operating secure and cost-effective systems in the cloud. The Framework encompasses five key pillars: operational excellence, security, reliability, performance efficiency, and cost optimization. Understanding and leveraging the Framework is key to safeguarding applications against potential cyberthreats.</p>
<h2>#3 Implement robust security controls</h2>
<p>Taking proactive measures to impose strong cloud security controls is crucial for organizations to secure their AWS cloud infrastructure effectively. As the responsibility falls on you to protect your cloud workloads, consider implementing security controls to minimize the risk of security breaches, including clearly defining user roles, conducting privilege audits, enforcing a strong password policy, and using multi-factor authentication (MFA). Consistent enforcement and adherence to these security controls throughout your organization are essential.</p>
<h2>#4 Ensure easy access to security policies</h2>
<p>Accessibility to your <a href="https://cloudar.be/category/security-compliance/">AWS security policies</a> is key to promoting a culture of security within your organization. These policies should encompass access control, network security, encryption, and incident response guidelines. Making policies accessible helps everyone in your organization understand the importance of security and act in accordance with your policies.</p>
<h2>#5 Safeguard data with encryption</h2>
<p>Encrypting your data prevents unauthorized access and ensures its confidentiality, even if intercepted or stolen. Encryption is often mandatory for regulatory compliance. AWS provides various encryption options, including server-side encryption, client-side encryption, and transit encryption. Familiarize yourself with these options and choose the appropriate method to secure your sensitive data within your cloud environment.</p>
<h2>#6 Back up data consistently</h2>
<p>Regular data backups ensure data integrity and availability. In the event of cyberattacks, hardware failures, or accidental deletions, having up-to-date backups provides peace of mind and enables data recovery. The frequency of backups should be based on the criticality and volatility of your data. Regulatory requirements and business needs will determine how long the data will be retained. AWS offers various backup options, such as Amazon EBS, Amazon S3, and AWS Backup. By leveraging these options, you can store your backups in multiple regions to ensure constant protection.</p>
<h2>#7 Stay up to date</h2>
<p>AWS regularly releases security patches, bug fixes, and updates to address vulnerabilities and counter new threats. Keeping your AWS systems up to date maintains the security of your environment and protects against potential attacks. Take advantage of AWS’s automatic update features, such as Amazon Inspector and AWS Systems Manager, to automate patching and ensure your systems are always current. Configure notifications to receive alerts about new updates, enabling prompt action to stay ahead of security risks.</p>
<p><strong>Want to optimally prepare your organization for cloud-related security threats? <a href="https://cloudar.be/contact">Get in touch with Cloudar</a>, an official Next Generation AWS Managed Service Provider Partner.</strong></p>
<p>The post <a href="https://cloudar.be/awsblog/get-it-covered-7-essential-practices-for-aws-security/">Get it covered: 7 essential practices for AWS security</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Spotted: How we discovered Privilege Escalation, missing CloudTrail data and a race condition in AWS Directory Service</title>
		<link>https://cloudar.be/awsblog/spotted-privilege-escalation-in-aws-directory-service/</link>
		
		<dc:creator><![CDATA[Ben Bridts]]></dc:creator>
		<pubDate>Wed, 07 Jun 2023 10:00:07 +0000</pubDate>
				<category><![CDATA[Security & Compliance]]></category>
		<guid isPermaLink="false">https://cloudar.be/?p=20589</guid>

					<description><![CDATA[<p>It takes a village to spot a bug. Recently, Cloudar discovered a set of bugs in AWS Directory Service. One of them could be used for privilege escalation by an authenticated user with sufficient permissions. We reached out to AWS and they have remediated this issue and published a security bulletin.  No customer action is [&#8230;]</p>
<p>The post <a href="https://cloudar.be/awsblog/spotted-privilege-escalation-in-aws-directory-service/">Spotted: How we discovered Privilege Escalation, missing CloudTrail data and a race condition in AWS Directory Service</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>It takes a village to spot a bug. Recently, Cloudar discovered a set of bugs in AWS Directory Service. One of them could be used for privilege escalation by an authenticated user with sufficient permissions. We reached out to AWS and they have remediated this issue and <a href="https://aws.amazon.com/security/security-bulletins/AWS-2023-003/">published a security bulletin</a>.  No customer action is required</p>
<h2><strong>The findings</strong></h2>
<p>When you configure an AWS service to use an IAM role on your behalf, <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html">you need to have the iam:PassRole permission</a> in addition to the permissions required to configure and/or use the service.</p>
<p>Due to the bug we reported, AWS Directory Service didn’t verify the presence of those permissions when <a href="https://docs.aws.amazon.com/directoryservice/latest/admin-guide/assign_role.html">assigning users or groups to an existing IAM role</a>. This allowed users with the  ds:EnableRoleAccess permission to assign users to any role in their account that <a href="https://docs.aws.amazon.com/directoryservice/latest/admin-guide/edit_trust.html">has a trust relationship with AWS Directory service</a>.</p>
<p>Additionally, we found some actions that were not logged to CloudTrail and a validation that’s only done client-side</p>
<h2><strong>The discovery</strong></h2>
<p>Cloudar is an <a href="https://aws.amazon.com/partners/programs/msp/">AWS Managed Service Provider Partner</a>, and as such, we work together with our clients to configure their environments. One of our clients alerted us of a strange behavior in the AWS Console for AWS Directory Service, which prompted us to take a deeper look behind the scenes of how that service works.</p>
<h3>Step 1: Missing CloudTrail Data</h3>
<p>We had configured AWS Directory Service for AWS Management Console access for our client, and it was working properly for them. However, when looking in the console, the feature appeared to be disabled.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20610 size-full" src="https://cloudar.be/wp-content/uploads/2023/05/Picture-1.png" alt="A screenshot of the AWS Console showing that the &quot;AWS Management Console&quot; feature of AWS Directory Service is disabled." width="902" height="190" srcset="https://cloudar.be/wp-content/uploads/2023/05/Picture-1.png 902w, https://cloudar.be/wp-content/uploads/2023/05/Picture-1-768x162.png 768w" sizes="auto, (max-width: 902px) 100vw, 902px" /></p>
<p>Usually, we would investigate CloudTrail logs to see what disabled this, but at the time, we didn’t see an entry in CloudTrail that showed the enabling or disabling of access. When we tested what happened when changing the status ourselves, we also did not see those actions recorded in CloudTrail.</p>
<p>We’ve reported this to AWS, and enabling or disabling console access does now create events in CloudTrail (note: **OMITTED** is part of the CloudTrail event):</p>
<pre>{
[…]
    "eventSource": "ds.amazonaws.com",
    "requestParameters": {
        "directoryId": "d-123456789a",
        "applicationId": "***OMITTED***",
        "serviceAccountUserName": "***OMITTED***",
        "serviceAccountPassword": "HIDDEN_DUE_TO_SECURITY_REASONS"
    },
    "responseElements": null,
    "readOnly": false,
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "sessionCredentialFromConsole": "true"
}</pre>
<p>&nbsp;</p>
<pre>{
[…]
    "eventSource": "ds.amazonaws.com",
    "eventName": "UnauthorizeApplication",
    "requestParameters": {
        "directoryId": "d-123456789a",
        "applicationId": "***OMITTED***"
    },
    "responseElements": null,
    "readOnly": false,
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "sessionCredentialFromConsole": "true"
}</pre>
<h3>Step 2: Looking at what the console does</h3>
<p>Instead of looking through CloudTrail logs, we opened the development console in our browser. There we saw that it was sending requests to an undocumented API when enabling console access. There is no public API for enabling console access or assigning user to roles within Directory Service, so this wasn’t unexpected.</p>
<p>What <em>was</em> unexpected was that when enabling or disabling console access, there were two calls to the internal API. One to (un)authorize an application called “AWSManagementConsole” and one to (un)authorize an application called “Directory Service console”.</p>
<p>Assuming there was a consistency problem, we investigated what happened if we only unauthorized one of them by sending requests to the undocumented API from the command line.  When we unauthorized the “AWSManagementConsole” and authorized “Directory Service console”, we were able to reproduce our customer’s issue where the console would show “disabled”, but the sign-in would still work.</p>
<p>By the time we sent our report to AWS, the double API call didn’t happen anymore (only “AWSManagementConsole” is used today), so this seemed to have been a temporary issue. We still reported this behavior, indicating that we could no longer reproduce.</p>
<h3>Step 3: Finding a race condition</h3>
<p>Since this wasn’t an easy bug to uncover, we had to read a lot of documentation to deeply understand what Directory Service was doing. While doing that, we noted an interesting sentence: “<a href="https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_management_console_access.html#console_disable">If any IAM roles have been assigned to users or groups in the directory, the Disable button may be unavailable</a>.”</p>
<p>The word “may” seemed very ambiguous, especially after finding an issue where a network disconnection could lead to an unexpected state. We looked a bit further and realized that the expected behavior is that you can’t disable the integration if you still have users and/or groups assigned to roles.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-20611" src="https://cloudar.be/wp-content/uploads/2023/05/cannot-disable.png" alt="A screenshot showing an error message when trying to disable console access while there are still users assigned" width="902" height="354" srcset="https://cloudar.be/wp-content/uploads/2023/05/cannot-disable.png 902w, https://cloudar.be/wp-content/uploads/2023/05/cannot-disable-768x301.png 768w" sizes="auto, (max-width: 902px) 100vw, 902px" /></p>
<p>However, that check is done completely in the browser, and appears to be based on the state when the tab was loaded. This means you can disable the console access while still having users and/or groups assigned. You could do this by calling the same (undocumented) API that the console uses, or in the browser by 1) opening the console while there are no assignments 2) using a second tab to assign users and/or groups to a role 3) using the first tab to disable console access.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-20612" src="https://cloudar.be/wp-content/uploads/2023/05/disabled-with-users.png" alt="A screenshot showing how the &quot;AWS Console Access&quot; feature is disabled while there are still users assigned" width="902" height="314" srcset="https://cloudar.be/wp-content/uploads/2023/05/disabled-with-users.png 902w, https://cloudar.be/wp-content/uploads/2023/05/disabled-with-users-768x267.png 768w" sizes="auto, (max-width: 902px) 100vw, 902px" /></p>
<p>We’ve reported this issue to AWS, but don’t consider it a vulnerability as the assignments are not usable if the Console access is disabled.</p>
<h3>Step 4: Privilege escalation</h3>
<p>Having discovered two APIs that did some part of their logic client-side, and having experimented with the role-assignment, we looked at other validations that should happen when you assign a Role to a user in a directory.  To assign a specific role to a user or group:</p>
<ul>
<li>you should have ds:EnableRoleAccess permission for the Directory Service domain;</li>
<li>the role you want to pass should have a trust policy that allows use in AWS Directory Service;</li>
<li>the role should be in the same AWS account;</li>
<li>you should have iam:PassRole permissions on the role.</li>
</ul>
<p>When we tested these checks, we noticed that we could assign a role (within the same account), even if we didn’t have the right iam:PassRole permission. In certain setups, this could mean privilege escalation.</p>
<ul>
<li>Imagine you have two people, Alice and Bob, managing a domain, and each of them is responsible for assigning users to specific IAM roles. Alice assigns people to Role A and Bob assigns people to Role B. They could abuse the missing iam:PassRole check to assign people to a role they are not responsible for. For example, Alice assigns herself (or someone else) to Role B.</li>
<li>Another possible scenario would be when a user has the required permissions to create and manage a domain in AWS Directory Service, but no IAM permissions (e.g., with the PowerUserAccess managed policy). If there is already a role that has a trust relationship with AWS Directory Service, that user could create their own domain and assume that existing role.</li>
</ul>
<p>This issue has been completely fixed.</p>
<h2>Recommended actions</h2>
<p>Taking advantage of this vulnerability required a specific configuration and a high level of permissions within Directory Service. AWS customers who were relying on iam:PassRole permissions for access control before 2023-05-12 should review their directory for misconfiguration and their CloudTrail logs for unexpected AssumeRole calls.</p>
<h2>Timeline</h2>
<p>2023-04-07: Issue found and reported to AWS.</p>
<p>2023-04-07: Investigation started by AWS.</p>
<p>2023-04-13: Issue confirmed by AWS, and development of a fix in progress.</p>
<p>2023-04-24: Development finished and deployment of the fix in progress.</p>
<p>2023-05-12: Fix deployed globally.</p>
<h2>Acknowledgements</h2>
<p>We would like to thank the AWS teams involved, especially the Security team for their open communication and helpful responses. I’d also like to thank my coworkers for diving deep when they see unexpected things in the AWS console.</p>
<h2>Reach out to us</h2>
<p>I talked on <a href="https://pretalx.com/fwd-cloudsec-2023/talk/7BXVWM/">June 12 at fwd:cloudsec about how this journey showed the universal benefits of security features</a>, and you can <a href="https://www.youtube.com/watch?v=ey3dwohF6BY">watch that talk on youtube</a>.</p>
<p>The post <a href="https://cloudar.be/awsblog/spotted-privilege-escalation-in-aws-directory-service/">Spotted: How we discovered Privilege Escalation, missing CloudTrail data and a race condition in AWS Directory Service</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Options for migrating between Amazon Cognito User Pools</title>
		<link>https://cloudar.be/awsblog/options-for-migrating-between-amazon-cognito-user-pools/</link>
		
		<dc:creator><![CDATA[Ben Bridts]]></dc:creator>
		<pubDate>Thu, 18 Aug 2022 09:35:22 +0000</pubDate>
				<category><![CDATA[AWS Blog]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Security & Compliance]]></category>
		<guid isPermaLink="false">https://cloudar.be/?p=20380</guid>

					<description><![CDATA[<p>Sometimes we run into questions that seem simple, but that have a very complex answer. In this blog post we will explain why &#8220;Can I migrate between two Amazon Cognito User Pools&#8221; is one of those question, and why it usually leads to a new set of questions, like: Where do your users exist (do [&#8230;]</p>
<p>The post <a href="https://cloudar.be/awsblog/options-for-migrating-between-amazon-cognito-user-pools/">Options for migrating between Amazon Cognito User Pools</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="answer-body-detail user-formatted-content">
<p>Sometimes we run into questions that seem simple, but that have a very complex answer. In this blog post we will explain why &#8220;Can I migrate between two Amazon Cognito User Pools&#8221; is one of those question, and why it usually leads to a new set of questions, like:</p>
<ul>
<li>Where do your users exist (do they federate from a different Identity Provider (IdP), or are they in the User Pool?)</li>
<li>Are you using MFA in Cognito</li>
<li>Which configuration settings can you change?</li>
<li>Are you okay with a migration process in the application?</li>
<li>Will all users sign in during a certain timeframe?</li>
<li>Do you want to keep your endpoints and identifiers, or are new endpoints okay?</li>
</ul>
<p>Lets look at why we are asking those questions, and which Cognito components are tricky to deal with.</p>
<h1>Configuration</h1>
<p>The configuration of a User Pool can be described by the API, or managed in an Infrastructure as Code tool. This makes it easy to recreate with the same settings. However, besides the new endpoints and ids (see below), <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation.html" target="_blank" rel="noopener">you will have to update the federation settings</a> (of you are using sign in through a third party).</p>
<p>Eg. If you are federating users from Active Directory (AD) using SAML, you will have to set up a new integration on the AD side as well, so that user can sign in via AD/SAML. This is the same process as setting up this IdP for the first time.</p>
<h1>Endpoints and Ids</h1>
<p>If you create a new user pool, it will get a new id. This means that the following things will change. Usually this is not a problem, as these are expected changes (if you migrate to a different product, similar things will change).</p>
<ul>
<li>The User Pool Id</li>
<li>The App Client Ids and Secrets (you also create new App Clients)</li>
<li>The domain used for the hosted UI. Technically you can move it, but this will include downtime. Using a new domain will always be easier (and give you more control about step-by-step updates and rollbacks)</li>
<li>The User Pool Id and App Client Id are also part of the Tokens that Cognito returns. <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-verifying-a-jwt.html#amazon-cognito-user-pools-using-tokens-step-3">If you&#8217;re verifying them in your application (which you should)</a>, or are using a managed integration between an AWS service and Cognito (eg. Api Gateway), you will have to update these too.</li>
</ul>
<h1>Users and Groups</h1>
<p>This is the difficult part: while there are APIs to list/describe users and groups, there is no way to export the password (hash) or the MFA (seed) of a user. This means that in the worst case scenario you have to disable MFA and all users will have to reset their password before they can log in again. There are a few solutions, but none of them are ideal.</p>
<h2>Problem: You are using MFA in Cognito</h2>
<p>This is the worst case scenario for a migration. There is no way to export or set MFA seeds in Cognito, and usually disabling MFA for everyone is not going to be an option</p>
<h2>Problem: You are using the sub attribute in your application</h2>
<p>The sub attribute is an unique identifier for every user, and migrating users will create a new identifier. To work around this, you could use a different (custom) attribute to safe an identifier in, and update your application to use that. Filling that attribute comes with its own complexities, though.</p>
<h2>Option 1: You are using federation / sign in through a third party</h2>
<p>You&#8217;re in luck! Since the user and their password exist in the other system, you can setup a new federation and users will still be able to sign in (but  make sure you&#8217;ve read the &#8220;Configuration&#8221; section above).</p>
<p>If you want to go this route to make migration (and failover) easier, there are third party IdPs that you can use via SAML/OIDC. Although in some cases it might make more sense to integrate directly with them (either in Cognito Identity Pools or in the application) instead of putting User Pools in between. One reason to keep Cognito, is that you can create multiple App Clients (and thus applications) on one pool (and this can be done with the IaC tool you are already using). Whereas if you integrate directly, you have to configure everything in the external service (and depending on the protocol you are using, this can be hard to debug)</p>
<p>If you are also using groups, you still have to export and recreate those. Take a look at the <a href="https://aws.amazon.com/solutions/implementations/cognito-user-profiles-export-reference-architecture/" target="_blank" rel="noopener">AWS Solution mentioned in option 2</a>,  and its<a href="https://docs.aws.amazon.com/solutions/latest/cognito-user-profiles-export-reference-architecture/solution-components.html#limitations" target="_blank" rel="noopener"> limitations</a> for an example of doing that.</p>
<h2>Option 2: You don&#8217;t mind resetting all passwords.</h2>
<p>This is also doable, you can export all users, import them in the new pool and make them set a new password to sign in (if this is a limited set of internal users, you could also set a password for them, but you&#8217;d want them to pick their own either way)</p>
<p><a href="https://aws.amazon.com/solutions/implementations/cognito-user-profiles-export-reference-architecture/">There is even an AWS solution (read: Open Source software that you have to manage yourself) that can be used to do the export once or on a schedule</a> (eg. to create backups). Make sure to also check the <a href="https://docs.aws.amazon.com/solutions/latest/cognito-user-profiles-export-reference-architecture/solution-components.html#limitations" target="_blank" rel="noopener">limitations</a>.</p>
<h2>Option 3: Migrating on first sign-in</h2>
<p><a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-migrate-user.html">You can add a Lambda Function to the new User Pool (there is example code, but you&#8217;d have to manage this yourself)</a>. This function will get the username and password, and can check the original pool and write the existing password to the new pool if the password is correct. Docs:</p>
<p>This has some downsides:</p>
<ul>
<li>The old User Pool needs to stay around until the migration is complete (you pay for active users, so this does not have to be a cost problem)</li>
<li>This can take a long time, and potential never finish (if you have users that don&#8217;t sign in regularly)</li>
</ul>
</div>
<h1>Conclusion</h1>
<div class="answer-body-detail user-formatted-content">
<p>There is a lot of complexity to deal with, so the short answer to our original question is &#8220;it depends&#8221;.</p>
<p>If you have a workload where this question is relevant, you probably also want to give feedback to AWS (eg. via your Account Manager). If the service would provide a way to export and import Users and Groups, this would be a lot easier. Not being able to export password-hashes and MFA-seeds (even in a way that only Cognito can read them), is currently limiting multiple solutions.</p>
</div>
<p>The post <a href="https://cloudar.be/awsblog/options-for-migrating-between-amazon-cognito-user-pools/">Options for migrating between Amazon Cognito User Pools</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The 5 biggest AWS cloud security threats</title>
		<link>https://cloudar.be/awsblog/the-5-biggest-aws-cloud-security-threats/</link>
		
		<dc:creator><![CDATA[Bart Van Hecke]]></dc:creator>
		<pubDate>Thu, 16 Jun 2022 12:35:04 +0000</pubDate>
				<category><![CDATA[AWS Blog]]></category>
		<category><![CDATA[Security & Compliance]]></category>
		<guid isPermaLink="false">https://cloudar.be/?p=20302</guid>

					<description><![CDATA[<p>Every day more organizations are moving their operation to the cloud. This means most, if not all, of their data is also accessible in the cloud. This makes the cloud more interesting for cloud hackers. Most security issues arise from credential theft and weak spots in cloud security. The importance of sufficient cloud security is [&#8230;]</p>
<p>The post <a href="https://cloudar.be/awsblog/the-5-biggest-aws-cloud-security-threats/">The 5 biggest AWS cloud security threats</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Every day more organizations are moving their operation to the cloud. This means most, if not all, of their data is also accessible in the cloud. This makes the cloud more interesting for cloud hackers. Most security issues arise from credential theft and weak spots in cloud security. The importance of sufficient cloud security is becoming more important than ever. When we look at AWS cloud security, there are five big threats to keep in mind:</strong></p>
<p>&nbsp;</p>
<h2><strong>#1 Lacking password management</strong></h2>
<p>If the cloud is your kingdom, passwords and credentials are the key to getting into it. Credentials grant you access to all kinds of exploitable data. They are an absolute goldmine for anyone with bad intentions. Research shows that over 50% of users use the same password for almost all of their accounts. That means that theoretically half of the people who can access your cloud infrastructure, do it with the same password they use for their Facebook or Google account. The moment the big players suffer a data leak, hackers can use those passwords to try to get into all of the users’ other accounts, including your organization’s cloud data.</p>
<p>Preventing this data breach starts with setting the right password rules. Think about password length and more complex requirements such as including numbers and symbols. Users will now be obligated to choose a strong password. To avoid the reuse of passwords, you need to be able to remember them all, a seemingly impossible feat. But that’s where a good password manager comes in. So educate your users in good password management, and practice what you preach!</p>
<h2><strong>#2 Insufficient encryption</strong></h2>
<p>Traffic and data encryption creates trust among approved users. It makes it possible to work efficiently without any security risks. Sending forms, files and data through encrypted channels protects your data, your users and your company. We call this encryption in transit. Encryption is also an essential part of secure data storage. You cannot afford any weak links in the protection of sensitive data. We call this encryption at rest. Be sure to prioritize data and traffic encryption in your AWS cloud setup.</p>
<h2><strong>#3 Insider threat</strong></h2>
<p>As much as you train and educate your users, sometimes they still may unintentionally cause your cloud security to be at risk. By installing an unauthorized extension to their browser or too many failed login attempts, for example. You need to be able to pick up on unusual network activity like this in order to follow up with the user in question or snuff out an actual security threat. That requires consistent real time monitoring, logging and archiving those logs on encrypted storage. Ensure that you set up a variety of monitoring alerts that notify you of any aberrant behavior.</p>
<h2><strong>#4 Phishing</strong></h2>
<p>No less than 90% of system breaches start with users opening a phishing email, waich they are shown to do in about 30% of cases. There are two things you can do to get those numbers down. First of all, train your users in recognizing phishing attempts and teach them to report these to your security team. Secondly, protect your AWS root account. You can do this by enabling multi-factor authentication. Also, make sure the root account isn’t linked to any personal or external accounts. The next step would be to use a multiple AWS account strategy. By doing this, not all of your assets will be at risk when one of them is compromised.</p>
<h2><strong>#5 Not planning ahead </strong></h2>
<p>No matter how well you set up your cloud environment, things will go wrong. Accidents will happen. Unforeseen issues will arise. That’s a normal part of working in evolving technologies. But what it all comes down to at a moment like that is having an adequate incident recovery plan. Essentially, that means you imagine every worst-case scenario beforehand and create a plan for how you will handle it, should it come to that. That way, even if you are faced with a security issue, you will know exactly what to do and be able to minimize your downtime as well as any loss of data, resources and time.</p>
<p>&nbsp;</p>
<p><strong>Do you want to exchange ideas about how well-prepared your organization is for cloud related security threats? Get in touch with Cloudar, an official Next Generation AWS Managed Service Provider Partner. </strong></p>
<p>The post <a href="https://cloudar.be/awsblog/the-5-biggest-aws-cloud-security-threats/">The 5 biggest AWS cloud security threats</a> appeared first on <a href="https://cloudar.be">Cloudar</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
