<?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 Archives | Clever Cloud</title>
	<atom:link href="https://stagingv6.cleverapps.io/blog/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>From Code to Product</description>
	<lastBuildDate>Tue, 22 Oct 2024 11:02:43 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2023/03/cropped-cropped-favicon-32x32.png</url>
	<title>Security Archives | Clever Cloud</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Clever Cloud joins Hexatrust</title>
		<link>https://stagingv6.cleverapps.io/blog/company/2024/10/22/clever-cloud-joins-hexatrust/</link>
		
		<dc:creator><![CDATA[Carine Guillemet]]></dc:creator>
		<pubDate>Tue, 22 Oct 2024 11:01:59 +0000</pubDate>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[partnership]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=14478</guid>

					<description><![CDATA[<p><img width="800" height="355" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/10/2024-10-09-clever-cloud-banniere-blog-php-en-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="cloud data securoity hexatrust" decoding="async" fetchpriority="high" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/10/2024-10-09-clever-cloud-banniere-blog-php-en-1.png 800w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/10/2024-10-09-clever-cloud-banniere-blog-php-en-1-300x133.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/10/2024-10-09-clever-cloud-banniere-blog-php-en-1-768x341.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></p><!-- wp:heading -->
<h2 class="wp-block-heading"><strong>What is Hexatrust?</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><a href="https://stagingv6.cleverapps.io/security/">Hexatrust</a>&nbsp;is an association of French and European leaders in cybersecurity and the trusted cloud. Its mission is to promote excellence in the digital domain by bringing together start-ups, SMEs and ETIs innovating in the cybersecurity and&nbsp;<a href="https://stagingv6.cleverapps.io/fr/security/">cloud security</a>&nbsp;sectors. The association strives to defend the interests of its members in dealings with public authorities, and to promote the French and European cybersecurity ecosystem.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>Hexatrust's role</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Hexatrust's mission is multi-faceted:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li><strong>Advocacy</strong>: Representing industry players to the authorities.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><strong>Visibility</strong>: Increase members' recognition on the national and international markets.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><strong>Innovation</strong>: Leading a community of entrepreneurs to promote the exchange of ideas and the development of innovative solutions.</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>Why is joining Hexatrust important for Clever Cloud?</strong></h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading"><strong>Collaboration and synergy</strong></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Unity is strength. Being a member of Hexatrust enables Clever Cloud to collaborate with other French and European industry leaders. This cooperation is crucial to developing even more robust cloud security solutions that meet today's cybersecurity challenges. We also share a common vision of the European digital age, and of the importance of digital sovereignty in protecting the data of our businesses and citizens.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading"><strong>Technology watch and peer-to-peer exchanges</strong></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Hexatrust has set up a number of working groups and organizes events enabling its members to exchange and share feedback on tools and issues. These actions are vital for Clever Cloud and its teams, to ensure the necessary monitoring of our products' security.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading"><strong>In line with our strategy</strong></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Clever Cloud has designed its platform to be <a href="https://stagingv6.cleverapps.io/security/">secured by design</a>: immutable architecture, avoidance of trusted networks (each peer on the same network is identified, authenticated and communicates in encrypted form), development or participation in the development of <a href="https://stagingv6.cleverapps.io/open-source/">open source tools</a> (Reverse Proxy <a href="“https://www.sozu.io/”">Sozu</a> and Token <a href="“https://www.biscuitsec.org/”">Biscuit</a>). In addition to these best practices, we are ISO 9001 and <a href="https://stagingv6.cleverapps.io/blog/company/2024/03/22/iso27001-clever-cloud/">ISO 27001:2022</a> certified. We are also in the process of obtaining HDS (Healthcare Data Hosting) certification and SecNumCloud certification.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>Conclusion</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Joining Hexatrust represents a springboard for Clever Cloud on its journey towards excellence in <strong>cloud data security</strong>. By joining this community of experts, we are reasserting our commitment while contributing to the evolution of the European digital landscape.</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="800" height="355" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/10/2024-10-09-clever-cloud-banniere-blog-php-en-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="cloud data securoity hexatrust" decoding="async" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/10/2024-10-09-clever-cloud-banniere-blog-php-en-1.png 800w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/10/2024-10-09-clever-cloud-banniere-blog-php-en-1-300x133.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2024/10/2024-10-09-clever-cloud-banniere-blog-php-en-1-768x341.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></p><!-- wp:heading -->
<h2 class="wp-block-heading"><strong>What is Hexatrust?</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><a href="https://stagingv6.cleverapps.io/security/">Hexatrust</a>&nbsp;is an association of French and European leaders in cybersecurity and the trusted cloud. Its mission is to promote excellence in the digital domain by bringing together start-ups, SMEs and ETIs innovating in the cybersecurity and&nbsp;<a href="https://stagingv6.cleverapps.io/fr/security/">cloud security</a>&nbsp;sectors. The association strives to defend the interests of its members in dealings with public authorities, and to promote the French and European cybersecurity ecosystem.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>Hexatrust's role</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Hexatrust's mission is multi-faceted:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li><strong>Advocacy</strong>: Representing industry players to the authorities.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><strong>Visibility</strong>: Increase members' recognition on the national and international markets.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><strong>Innovation</strong>: Leading a community of entrepreneurs to promote the exchange of ideas and the development of innovative solutions.</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>Why is joining Hexatrust important for Clever Cloud?</strong></h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading"><strong>Collaboration and synergy</strong></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Unity is strength. Being a member of Hexatrust enables Clever Cloud to collaborate with other French and European industry leaders. This cooperation is crucial to developing even more robust cloud security solutions that meet today's cybersecurity challenges. We also share a common vision of the European digital age, and of the importance of digital sovereignty in protecting the data of our businesses and citizens.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading"><strong>Technology watch and peer-to-peer exchanges</strong></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Hexatrust has set up a number of working groups and organizes events enabling its members to exchange and share feedback on tools and issues. These actions are vital for Clever Cloud and its teams, to ensure the necessary monitoring of our products' security.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading"><strong>In line with our strategy</strong></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Clever Cloud has designed its platform to be <a href="https://stagingv6.cleverapps.io/security/">secured by design</a>: immutable architecture, avoidance of trusted networks (each peer on the same network is identified, authenticated and communicates in encrypted form), development or participation in the development of <a href="https://stagingv6.cleverapps.io/open-source/">open source tools</a> (Reverse Proxy <a href="“https://www.sozu.io/”">Sozu</a> and Token <a href="“https://www.biscuitsec.org/”">Biscuit</a>). In addition to these best practices, we are ISO 9001 and <a href="https://stagingv6.cleverapps.io/blog/company/2024/03/22/iso27001-clever-cloud/">ISO 27001:2022</a> certified. We are also in the process of obtaining HDS (Healthcare Data Hosting) certification and SecNumCloud certification.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading"><strong>Conclusion</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Joining Hexatrust represents a springboard for Clever Cloud on its journey towards excellence in <strong>cloud data security</strong>. By joining this community of experts, we are reasserting our commitment while contributing to the evolution of the European digital landscape.</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Removal of TLS 1.0 and 1.1 from our load balancers on June 30</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2022/05/03/removal-of-tls-1-0-and-1-1-from-our-load-balancers-on-june-30/</link>
		
		<dc:creator><![CDATA[Florentin Dubois]]></dc:creator>
		<pubDate>Tue, 03 May 2022 08:23:46 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=6280</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="tls" decoding="async" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-1368x528.png 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><!-- wp:paragraph -->
<p>When you access a website or an online application, you most often do so in a "secure" way. This is for example the well-known green padlock that symbolizes HTTPS connections in your browser, which has become a standard these years thanks to initiatives like <a href="https://stagingv6.cleverapps.io/blog/features/2019/01/15/automatic-lets-encrypt-certificates/" target="_blank" rel="noreferrer noopener">Let's Encrypt</a>.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This means that the data transferred to the server is encrypted, and that even if they are intercepted, they cannot be read by a third party. This protection has been provided by the TLS (<a href="https://en.wikipedia.org/wiki/Transport_Layer_Security" target="_blank" rel="noreferrer noopener">Transport Layer Security</a>) protocol for almost 20 years, whether it’s a personal site, an online shop or an access to your bank's services.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Over time, this critical technical brick on the Internet has evolved to strengthen the level of security it offers. In August 2018, <a href="https://www.ietf.org/blog/tls13/" target="_blank" rel="noreferrer noopener">its version 1.3</a> (the latest) was released. Meanwhile, versions 1.0 and 1.1 were considered to no longer offer a sufficient level of protection. They <a href="https://datatracker.ietf.org/doc/html/rfc8996" target="_blank" rel="noreferrer noopener">have been deprecated</a> by the IETF (Internet Engineering Task Force) since March 2021 and have therefore been gradually removed from recent browsers such as Firefox, Chrome and its derivatives or Safari.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6281,"sizeSlug":"full","linkDestination":"none"} -->
<div class="wp-block-image"><figure class="aligncenter size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/05/sans-titre.webp" alt="Clever Cloud Sōzu TLS Version" class="wp-image-6281"/><figcaption>More than 90% of our traffic is TLS 1.3 </figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>At Clever Cloud, we have seen our customers adopt TLS 1.2 and 1.3 gradually. On our load balancers, based on our in-house and open source reverse proxy <a href="https://www.sozu.io/" target="_blank" rel="noreferrer noopener">Sōzu</a>, the latest version accounts for over 90% of the requests processed each day. TLS 1.2 for just under 9%. TLS 1.0 and 1.1 for only a few tens of thousands of requests per day, less than 0.1% of our traffic.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>While we have maintained these versions for compatibility reasons, this will no longer be the case as of June 30. We will of course inform the customers affected by this choice, and encourage them to switch to more recent versions, which will have advantages for them in terms of security, performance and SEO. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Several reminders will be sent between now and the final shutdown of TLS 1.0 and 1.1. If you have any questions on this subject, please contact our support team through <a href="https://console.clever-cloud.com/" target="_blank" rel="noreferrer noopener">the Console</a>.</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="tls" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/05/banniere-tls-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:paragraph -->
<p>When you access a website or an online application, you most often do so in a "secure" way. This is for example the well-known green padlock that symbolizes HTTPS connections in your browser, which has become a standard these years thanks to initiatives like <a href="https://stagingv6.cleverapps.io/blog/features/2019/01/15/automatic-lets-encrypt-certificates/" target="_blank" rel="noreferrer noopener">Let's Encrypt</a>.&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This means that the data transferred to the server is encrypted, and that even if they are intercepted, they cannot be read by a third party. This protection has been provided by the TLS (<a href="https://en.wikipedia.org/wiki/Transport_Layer_Security" target="_blank" rel="noreferrer noopener">Transport Layer Security</a>) protocol for almost 20 years, whether it’s a personal site, an online shop or an access to your bank's services.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Over time, this critical technical brick on the Internet has evolved to strengthen the level of security it offers. In August 2018, <a href="https://www.ietf.org/blog/tls13/" target="_blank" rel="noreferrer noopener">its version 1.3</a> (the latest) was released. Meanwhile, versions 1.0 and 1.1 were considered to no longer offer a sufficient level of protection. They <a href="https://datatracker.ietf.org/doc/html/rfc8996" target="_blank" rel="noreferrer noopener">have been deprecated</a> by the IETF (Internet Engineering Task Force) since March 2021 and have therefore been gradually removed from recent browsers such as Firefox, Chrome and its derivatives or Safari.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":6281,"sizeSlug":"full","linkDestination":"none"} -->
<div class="wp-block-image"><figure class="aligncenter size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/05/sans-titre.webp" alt="Clever Cloud Sōzu TLS Version" class="wp-image-6281"/><figcaption>More than 90% of our traffic is TLS 1.3 </figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>At Clever Cloud, we have seen our customers adopt TLS 1.2 and 1.3 gradually. On our load balancers, based on our in-house and open source reverse proxy <a href="https://www.sozu.io/" target="_blank" rel="noreferrer noopener">Sōzu</a>, the latest version accounts for over 90% of the requests processed each day. TLS 1.2 for just under 9%. TLS 1.0 and 1.1 for only a few tens of thousands of requests per day, less than 0.1% of our traffic.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>While we have maintained these versions for compatibility reasons, this will no longer be the case as of June 30. We will of course inform the customers affected by this choice, and encourage them to switch to more recent versions, which will have advantages for them in terms of security, performance and SEO. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Several reminders will be sent between now and the final shutdown of TLS 1.0 and 1.1. If you have any questions on this subject, please contact our support team through <a href="https://console.clever-cloud.com/" target="_blank" rel="noreferrer noopener">the Console</a>.</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Security update about npm libraries &#8216;colors&#8217; and &#8216;faker&#8217;</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2022/01/11/security-update-about-colors-and-faker/</link>
		
		<dc:creator><![CDATA[Julie Nolot]]></dc:creator>
		<pubDate>Tue, 11 Jan 2022 17:14:33 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Node.JS]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=5071</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-colors-and-faker-2.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="security_update_colors_faker" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-colors-and-faker-2.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-colors-and-faker-2-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-colors-and-faker-2-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-colors-and-faker-2-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-colors-and-faker-2-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:paragraph -->
<p>Few days ago, Marak&nbsp;Squires, the developer behind the open-source npm libraries <a href="https://github.com/Marak/colors.js" target="_blank" rel="noreferrer noopener">colors</a> and <a href="https://github.com/marak/Faker.js/" target="_blank" rel="noreferrer noopener">faker</a>, decided to corrupt the libraries, to denounce issues in open-source projects' funding system. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The <a href="https://github.com/Marak/colors.js/commit/074a0f8ed0c31c35d13d28632bd8a049ff136fb6#diff-92bbac9a308cd5fcf9db165841f2d90ce981baddcb2b1e26cfff170929af3bd1R18" target="_blank" rel="noreferrer noopener">infinite loop</a> introduced by the developer broke several apps using these libraries by printing the text 'LIBERTY LIBERTY LIBERTY' and non-ASCII characters in the apps' logs.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>It causes a lot of trouble as the&nbsp;<a href="https://github.com/Marak/colors.js" target="_blank" rel="noreferrer noopener">colors</a>&nbsp;library receives over&nbsp;<a href="https://www.npmjs.com/package/colors" target="_blank" rel="noreferrer noopener">20 million weekly downloads</a>&nbsp;on npm alone and has almost 19,000 projects relying on it. Whereas,&nbsp;<a href="https://www.npmjs.com/package/faker" target="_blank" rel="noreferrer noopener">faker</a>&nbsp;receives over 2.8 million weekly downloads on npm, and has over 2,500 dependents.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":5072,"sizeSlug":"large","linkDestination":"none"} -->
<div class="wp-block-image"><figure class="aligncenter size-large"><img src="https://cdn.clever-cloud.com/uploads/2022/01/faker-liberty-667x337.jpeg" alt="" class="wp-image-5072"/><figcaption>Non-ASCII characters found in the apps logs using the npm library 'color'</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:heading -->
<h2>How to check if your Node.js app is impacted?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The first thing to do is to check if your app is using the npm libraries 'colors' or 'faker'. To do so, run either:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre><code class="lang-shell">
npm ls colors
</code>
</pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Or</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre><code class="lang-shell">
npm ls faker
</code>
</pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You will get an output like this:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre><code class="lang-shell">
my-project@1.2.3 /home/me/my-project
├─┬ @storybook/addon-docs@5.3.18
│ └─┬ vue-docgen-loader@1.5.0
│   └─┬ jscodeshift@0.7.0
│     └── colors@1.4.0  deduped
├─┬ @storybook/vue@5.3.18
│ └─┬ @storybook/core@5.3.18
│   └─┬ cli-table3@0.5.1
│     └── colors@1.4.0  deduped
└── colors@1.4.0
</code>
</pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>With this output, we can identify that this project uses 'colors' directly with version 1.4.0 and through transitive dependencies, also in version 1.4.0.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Your app uses 'colors' or 'faker', what can you do?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If your app uses one of these npm libraries, we invite you to <strong>check three thing</strong>:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Check the version</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>First of all, you need to check if you're using one of the compromised versions of these libraries:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>colors: <code>1.4.1</code>, <code>1.4.2</code>, and <code>1.4.44-liberty-2</code></li><li>faker: <code>6.6.6</code></li></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":3} -->
<h3>Check the package-lock.json</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Do you have a <code>package-lock.json</code>? If you don't we invite you to read <a href="https://docs.npmjs.com/cli/v8/configuring-npm/package-lock-json" target="_blank" rel="noreferrer noopener">the documentation</a> and add one to your project.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you do, you need to force a version which is not compromised (<code>1.4.0</code> for colors and <code>5.5.3</code> for 'faker'). You're using npm? You can try with the module <a href="https://github.com/rogeriochaves/npm-force-resolutions" target="_blank" rel="noreferrer noopener">npm-force-resolutions</a>. You're using Yarn? You can use the process described <a href="https://classic.yarnpkg.com/en/docs/selective-version-resolutions/" target="_blank" rel="noreferrer noopener">in this documentation</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Update your tools to their latest version </h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We also invite you to check if the dependencies you use released an update. As an exemple, if you use <a href="https://storybook.js.org" target="_blank" rel="noreferrer noopener"><strong>Storybook</strong></a>, the <a href="https://github.com/storybookjs/storybook/releases/tag/v6.4.10" target="_blank" rel="noreferrer noopener">v6.4.10</a> released earlier yesterday fixes the issue.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>A note for Clever Tools users</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>By the way, if you use our CLI, the <a href="https://stagingv6.cleverapps.io/doc/reference/clever-tools/" target="_blank" rel="noreferrer noopener">clever-tools</a>, and if you installed it via npm, <strong>please upgrade to v2.8.1</strong>.</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-colors-and-faker-2.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="security_update_colors_faker" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-colors-and-faker-2.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-colors-and-faker-2-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-colors-and-faker-2-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-colors-and-faker-2-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-colors-and-faker-2-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:paragraph -->
<p>Few days ago, Marak&nbsp;Squires, the developer behind the open-source npm libraries <a href="https://github.com/Marak/colors.js" target="_blank" rel="noreferrer noopener">colors</a> and <a href="https://github.com/marak/Faker.js/" target="_blank" rel="noreferrer noopener">faker</a>, decided to corrupt the libraries, to denounce issues in open-source projects' funding system. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The <a href="https://github.com/Marak/colors.js/commit/074a0f8ed0c31c35d13d28632bd8a049ff136fb6#diff-92bbac9a308cd5fcf9db165841f2d90ce981baddcb2b1e26cfff170929af3bd1R18" target="_blank" rel="noreferrer noopener">infinite loop</a> introduced by the developer broke several apps using these libraries by printing the text 'LIBERTY LIBERTY LIBERTY' and non-ASCII characters in the apps' logs.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>It causes a lot of trouble as the&nbsp;<a href="https://github.com/Marak/colors.js" target="_blank" rel="noreferrer noopener">colors</a>&nbsp;library receives over&nbsp;<a href="https://www.npmjs.com/package/colors" target="_blank" rel="noreferrer noopener">20 million weekly downloads</a>&nbsp;on npm alone and has almost 19,000 projects relying on it. Whereas,&nbsp;<a href="https://www.npmjs.com/package/faker" target="_blank" rel="noreferrer noopener">faker</a>&nbsp;receives over 2.8 million weekly downloads on npm, and has over 2,500 dependents.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":5072,"sizeSlug":"large","linkDestination":"none"} -->
<div class="wp-block-image"><figure class="aligncenter size-large"><img src="https://cdn.clever-cloud.com/uploads/2022/01/faker-liberty-667x337.jpeg" alt="" class="wp-image-5072"/><figcaption>Non-ASCII characters found in the apps logs using the npm library 'color'</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:heading -->
<h2>How to check if your Node.js app is impacted?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The first thing to do is to check if your app is using the npm libraries 'colors' or 'faker'. To do so, run either:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre><code class="lang-shell">
npm ls colors
</code>
</pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Or</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre><code class="lang-shell">
npm ls faker
</code>
</pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>You will get an output like this:</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<pre><code class="lang-shell">
my-project@1.2.3 /home/me/my-project
├─┬ @storybook/addon-docs@5.3.18
│ └─┬ vue-docgen-loader@1.5.0
│   └─┬ jscodeshift@0.7.0
│     └── colors@1.4.0  deduped
├─┬ @storybook/vue@5.3.18
│ └─┬ @storybook/core@5.3.18
│   └─┬ cli-table3@0.5.1
│     └── colors@1.4.0  deduped
└── colors@1.4.0
</code>
</pre>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>With this output, we can identify that this project uses 'colors' directly with version 1.4.0 and through transitive dependencies, also in version 1.4.0.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Your app uses 'colors' or 'faker', what can you do?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If your app uses one of these npm libraries, we invite you to <strong>check three thing</strong>:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Check the version</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>First of all, you need to check if you're using one of the compromised versions of these libraries:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>colors: <code>1.4.1</code>, <code>1.4.2</code>, and <code>1.4.44-liberty-2</code></li><li>faker: <code>6.6.6</code></li></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":3} -->
<h3>Check the package-lock.json</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Do you have a <code>package-lock.json</code>? If you don't we invite you to read <a href="https://docs.npmjs.com/cli/v8/configuring-npm/package-lock-json" target="_blank" rel="noreferrer noopener">the documentation</a> and add one to your project.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you do, you need to force a version which is not compromised (<code>1.4.0</code> for colors and <code>5.5.3</code> for 'faker'). You're using npm? You can try with the module <a href="https://github.com/rogeriochaves/npm-force-resolutions" target="_blank" rel="noreferrer noopener">npm-force-resolutions</a>. You're using Yarn? You can use the process described <a href="https://classic.yarnpkg.com/en/docs/selective-version-resolutions/" target="_blank" rel="noreferrer noopener">in this documentation</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Update your tools to their latest version </h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We also invite you to check if the dependencies you use released an update. As an exemple, if you use <a href="https://storybook.js.org" target="_blank" rel="noreferrer noopener"><strong>Storybook</strong></a>, the <a href="https://github.com/storybookjs/storybook/releases/tag/v6.4.10" target="_blank" rel="noreferrer noopener">v6.4.10</a> released earlier yesterday fixes the issue.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>A note for Clever Tools users</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>By the way, if you use our CLI, the <a href="https://stagingv6.cleverapps.io/doc/reference/clever-tools/" target="_blank" rel="noreferrer noopener">clever-tools</a>, and if you installed it via npm, <strong>please upgrade to v2.8.1</strong>.</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Security update about Log4Shell</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2021/12/13/security-update-about-log4shell/</link>
		
		<dc:creator><![CDATA[Julie Nolot]]></dc:creator>
		<pubDate>Mon, 13 Dec 2021 13:10:32 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://stagingv6.cleverapps.io/?p=4385</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="security_update" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:heading -->
<h2>What is Log4Shell?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You probably heard about Log4Shell (or CVE-2021-44228), the vulnerability which impacted log4j, a famous log library written in Java. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This <strong>critical</strong> vulnerability allows to remotely execute code on the servers of a company or to display the environment variables of an application.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>What has been implemented at Clever Cloud?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>At Clever Cloud, we worked all weekend to resolve this issue.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>All our Elasticsearch add-ons were secured quickly, <s>and many of our customers are secured by the most recent versions of JDK</s>. Edit (13/12 16:41 UTC+1) : Even the most recent versions of Java are now vulnerable to RCE (Remote Code Execution) due to a bypass. <strong>The only viable solution is to patch and update log4j directly.</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Please also note : </p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Java 8 (or later) users should upgrade to release 2.17.0.</li><li>Users requiring Java 7 should upgrade to release 2.12.2.</li><li>Otherwise, remove the JndiLookup class from the classpath in a <a href="https://stagingv6.cleverapps.io/doc/develop/build-hooks/#post-build-cc_post_build_hook" target="_blank" rel="noreferrer noopener">post build hook</a> (you have to execute the hook in the file where the log4j jar is): </li></ul>
<!-- /wp:list -->

<!-- wp:code -->
<pre class="wp-block-code"><code>CC_POST_BUILD_HOOK=zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class "</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>For the others, we have initiated a thorough monitoring and analysis policy.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><s>We are also in the process of updating the Java image with the following <strong>Log4j configuration property</strong>:</s> Edit&nbsp;(14/12&nbsp;14:04 UTC+1) : The Java image has successfully be updated and <strong>all Java applications have been redeployed with the following Log4j</strong> <strong>configuration property</strong>:</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>log4j2.formatMsgNoLookups=true</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>Please note that <strong>this flag only work on versions superior or equal to Log4j v2.10.0.</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We upgraded the <strong>New Relic Java Agent to the 7.4.1 version</strong> and the apps on which the agent was deployed have been redeployed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We also patched the <strong>Pulsar cluster</strong>. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>How to mitigate the risks?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We urge you to <strong>update your dependency to <a href="https://logging.apache.org/log4j/2.x/download.html" target="_blank" rel="noreferrer noopener">Log4j v2.17.0</a></strong>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Then, depending on the environments and add-ons you work with, here's what you can do as well:</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>For Docker</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you are using Docker, you can do either :</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Update to Log4j v2.17.0 (recommended)</li><li>Or setup the following Log4j (<strong>v2.10.0 minimum</strong> only) configuration property: <code>log4j2.formatMsgNoLookups=true</code> </li></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2>For Jenkins</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The Jenkins security team has confirmed that Log4j is not used in Jenkins core. However, it can be used in some Jenkins plugins. You can identify if Log4j is included in a plugin by using the following command in the <a href="https://www.jenkins.io/doc/book/managing/script-console/" target="_blank" rel="noreferrer noopener">Script Console</a>:</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>org.apache.logging.log4j.core.lookup.JndiLookup.class.protectionDomain.codeSource</code></pre>
<!-- /wp:code -->

<!-- wp:heading -->
<h2>Support team</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Of course, our <strong>support team remains available</strong> if you have any question regarding the current situation. You can reach them via the chat or send an e-mail at <strong>support@clever-cloud.com</strong>. </p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="security_update" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update.png 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-300x116.png 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-1024x395.png 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-768x296.png 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2022/01/security-update-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><!-- wp:heading -->
<h2>What is Log4Shell?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You probably heard about Log4Shell (or CVE-2021-44228), the vulnerability which impacted log4j, a famous log library written in Java. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This <strong>critical</strong> vulnerability allows to remotely execute code on the servers of a company or to display the environment variables of an application.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>What has been implemented at Clever Cloud?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>At Clever Cloud, we worked all weekend to resolve this issue.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>All our Elasticsearch add-ons were secured quickly, <s>and many of our customers are secured by the most recent versions of JDK</s>. Edit (13/12 16:41 UTC+1) : Even the most recent versions of Java are now vulnerable to RCE (Remote Code Execution) due to a bypass. <strong>The only viable solution is to patch and update log4j directly.</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Please also note : </p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Java 8 (or later) users should upgrade to release 2.17.0.</li><li>Users requiring Java 7 should upgrade to release 2.12.2.</li><li>Otherwise, remove the JndiLookup class from the classpath in a <a href="https://stagingv6.cleverapps.io/doc/develop/build-hooks/#post-build-cc_post_build_hook" target="_blank" rel="noreferrer noopener">post build hook</a> (you have to execute the hook in the file where the log4j jar is): </li></ul>
<!-- /wp:list -->

<!-- wp:code -->
<pre class="wp-block-code"><code>CC_POST_BUILD_HOOK=zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class "</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>For the others, we have initiated a thorough monitoring and analysis policy.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><s>We are also in the process of updating the Java image with the following <strong>Log4j configuration property</strong>:</s> Edit&nbsp;(14/12&nbsp;14:04 UTC+1) : The Java image has successfully be updated and <strong>all Java applications have been redeployed with the following Log4j</strong> <strong>configuration property</strong>:</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>log4j2.formatMsgNoLookups=true</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>Please note that <strong>this flag only work on versions superior or equal to Log4j v2.10.0.</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We upgraded the <strong>New Relic Java Agent to the 7.4.1 version</strong> and the apps on which the agent was deployed have been redeployed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We also patched the <strong>Pulsar cluster</strong>. </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>How to mitigate the risks?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We urge you to <strong>update your dependency to <a href="https://logging.apache.org/log4j/2.x/download.html" target="_blank" rel="noreferrer noopener">Log4j v2.17.0</a></strong>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Then, depending on the environments and add-ons you work with, here's what you can do as well:</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>For Docker</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you are using Docker, you can do either :</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Update to Log4j v2.17.0 (recommended)</li><li>Or setup the following Log4j (<strong>v2.10.0 minimum</strong> only) configuration property: <code>log4j2.formatMsgNoLookups=true</code> </li></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2>For Jenkins</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The Jenkins security team has confirmed that Log4j is not used in Jenkins core. However, it can be used in some Jenkins plugins. You can identify if Log4j is included in a plugin by using the following command in the <a href="https://www.jenkins.io/doc/book/managing/script-console/" target="_blank" rel="noreferrer noopener">Script Console</a>:</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>org.apache.logging.log4j.core.lookup.JndiLookup.class.protectionDomain.codeSource</code></pre>
<!-- /wp:code -->

<!-- wp:heading -->
<h2>Support team</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Of course, our <strong>support team remains available</strong> if you have any question regarding the current situation. You can reach them via the chat or send an e-mail at <strong>support@clever-cloud.com</strong>. </p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Spectre and Meltdown</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2018/01/04/dealing-with-spectre-and-meltdown/</link>
		
		<dc:creator><![CDATA[Geoffroy Couprie]]></dc:creator>
		<pubDate>Thu, 04 Jan 2018 11:59:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Update]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2018/01/04/dealing-with-spectre-and-meltdown/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/spectre-meltdown-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/spectre-meltdown-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/spectre-meltdown-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/spectre-meltdown-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/spectre-meltdown-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/spectre-meltdown-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>Yesterday two issues affecting CPUs have been released to the public.</p>
<p><strong>TL;DR</strong>: the attacks are named Meltdown and Spectre. They allow reading the memory of the OS or of other processes, to steal secrets or get information for other exploits. A part of the solution can greatly affect performance of running code. In particular, this attack allows to easily cross container boundaries, and in some cases (not our case) even VM boundaries.</p>
<p>In addition to servers, consumer machines are affected, especially through browsers, so you should definitely update your operating system as well as your browsers.</p>
<span id="more-2812"></span>

<h2 id="what-it-means-for-clever-cloud-users">What it means for Clever Cloud users</h2>
<p>Your applications will be (or already have been) automatically restarted (just like any other maintenance deployments). The addons will be patched and restarted in place in the following hours. This will generate limited downtime on addons (usually around a minute, depending on the addon start up time).</p>
<p>In addition to restarting virtual machines, we will also need to restart physical machines, as the attacks theoretically allows VM boundaries crossing. This attack is not usable (yet?) on Clever Cloud due to our virtualization choices and our OS hardening, but we will deploy patches preemptively. Physical machines updates will take place in the following days and will not impact applications. We are currently working on finding the best solution for addons, but it will definitely incur additional downtime for addons.</p>
<p>The patches, while mitigating the issues, also come with performance regressions. It heavily depends on the workload as well as the exact CPU model. The CPUs we use are among the less affected by the performance issues, but a slowdown of at least 5% is to be expected.</p>
<h2 id="technical-details">Technical details</h2>
<p>The Meltdown attack and the Spectre categories of attack are related to a performance feature of modern processors: branch prediction and speculative execution. Meltdown shows that when an instruction can cause a trap, like the privilege check for user → kernel access), the processor will perform speculative execution: it starts executing the code in case there’s no trap, but rollbacks if there was a trap. This attack happens at the boundary between user code and kernel. Before the processor has completely checked that we have the authorization to run privileged code, it starts executing it. When it turns out we were not authorized, it rolls back the results of that code, but not completely, it can leave some data in the cache. Combined with a technique called “cache timing attack”, it is then possible to guess the content of the data that was loaded in cache, bit by bit. Branch prediction has a related behaviour: when encountering a branch (example: an if/else expression), the processor will start executing one of the branches before it calculates the condition, to avoid waiting too much. It guesses which side of the condition is most likely thanks to its branch predictor. Spectre uses branch prediction to cause speculative execution to read out of a buffer’s bounds (among other consequences) in the kernel or another process, then guess the results from the cache.</p>
<p>The Meltdown attack is specific to Intel processors, it allows reading from the OS’s memory. There are patches available (the kPTI feature, also named KAISER <a href="https://lkml.org/lkml/2017/12/4/709">https://lkml.org/lkml/2017/12/4/709</a>). Those patches have a great impact on syscall performance (<a href="https://www.phoronix.com/scan.php?page=article&amp;item=linux-415-x86pti&amp;num=1">https://www.phoronix.com/scan.php?page=article&amp;item=linux-415-x86pti&amp;num=1</a>), with programs running 5% to 30% slower depending on the workload. The Intel Haswell processors with the PCID (Process Context Identifiers) feature get the lowest performance hit (5%). We use those processors on Clever Cloud.</p>
<p>Spectre affects processors from Intel, AMD and ARM, it allows reading from the memory of other processes. It looks more like a new attack category, for which we will have to fix the issue individually in each affected software. The only global solution for Spectre is a radical change in processor architecture, and this is unlikely to happen soon. We will follow closely any new related vulnerability and promptly patch our infrastructure.</p>
<h3 id="for-further-information">For further information</h3>
<ul>
<li>Papers and explanations about Meltdown and Spectre: <a href="https://spectreattack.com/">https://spectreattack.com/</a></li>
<li>Proofs of concept from Google’s Project Zero team: <a href="https://googleprojectzero.blogspot.fr/2018/01/reading-privileged-memory-with-side.html">https://googleprojectzero.blogspot.fr/2018/01/reading-privileged-memory-with-side.html</a></li>
<li>French twitter thread explaining the attacks: <a href="https://twitter.com/fenarinarsa/status/948697105996156928">https://twitter.com/fenarinarsa/status/948697105996156928</a></li>
<li>English twitter thread explaining the attacks: <a href="https://twitter.com/nicoleperlroth/status/948684376249962496">https://twitter.com/nicoleperlroth/status/948684376249962496</a></li>
</ul>
<p>This post has been written by <a href="https://twitter.com/gcouprie">@gcouprie</a> and <a href="https://twitter.com/clementd">@clementd</a>.<br>Spectre and meltdown logos of are designed by <a href="https://vividfox.me">Natascha Eibl</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/spectre-meltdown-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/spectre-meltdown-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/spectre-meltdown-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/spectre-meltdown-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/spectre-meltdown-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/spectre-meltdown-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>Yesterday two issues affecting CPUs have been released to the public.</p>
<p><strong>TL;DR</strong>: the attacks are named Meltdown and Spectre. They allow reading the memory of the OS or of other processes, to steal secrets or get information for other exploits. A part of the solution can greatly affect performance of running code. In particular, this attack allows to easily cross container boundaries, and in some cases (not our case) even VM boundaries.</p>
<p>In addition to servers, consumer machines are affected, especially through browsers, so you should definitely update your operating system as well as your browsers.</p>
<span id="more-2812"></span>

<h2 id="what-it-means-for-clever-cloud-users">What it means for Clever Cloud users</h2>
<p>Your applications will be (or already have been) automatically restarted (just like any other maintenance deployments). The addons will be patched and restarted in place in the following hours. This will generate limited downtime on addons (usually around a minute, depending on the addon start up time).</p>
<p>In addition to restarting virtual machines, we will also need to restart physical machines, as the attacks theoretically allows VM boundaries crossing. This attack is not usable (yet?) on Clever Cloud due to our virtualization choices and our OS hardening, but we will deploy patches preemptively. Physical machines updates will take place in the following days and will not impact applications. We are currently working on finding the best solution for addons, but it will definitely incur additional downtime for addons.</p>
<p>The patches, while mitigating the issues, also come with performance regressions. It heavily depends on the workload as well as the exact CPU model. The CPUs we use are among the less affected by the performance issues, but a slowdown of at least 5% is to be expected.</p>
<h2 id="technical-details">Technical details</h2>
<p>The Meltdown attack and the Spectre categories of attack are related to a performance feature of modern processors: branch prediction and speculative execution. Meltdown shows that when an instruction can cause a trap, like the privilege check for user → kernel access), the processor will perform speculative execution: it starts executing the code in case there’s no trap, but rollbacks if there was a trap. This attack happens at the boundary between user code and kernel. Before the processor has completely checked that we have the authorization to run privileged code, it starts executing it. When it turns out we were not authorized, it rolls back the results of that code, but not completely, it can leave some data in the cache. Combined with a technique called “cache timing attack”, it is then possible to guess the content of the data that was loaded in cache, bit by bit. Branch prediction has a related behaviour: when encountering a branch (example: an if/else expression), the processor will start executing one of the branches before it calculates the condition, to avoid waiting too much. It guesses which side of the condition is most likely thanks to its branch predictor. Spectre uses branch prediction to cause speculative execution to read out of a buffer’s bounds (among other consequences) in the kernel or another process, then guess the results from the cache.</p>
<p>The Meltdown attack is specific to Intel processors, it allows reading from the OS’s memory. There are patches available (the kPTI feature, also named KAISER <a href="https://lkml.org/lkml/2017/12/4/709">https://lkml.org/lkml/2017/12/4/709</a>). Those patches have a great impact on syscall performance (<a href="https://www.phoronix.com/scan.php?page=article&amp;item=linux-415-x86pti&amp;num=1">https://www.phoronix.com/scan.php?page=article&amp;item=linux-415-x86pti&amp;num=1</a>), with programs running 5% to 30% slower depending on the workload. The Intel Haswell processors with the PCID (Process Context Identifiers) feature get the lowest performance hit (5%). We use those processors on Clever Cloud.</p>
<p>Spectre affects processors from Intel, AMD and ARM, it allows reading from the memory of other processes. It looks more like a new attack category, for which we will have to fix the issue individually in each affected software. The only global solution for Spectre is a radical change in processor architecture, and this is unlikely to happen soon. We will follow closely any new related vulnerability and promptly patch our infrastructure.</p>
<h3 id="for-further-information">For further information</h3>
<ul>
<li>Papers and explanations about Meltdown and Spectre: <a href="https://spectreattack.com/">https://spectreattack.com/</a></li>
<li>Proofs of concept from Google’s Project Zero team: <a href="https://googleprojectzero.blogspot.fr/2018/01/reading-privileged-memory-with-side.html">https://googleprojectzero.blogspot.fr/2018/01/reading-privileged-memory-with-side.html</a></li>
<li>French twitter thread explaining the attacks: <a href="https://twitter.com/fenarinarsa/status/948697105996156928">https://twitter.com/fenarinarsa/status/948697105996156928</a></li>
<li>English twitter thread explaining the attacks: <a href="https://twitter.com/nicoleperlroth/status/948684376249962496">https://twitter.com/nicoleperlroth/status/948684376249962496</a></li>
</ul>
<p>This post has been written by <a href="https://twitter.com/gcouprie">@gcouprie</a> and <a href="https://twitter.com/clementd">@clementd</a>.<br>Spectre and meltdown logos of are designed by <a href="https://vividfox.me">Natascha Eibl</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Two-Factor Auth is Here</title>
		<link>https://stagingv6.cleverapps.io/blog/features/2016/08/22/2factor-auth-is-here/</link>
		
		<dc:creator><![CDATA[Clément Nivolle]]></dc:creator>
		<pubDate>Mon, 22 Aug 2016 12:00:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2016/08/22/2factor-auth-is-here/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/2fa-banner-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/2fa-banner-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/2fa-banner-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/2fa-banner-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/2fa-banner-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/2fa-banner-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>As you know, security is a big deal for us. You might have heard that a single password may not be enough those days. Well, here it is! Two factor authentication is now available for everyone.</p>
<span id="more-2868"></span>

<h2 id="what-is-two-factor-and-how-does-it-work">What is two factor? And how does it work?</h2>
<p>When you login with a simple password, you access you account with something you know.</p>
<p>If someone else ever gets your password, your account is compromised. To prevent this situation, the login process should invole something you know, and something you have. This is the second factor.</p>
<p>2FA is pretty simple, once activated you login in with:</p>
<ul>
<li>your credentials</li>
<li>and a third-party app on your phone providing a temporary code</li>
</ul>
<p>Now having your password known/guessed by a third-party is not enough for them to get into your account.</p>
<h2 id="how-to-setup">How to setup?</h2>
<p>Login to the Clever Console and head over to your profile. Under &quot;Authentication&quot;, you&#39;ll see a new button: Activate 2FA.</p>
<p>A QR-Code will show up. Scan it with a 2FA app on your phone (Google Authenticator, Authenticator by Microsoft…)</p>
<p>For future logins, your password and the code from the app will be necessary.</p>
<p><strong>IMPORTANT:</strong></p>
<p>Don&#39;t forget to save your recovery codes! Each one can replace a generated 6-digits code (but only once).</p>
<center>
  <a href="https://console.clever-cloud.com/users/me/authentication" class="bt3-btn bt3-btn-success">Enable 2FA</a>
</center>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/2fa-banner-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/2fa-banner-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/2fa-banner-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/2fa-banner-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/2fa-banner-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/2fa-banner-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>As you know, security is a big deal for us. You might have heard that a single password may not be enough those days. Well, here it is! Two factor authentication is now available for everyone.</p>
<span id="more-2868"></span>

<h2 id="what-is-two-factor-and-how-does-it-work">What is two factor? And how does it work?</h2>
<p>When you login with a simple password, you access you account with something you know.</p>
<p>If someone else ever gets your password, your account is compromised. To prevent this situation, the login process should invole something you know, and something you have. This is the second factor.</p>
<p>2FA is pretty simple, once activated you login in with:</p>
<ul>
<li>your credentials</li>
<li>and a third-party app on your phone providing a temporary code</li>
</ul>
<p>Now having your password known/guessed by a third-party is not enough for them to get into your account.</p>
<h2 id="how-to-setup">How to setup?</h2>
<p>Login to the Clever Console and head over to your profile. Under &quot;Authentication&quot;, you&#39;ll see a new button: Activate 2FA.</p>
<p>A QR-Code will show up. Scan it with a 2FA app on your phone (Google Authenticator, Authenticator by Microsoft…)</p>
<p>For future logins, your password and the code from the app will be necessary.</p>
<p><strong>IMPORTANT:</strong></p>
<p>Don&#39;t forget to save your recovery codes! Each one can replace a generated 6-digits code (but only once).</p>
<center>
  <a href="https://console.clever-cloud.com/users/me/authentication" class="bt3-btn bt3-btn-success">Enable 2FA</a>
</center>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Security is a process, not a reaction</title>
		<link>https://stagingv6.cleverapps.io/blog/company/2016/04/04/security-is-a-process/</link>
		
		<dc:creator><![CDATA[Geoffroy Couprie]]></dc:creator>
		<pubDate>Mon, 04 Apr 2016 15:32:00 +0000</pubDate>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2016/04/04/security-is-a-process/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/security-link-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/security-link-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/security-link-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/security-link-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/security-link-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/security-link-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Wake up. Check the news. There is a new OpenSSL vulnerability, the world is on fire. That vulnerability was published a week ago. Panic. Patch everything in a hurry. Break production. Panic^2.

<span id="more-2746"></span>

If this sounds familiar, you are probably running a web application of some kind. Maybe your whole business depends on it. Maybe you didn't hear about the latest world-on-fire vulnerability. Panic.

How do you keep up with security issues when everything is happening so fast? Which parts of your technical stack are the most at risk? Is the customer data safe? Do you really need to care?

At Clever Cloud, we support many languages and databases, running on hundreds of machines. And our core business is to execute code we didn't write, on our infrastructure.

This has an interesting effect on security management: there is always an issue somewhere. Vulnerabilities appear every day. You are lucky if they are not "0 day vulnerabilities". Those are flaws published without notifying the developers. This means there is no solution available at publication time. How do we handle our security calmly when we should actually run around screaming?

Our approach to security comes from the way we run our systems. You cannot manage hundreds of machines without automation and well defined processes. Every action on our infrastructure must be cheap to perform, or have a great impact.

People see security as a huge cost because of the work it implies:
<ul>
 	<li>unclear risk and impact on the business</li>
 	<li>time spent tracking new vulnerabilities for various applications</li>
 	<li>unclear result of updating code (will it stop working? Will it break other applications on the same machine?)</li>
</ul>
You want to reduce that cost, make security management easier and easier, until it is just a part of a day's job.
<h2 id="defining-your-risk-budget">Defining your risk budget</h2>
Calculating the risk requires some time at first, to teach your team how a threat model works, and how to update it. The threat model is a description of your system used to evaluate the cost of an attack:
<ul>
 	<li>targets: user data, intellectual property, machines</li>
 	<li>entry points: web server, internal WiFi</li>
 	<li>weaknesses: unpatched application, SQL injection, key employees victims of phishing</li>
</ul>
With this model, you calculate the difficulty of exploiting one weakness, which access level you obtain, where you can go from there. At the end, you get a list of issues in your system, ordered by impact on your system and ease of exploitation. Typically, if an automated script can steal your whole database, fix it immediately.

That model is the baseline everybody will use to evaluate security issues. It makes the risk real, not something you can just handwave with saying "we can take that risk". It is something you can plan for and budget for.
<h2 id="staying-up-to-date-with-security-news">Staying up to date with security news</h2>
Once you have a model, you need to keep it up to date with current news. Maybe requiring Java applets in your client's browsers is not such a good idea anymore. Maybe your advertisement network is now serving malware (as a side note, to drastically reduce malware infection at your company, install ad blockers everywhere, trust me on this).

Following security news can look like a daunting task, but you can simplify it with good sources:
<ul>
 	<li>avoid news websites. They write long articles, they want you to panic and they rarely provide usable solutions</li>
 	<li>Follow security mailing lists. There are generalist ones, like <a href="mailto:oss-security@lists.openwall.com">oss-security@lists.openwall.com</a> and <a href="mailto:cve-assign@mitre.org">cve-assign@mitre.org</a>. There are more specific ones, like <a href="mailto:debian-security@lists.debian.org">debian-security@lists.debian.org</a> (translate to your specific distribution), or <a href="mailto:rubyonrails-security@googlegroups.com">rubyonrails-security@googlegroups.com</a> and <a href="mailto:ruby-security-ann@googlegroups.com">ruby-security-ann@googlegroups.com</a>. There is also <a href="mailto:fulldisclosure@seclists.org">fulldisclosure@seclists.org</a>, where 0-day vulnerabilities are sometimes published</li>
 	<li>Twitter is still a good source of information on vulnerabilities, since people easily share. If you see security people suddenly buzzing in your timeline, you should pay attention. There are good lists of people to follow to get you started <a href="http://www.securityinnovationeurope.com/blog/87-security-experts-you-need-to-be-following-on-twitter">here</a> and <a href="http://www.marblesecurity.com/2013/11/20/100-security-experts-follow-twitter/">there</a>. They each have their own focus, though, so you may not be interested in everything</li>
 	<li>keep up with new versions of your software and their dependencies. Use your package manager, project specific mailing lists, subscribe to their github feed</li>
</ul>
Tracking security news becomes a simple process:
<ul>
 	<li>check the mailing lists, see if you use any of the applications mentioned</li>
 	<li>check your dependencies: anything new? Any security issues mentioned?</li>
 	<li>check Twitter: is the world on fire?</li>
</ul>
Be careful, though. Twitter is often on fire, and security experts like to jump on the new vulnerability and dissect it at length. Even when there is no information available. Not every vulnerability needs attention right now, some of them may not even apply to your particular usage of the software. Don't panic (yet).

Taking the time to verify security issues regularly makes security part of your daily/weekly process. Applying a security patch is just another item to raise at your morning stand up meeting (or whatever other process).

Note that the person tracking the vulnerability might not be the one fixing it. When I first learned about the <a href="https://weakdh.org/">Logjam flaw</a>, I was about to enter a plane for 10 hours. Notify the team by SMS/Slack, get an acknowledgment from someone, then go to sleep.
<h2 id="reducing-the-risk-of-code-updates">Reducing the risk of code updates</h2>
Here lies the huge cost of security: any code change in production is a potential liability. It brings no value to the customer, can introduce bugs or even crash the whole system (please make backups and test them regularly).

But this cost is not limited to security. It applies to your whole business. If modifying the production environment is complex and error prone, bugfixes come rarely. New versions come in huge chunks of code that <em>will</em> break things. Huge list of changes may even require some service downtime.

The point of our job at Clever Cloud is to make new deployments fast and painless. It has influenced our whole approaches to security. If you can start and remove a new instance of your application in seconds, you get huge benefits:
<ul>
 	<li>staging environments to test updates</li>
 	<li>replacing huge, risky updates with small increments</li>
 	<li>applications can be completely independent. Updating the company's WordPress blog will not affect the SaaS application</li>
</ul>
This is how we do code updates now: when a project's dependency gets a new version to fix a security issue, just redeploy the application. When there's a security patch for the Linux kernel, apply the patch, redeploy all the virtual machines, move on.
<figure><img id="img" src="https://www2.cleverapps.io/app/uploads/2021/08/redeploy-vm.jpg" /></figure>
We do not run around with our hair on fire. It is just a basic loop of:
<ul>
 	<li>get notified of a vulnerability</li>
 	<li>see if it applies</li>
 	<li>see if there's a patch (or if you can develop one quickly)</li>
 	<li>apply the patch</li>
 	<li>redeploy the applications</li>
 	<li>go make yourself a nice tea</li>
</ul>
We have good examples of this:
<ul>
 	<li>The recent CVE-2016-0728 is a privilege escalation in Linux, something we need to take seriously. We took a look at <a href="http://perception-point.io/2016/01/14/analysis-and-exploitation-of-a-linux-kernel-vulnerability-cve-2016-0728/">the advisory</a>, wrote a patch, tested it and deployed it in a few hours. Most Linux distributions took days to publish updated packages.</li>
 	<li>In the same way, the infamous <a href="http://heartbleed.com/">Heartbleed bug</a> was fixed quickly. One of our clients came to us hours later asking if we knew about it: "oh, that's the reason my applications were redeployed in the middle of the night"</li>
</ul>
When deploying new versions of an application is easy, it suddenly reduces the cost of code changes. The operational risk gets tiny, compared to the security risk. And you can update everything fast. You have no more excuse to keep unpatched systems.

Following those tips to set up your security process will improve your operations as well. With a systematic approach, you know your application better, you can see the cost of managing issues and take action.

There is still a lot to talk about, like training for incidents, defining operations procedures, or how to set up your infrastructure for easy deployments. But that last item, we can handle it for you <a href="https://stagingv6.cleverapps.io/contact/">right now</a>.]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/security-link-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/security-link-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/security-link-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/security-link-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/security-link-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/security-link-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p>Wake up. Check the news. There is a new OpenSSL vulnerability, the world is on fire. That vulnerability was published a week ago. Panic. Patch everything in a hurry. Break production. Panic^2.

<span id="more-2746"></span>

If this sounds familiar, you are probably running a web application of some kind. Maybe your whole business depends on it. Maybe you didn't hear about the latest world-on-fire vulnerability. Panic.

How do you keep up with security issues when everything is happening so fast? Which parts of your technical stack are the most at risk? Is the customer data safe? Do you really need to care?

At Clever Cloud, we support many languages and databases, running on hundreds of machines. And our core business is to execute code we didn't write, on our infrastructure.

This has an interesting effect on security management: there is always an issue somewhere. Vulnerabilities appear every day. You are lucky if they are not "0 day vulnerabilities". Those are flaws published without notifying the developers. This means there is no solution available at publication time. How do we handle our security calmly when we should actually run around screaming?

Our approach to security comes from the way we run our systems. You cannot manage hundreds of machines without automation and well defined processes. Every action on our infrastructure must be cheap to perform, or have a great impact.

People see security as a huge cost because of the work it implies:
<ul>
 	<li>unclear risk and impact on the business</li>
 	<li>time spent tracking new vulnerabilities for various applications</li>
 	<li>unclear result of updating code (will it stop working? Will it break other applications on the same machine?)</li>
</ul>
You want to reduce that cost, make security management easier and easier, until it is just a part of a day's job.
<h2 id="defining-your-risk-budget">Defining your risk budget</h2>
Calculating the risk requires some time at first, to teach your team how a threat model works, and how to update it. The threat model is a description of your system used to evaluate the cost of an attack:
<ul>
 	<li>targets: user data, intellectual property, machines</li>
 	<li>entry points: web server, internal WiFi</li>
 	<li>weaknesses: unpatched application, SQL injection, key employees victims of phishing</li>
</ul>
With this model, you calculate the difficulty of exploiting one weakness, which access level you obtain, where you can go from there. At the end, you get a list of issues in your system, ordered by impact on your system and ease of exploitation. Typically, if an automated script can steal your whole database, fix it immediately.

That model is the baseline everybody will use to evaluate security issues. It makes the risk real, not something you can just handwave with saying "we can take that risk". It is something you can plan for and budget for.
<h2 id="staying-up-to-date-with-security-news">Staying up to date with security news</h2>
Once you have a model, you need to keep it up to date with current news. Maybe requiring Java applets in your client's browsers is not such a good idea anymore. Maybe your advertisement network is now serving malware (as a side note, to drastically reduce malware infection at your company, install ad blockers everywhere, trust me on this).

Following security news can look like a daunting task, but you can simplify it with good sources:
<ul>
 	<li>avoid news websites. They write long articles, they want you to panic and they rarely provide usable solutions</li>
 	<li>Follow security mailing lists. There are generalist ones, like <a href="mailto:oss-security@lists.openwall.com">oss-security@lists.openwall.com</a> and <a href="mailto:cve-assign@mitre.org">cve-assign@mitre.org</a>. There are more specific ones, like <a href="mailto:debian-security@lists.debian.org">debian-security@lists.debian.org</a> (translate to your specific distribution), or <a href="mailto:rubyonrails-security@googlegroups.com">rubyonrails-security@googlegroups.com</a> and <a href="mailto:ruby-security-ann@googlegroups.com">ruby-security-ann@googlegroups.com</a>. There is also <a href="mailto:fulldisclosure@seclists.org">fulldisclosure@seclists.org</a>, where 0-day vulnerabilities are sometimes published</li>
 	<li>Twitter is still a good source of information on vulnerabilities, since people easily share. If you see security people suddenly buzzing in your timeline, you should pay attention. There are good lists of people to follow to get you started <a href="http://www.securityinnovationeurope.com/blog/87-security-experts-you-need-to-be-following-on-twitter">here</a> and <a href="http://www.marblesecurity.com/2013/11/20/100-security-experts-follow-twitter/">there</a>. They each have their own focus, though, so you may not be interested in everything</li>
 	<li>keep up with new versions of your software and their dependencies. Use your package manager, project specific mailing lists, subscribe to their github feed</li>
</ul>
Tracking security news becomes a simple process:
<ul>
 	<li>check the mailing lists, see if you use any of the applications mentioned</li>
 	<li>check your dependencies: anything new? Any security issues mentioned?</li>
 	<li>check Twitter: is the world on fire?</li>
</ul>
Be careful, though. Twitter is often on fire, and security experts like to jump on the new vulnerability and dissect it at length. Even when there is no information available. Not every vulnerability needs attention right now, some of them may not even apply to your particular usage of the software. Don't panic (yet).

Taking the time to verify security issues regularly makes security part of your daily/weekly process. Applying a security patch is just another item to raise at your morning stand up meeting (or whatever other process).

Note that the person tracking the vulnerability might not be the one fixing it. When I first learned about the <a href="https://weakdh.org/">Logjam flaw</a>, I was about to enter a plane for 10 hours. Notify the team by SMS/Slack, get an acknowledgment from someone, then go to sleep.
<h2 id="reducing-the-risk-of-code-updates">Reducing the risk of code updates</h2>
Here lies the huge cost of security: any code change in production is a potential liability. It brings no value to the customer, can introduce bugs or even crash the whole system (please make backups and test them regularly).

But this cost is not limited to security. It applies to your whole business. If modifying the production environment is complex and error prone, bugfixes come rarely. New versions come in huge chunks of code that <em>will</em> break things. Huge list of changes may even require some service downtime.

The point of our job at Clever Cloud is to make new deployments fast and painless. It has influenced our whole approaches to security. If you can start and remove a new instance of your application in seconds, you get huge benefits:
<ul>
 	<li>staging environments to test updates</li>
 	<li>replacing huge, risky updates with small increments</li>
 	<li>applications can be completely independent. Updating the company's WordPress blog will not affect the SaaS application</li>
</ul>
This is how we do code updates now: when a project's dependency gets a new version to fix a security issue, just redeploy the application. When there's a security patch for the Linux kernel, apply the patch, redeploy all the virtual machines, move on.
<figure><img id="img" src="https://www2.cleverapps.io/app/uploads/2021/08/redeploy-vm.jpg" /></figure>
We do not run around with our hair on fire. It is just a basic loop of:
<ul>
 	<li>get notified of a vulnerability</li>
 	<li>see if it applies</li>
 	<li>see if there's a patch (or if you can develop one quickly)</li>
 	<li>apply the patch</li>
 	<li>redeploy the applications</li>
 	<li>go make yourself a nice tea</li>
</ul>
We have good examples of this:
<ul>
 	<li>The recent CVE-2016-0728 is a privilege escalation in Linux, something we need to take seriously. We took a look at <a href="http://perception-point.io/2016/01/14/analysis-and-exploitation-of-a-linux-kernel-vulnerability-cve-2016-0728/">the advisory</a>, wrote a patch, tested it and deployed it in a few hours. Most Linux distributions took days to publish updated packages.</li>
 	<li>In the same way, the infamous <a href="http://heartbleed.com/">Heartbleed bug</a> was fixed quickly. One of our clients came to us hours later asking if we knew about it: "oh, that's the reason my applications were redeployed in the middle of the night"</li>
</ul>
When deploying new versions of an application is easy, it suddenly reduces the cost of code changes. The operational risk gets tiny, compared to the security risk. And you can update everything fast. You have no more excuse to keep unpatched systems.

Following those tips to set up your security process will improve your operations as well. With a systematic approach, you know your application better, you can see the cost of managing issues and take action.

There is still a lot to talk about, like training for incidents, defining operations procedures, or how to set up your infrastructure for easy deployments. But that last item, we can handle it for you <a href="https://stagingv6.cleverapps.io/contact/">right now</a>.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Redirect to HTTPS With Play 2.4</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2015/12/01/redirect-to-https-in-play/</link>
		
		<dc:creator><![CDATA[Julien Durillon]]></dc:creator>
		<pubDate>Tue, 01 Dec 2015 17:55:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Play!Framework]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SSL]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2015/12/01/redirect-to-https-in-play/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/ssl-post-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/ssl-post-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/ssl-post-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/ssl-post-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/ssl-post-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/ssl-post-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>To protect your web app or API, there is almost only one way at this time: TLS. But users and browsers don&#39;t always use TLS by default. So what you want is to redirect them to a TLS encrypted version of your site if they try to connect via plain http.</p>
<span id="more-2803"></span>
<p>Here is how to do it with Play Framework 2.4 in scala:</p>
<h2 id="play-and-http-filters">Play! and HTTP filters</h2>
<p>We will start by creating a &quot;TLSFilter.scala&quot; file and write a TLSFilter class in it:</p>
<pre><code class="language-scala">class TLSFilter extends Filter {
  def apply(nextFilter: RequestHeader =&gt; Future[Result])
    (requestHeader: RequestHeader): Future[Result] = {
      if(!requestHeader.secure)
        Future.successful(Results.MovedPermanently(&quot;https://&quot; + requestHeader.host + requestHeader.uri))
      else
        nextFilter(requestHeader).map(_.withHeaders(&quot;Strict-Transport-Security&quot; -&gt; &quot;max-age=31536000; includeSubDomains&quot;))
  }
}
</code></pre>
<p>This part is easy: we implement the apply function by just checking the <code>secure</code> value of <code>RequestHeader</code>. If the connection is not <em>secure</em>, we need to redirect the client to the same url only with &quot;https&quot; as the protocol. If the connection is <em>secure</em>, we pass the request to the next header. Nothing simpler.</p>
<p>Note that we use <code>requestHeader.host</code> instead of <code>requestHeader.domain</code> because the <code>host</code> value is actually the value of the <code>Host</code> header as set by the client, with optional port and stuff.</p>
<p>Note that we create a <code>Filter</code> implementation and not an <code>EssentialFilter</code> one because we do not care about the body.</p>
<p>Next, you need to create a <code>HttpFilters</code> implementation that will hold the instance of your <code>TLSFilter</code>:</p>
<pre><code class="language-scala">// In TLSFilter.scala
class MyFilters extends HttpFilters {
  val filters = Seq(new TLSFilter)
}
</code></pre>
<p>And finally, you need to tell Play! to use your <code>Filters</code> class:</p>
<pre><code class="language-properties"># In conf/application.conf
play.http.filters=my.package.MyFilters
</code></pre>
<p>Now it will check your requests and permamently redirect the clients to HTTPS.</p>
<p>But, how does Play! know that the request is <em>secure</em>?</p>
<h2 id="reverse-proxies-where-did-the-s-go">Reverse proxies: where did the &#39;s&#39; go?</h2>
<p>Now, we need to ensure that Play! knows to differentiate a secured connection from a plain one. If you configured HTTPS in your application, it&#39;s quite simple to understand. But it is not always the case:</p>
<p>You most probably did <em>not</em>, configure TLS in your application. And <em>that</em> is because <em>you deployed it on a very powerful and developer-friendly PaaS</em>. So, chances are your Play! application is getting requests in plain HTTP, because the TLS encryption ended at the front reverse-proxy that&#39;s piping the request towards your app.</p>
<p>How then is your application going to know that the connection is secured? Enter the non-standard and the standard ways.</p>
<h3 id="x-forwarded-proto">X-Forwarded-Proto</h3>
<p>The first, non-standard but widely used (e.g. at Clever Cloud) way to know if the request handled by the reverse proxy in front came in a secure channel is to check the <code>X-Forwarded-Proto</code> HTTP header. Like all non-standard headers, you can recognize it by the <code>X-</code> at the beginning of the name.</p>
<p>This header describes how the final client is communicating with the reverse-proxy.</p>
<p>It takes two values: <strong>http</strong> and <strong>https</strong>. You can check for that header in your application. But we will see below that Play! can do it by itself.</p>
<h3 id="rfc-2739">RFC 2739</h3>
<p>Also called the <em>Forwarded HTTP Extension</em>, it standardize the way that a proxy tells the final endpoint what is going on between the final client and itself. It&#39;s been published in June 2014.</p>
<p>You can read it here: <a href="https://tools.ietf.org/html/rfc7239">https://tools.ietf.org/html/rfc7239</a>. But the only thing that is relevant for us is the <code>proto</code> parameter. Like <code>X-Forwarded-Proto</code> earlier, its values that interest us are <strong>http</strong> and <strong>https</strong>. Like for the other one, Play! can handle those values for you, if you ask nicely.</p>
<h2 id="how-to-make-play-handle-forwarded-headers">How to make Play! handle Forwarded headers?</h2>
<p>At the time of this writing, Play! framework support for <code>Forwarded</code> headers have known many states:</p>
<ul>
<li>In Play! 1.x, you need to add <code>XForwardedSupport=all</code> in your application.conf</li>
<li>In Play! 2.0 to 2.3, you need to add <code>trustxforwarded=true</code> in your application.conf</li>
</ul>
<p>Both these ways only support the <code>X-Forwarded-Proto</code> header.</p>
<p>Now, in Play! 2.4.x, the philosophy is different:</p>
<ul>
<li>Define the version of the Forwarded header you want to use: <code>play.http.forwarded.version=x-forwarded|rfc7239</code></li>
<li>Set the proxies you trust: <code>play.http.forwarded.trustedProxies=[&quot;proxy_ip1&quot;,&quot;proxy_ip2&quot;,…]</code>.</li>
</ul>
<p>Of course <code>proxy_ipX</code> can be an actual IP or a subnet mask, like &quot;0.0.0.0&quot; or &quot;::&quot; to trust every IPv4 or v6, respectively. Defaults are &quot;127.0.0.1&quot; and &quot;::FF&quot;.</p>
<p>Also, as the <code>X-Forwarded-Proto</code> header is the one that is widely used in the world, the <code>version</code> default value is &quot;x-forwarded&quot;.</p>
<h2 id="what-the-hell-is-strict-transport-security">What the hell is Strict-Transport-Security?</h2>
<p>As you read the filter code, you must have seen that in the case the request is already in HTTPS, we still add a header to the response: <code>Strict-Transport-Security: max-age=31536000</code>.</p>
<p>This is the HTTP Strict Transport Security (HSTS) header. What it does is basically telling the client (most likely a browser): &quot;Next time (and for the next 31536000 seconds), if your user tries to load the unencrypted version of the site, don&#39;t wait for me to redirect you and use https already&quot;.</p>
<p>The browser (meaning: chrome &gt;= 4.0.211.0, firefox &gt;= 4.0, Opera &gt;= 12, IE &gt;= 11) will then save the website and automatically replace &quot;http&quot; by &quot;https&quot; in the requests the next times.</p>
<p>This mechanism is documented here: <a href="https://www.rfc-editor.org/rfc/rfc6797.txt">https://www.rfc-editor.org/rfc/rfc6797.txt</a>.</p>
<p>You <em>MUST</em> set the <code>max-age</code> value. You can also add <code>includeSubDomains</code> (after a &quot;;&quot; of course), which means &quot;if you get that header while requesting domain.com, please use HTTPS when requesting *.domain.com too&quot;. It is a good practice to always add <code>includeSubDomains</code> just in case.</p>
<p>Please note that the STS header can only be set if the website is already TLS protected. You <em>MUST NOT</em> set this header on a non-TLS response.</p>
<p>If you want the browsers to use HSTS before the first request, you can register your domain to be included in browsers <em>preload lists</em>. To achieve that, register your domain here: <a href="https://hstspreload.appspot.com/">https://hstspreload.appspot.com/</a>. Also add the <code>preload</code> value to the header, like that: <code>Strict-Transport-Security: max-age=31536000; preload</code>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/ssl-post-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/ssl-post-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/ssl-post-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/ssl-post-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/ssl-post-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/ssl-post-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>To protect your web app or API, there is almost only one way at this time: TLS. But users and browsers don&#39;t always use TLS by default. So what you want is to redirect them to a TLS encrypted version of your site if they try to connect via plain http.</p>
<span id="more-2803"></span>
<p>Here is how to do it with Play Framework 2.4 in scala:</p>
<h2 id="play-and-http-filters">Play! and HTTP filters</h2>
<p>We will start by creating a &quot;TLSFilter.scala&quot; file and write a TLSFilter class in it:</p>
<pre><code class="language-scala">class TLSFilter extends Filter {
  def apply(nextFilter: RequestHeader =&gt; Future[Result])
    (requestHeader: RequestHeader): Future[Result] = {
      if(!requestHeader.secure)
        Future.successful(Results.MovedPermanently(&quot;https://&quot; + requestHeader.host + requestHeader.uri))
      else
        nextFilter(requestHeader).map(_.withHeaders(&quot;Strict-Transport-Security&quot; -&gt; &quot;max-age=31536000; includeSubDomains&quot;))
  }
}
</code></pre>
<p>This part is easy: we implement the apply function by just checking the <code>secure</code> value of <code>RequestHeader</code>. If the connection is not <em>secure</em>, we need to redirect the client to the same url only with &quot;https&quot; as the protocol. If the connection is <em>secure</em>, we pass the request to the next header. Nothing simpler.</p>
<p>Note that we use <code>requestHeader.host</code> instead of <code>requestHeader.domain</code> because the <code>host</code> value is actually the value of the <code>Host</code> header as set by the client, with optional port and stuff.</p>
<p>Note that we create a <code>Filter</code> implementation and not an <code>EssentialFilter</code> one because we do not care about the body.</p>
<p>Next, you need to create a <code>HttpFilters</code> implementation that will hold the instance of your <code>TLSFilter</code>:</p>
<pre><code class="language-scala">// In TLSFilter.scala
class MyFilters extends HttpFilters {
  val filters = Seq(new TLSFilter)
}
</code></pre>
<p>And finally, you need to tell Play! to use your <code>Filters</code> class:</p>
<pre><code class="language-properties"># In conf/application.conf
play.http.filters=my.package.MyFilters
</code></pre>
<p>Now it will check your requests and permamently redirect the clients to HTTPS.</p>
<p>But, how does Play! know that the request is <em>secure</em>?</p>
<h2 id="reverse-proxies-where-did-the-s-go">Reverse proxies: where did the &#39;s&#39; go?</h2>
<p>Now, we need to ensure that Play! knows to differentiate a secured connection from a plain one. If you configured HTTPS in your application, it&#39;s quite simple to understand. But it is not always the case:</p>
<p>You most probably did <em>not</em>, configure TLS in your application. And <em>that</em> is because <em>you deployed it on a very powerful and developer-friendly PaaS</em>. So, chances are your Play! application is getting requests in plain HTTP, because the TLS encryption ended at the front reverse-proxy that&#39;s piping the request towards your app.</p>
<p>How then is your application going to know that the connection is secured? Enter the non-standard and the standard ways.</p>
<h3 id="x-forwarded-proto">X-Forwarded-Proto</h3>
<p>The first, non-standard but widely used (e.g. at Clever Cloud) way to know if the request handled by the reverse proxy in front came in a secure channel is to check the <code>X-Forwarded-Proto</code> HTTP header. Like all non-standard headers, you can recognize it by the <code>X-</code> at the beginning of the name.</p>
<p>This header describes how the final client is communicating with the reverse-proxy.</p>
<p>It takes two values: <strong>http</strong> and <strong>https</strong>. You can check for that header in your application. But we will see below that Play! can do it by itself.</p>
<h3 id="rfc-2739">RFC 2739</h3>
<p>Also called the <em>Forwarded HTTP Extension</em>, it standardize the way that a proxy tells the final endpoint what is going on between the final client and itself. It&#39;s been published in June 2014.</p>
<p>You can read it here: <a href="https://tools.ietf.org/html/rfc7239">https://tools.ietf.org/html/rfc7239</a>. But the only thing that is relevant for us is the <code>proto</code> parameter. Like <code>X-Forwarded-Proto</code> earlier, its values that interest us are <strong>http</strong> and <strong>https</strong>. Like for the other one, Play! can handle those values for you, if you ask nicely.</p>
<h2 id="how-to-make-play-handle-forwarded-headers">How to make Play! handle Forwarded headers?</h2>
<p>At the time of this writing, Play! framework support for <code>Forwarded</code> headers have known many states:</p>
<ul>
<li>In Play! 1.x, you need to add <code>XForwardedSupport=all</code> in your application.conf</li>
<li>In Play! 2.0 to 2.3, you need to add <code>trustxforwarded=true</code> in your application.conf</li>
</ul>
<p>Both these ways only support the <code>X-Forwarded-Proto</code> header.</p>
<p>Now, in Play! 2.4.x, the philosophy is different:</p>
<ul>
<li>Define the version of the Forwarded header you want to use: <code>play.http.forwarded.version=x-forwarded|rfc7239</code></li>
<li>Set the proxies you trust: <code>play.http.forwarded.trustedProxies=[&quot;proxy_ip1&quot;,&quot;proxy_ip2&quot;,…]</code>.</li>
</ul>
<p>Of course <code>proxy_ipX</code> can be an actual IP or a subnet mask, like &quot;0.0.0.0&quot; or &quot;::&quot; to trust every IPv4 or v6, respectively. Defaults are &quot;127.0.0.1&quot; and &quot;::FF&quot;.</p>
<p>Also, as the <code>X-Forwarded-Proto</code> header is the one that is widely used in the world, the <code>version</code> default value is &quot;x-forwarded&quot;.</p>
<h2 id="what-the-hell-is-strict-transport-security">What the hell is Strict-Transport-Security?</h2>
<p>As you read the filter code, you must have seen that in the case the request is already in HTTPS, we still add a header to the response: <code>Strict-Transport-Security: max-age=31536000</code>.</p>
<p>This is the HTTP Strict Transport Security (HSTS) header. What it does is basically telling the client (most likely a browser): &quot;Next time (and for the next 31536000 seconds), if your user tries to load the unencrypted version of the site, don&#39;t wait for me to redirect you and use https already&quot;.</p>
<p>The browser (meaning: chrome &gt;= 4.0.211.0, firefox &gt;= 4.0, Opera &gt;= 12, IE &gt;= 11) will then save the website and automatically replace &quot;http&quot; by &quot;https&quot; in the requests the next times.</p>
<p>This mechanism is documented here: <a href="https://www.rfc-editor.org/rfc/rfc6797.txt">https://www.rfc-editor.org/rfc/rfc6797.txt</a>.</p>
<p>You <em>MUST</em> set the <code>max-age</code> value. You can also add <code>includeSubDomains</code> (after a &quot;;&quot; of course), which means &quot;if you get that header while requesting domain.com, please use HTTPS when requesting *.domain.com too&quot;. It is a good practice to always add <code>includeSubDomains</code> just in case.</p>
<p>Please note that the STS header can only be set if the website is already TLS protected. You <em>MUST NOT</em> set this header on a non-TLS response.</p>
<p>If you want the browsers to use HSTS before the first request, you can register your domain to be included in browsers <em>preload lists</em>. To achieve that, register your domain here: <a href="https://hstspreload.appspot.com/">https://hstspreload.appspot.com/</a>. Also add the <code>preload</code> value to the header, like that: <code>Strict-Transport-Security: max-age=31536000; preload</code>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>nom 1.0 is here! REJOICE!</title>
		<link>https://stagingv6.cleverapps.io/blog/engineering/2015/11/16/nom-1-0/</link>
		
		<dc:creator><![CDATA[Geoffroy Couprie]]></dc:creator>
		<pubDate>Mon, 16 Nov 2015 14:35:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Rust]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2015/11/16/nom-1-0/</guid>

					<description><![CDATA[<p><img width="2560" height="987" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1.jpg 2560w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1-1536x592.jpg 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1-2048x790.jpg 2048w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1-1368x527.jpg 1368w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></p><p><a href="https://github.com/Geal/nom">nom</a> is a parser combinators library witten in Rust that I started about a year ago. Its goal is to let you write parsers that are safe by default, fast, and abstract all of the dangerous or annoying details of data consumption.</p>
<span id="more-2802"></span>

<p>During that year, more than 50 projects have started using it; from toy parsers to high performance production code. Their feedback has been invaluable to improve the library, include more and more parsing patterns, and test ideas on what makes a great parser library. The 1.0 version is the result of that feedback. More stable version, but also a few breaking changes to improve the architecture, make it more flexible and easier to use. We now feel it is reliable enough to be used in production at Clever Cloud. We have a lot of data to manage, coming from trusted and untrusted sources, and this is exactly the kind of tool we need to build a safe infrastructure.</p>
<p>The quantity of open source projects using nom has been really helpful in developing that stable release. If you maintain one of those projects, you may have received a pull request from me. That&#39;s right: I took care of testing the 1.0 branch on every project I could get my hands on, to see what would break, which features developers were using, and document the upgrade process. This has been a lot of work, but worth it. I&#39;ll probably tell more about that in a future blog post, for other library maintainers that want to try the approach.</p>
<p>That&#39;s all good, but why would you use nom right now? Let&#39;s see!</p>
<p>nom is fast. How fast? A few <a href="https://github.com/Geal/nom_benchmarks">benchmarks</a> have shown that it is consistently faster than Parsec and attoparsec (Haskell parser combinator libraries), faster than other Rust parser combinator libraries, and even <a href="https://github.com/hoodie/dateparser_benchmarks/blob/3d76de5edc11ddcb98446bcd2b66e64a87652705/README.md">faster than Rust&#39;s regular expression library</a>. There is even a benchmark where it beats Joyent&#39;s <a href="https://github.com/nodejs/http-parser">http-parser</a> on parsing HTTP request headers.</p>
<p>Why is it faster? I have a few ideas about this. First, unlike most parser combinators systems, nom does not copy data if it is not needed. It uses the slice heavily, a Rust data structure containing a pointer and a length. Since Rust&#39;s compiler manages memory correctly, you can afford to refer to the original input from the beginning to the end of the parser, without copying anything.</p>
<p>Second, nom does not chain parsers at runtime. The macros directly generate the parsing code at compile time. This creates very linear code, something that CPUs find very easy to handle. If you tried to decompile the final binary to C code, you would just see a long list of if-else branches.</p>
<p>It is also a safe alternative to handwritten C parsers. nom bases its memory safety on Rust&#39;s compiler: it knows, at any moment, which part of the code owns which part of the memory, prevents out of bound accesses, automatically manages memory allocation and deallocation. And since that is not enough, some nom parsers were fuzzed to hell with <a href="http://lcamtuf.coredump.cx/afl/">American Fuzzy Lop</a>, just to verify those claims.</p>
<p>The result? The only flaws that were found appeared, not in nom generated code, but in code written manually outside of nom: index calculations that could overflow if a specific value appeared in the input. And those could not result in memory corruption, just crashes.</p>
<blockquote>
<p>you can quickly write a parser that will be safe by default</p>
</blockquote>
<p>This has awesome implications: you can quickly write a parser that will be safe by default. This lets you test ideas, experiment with your design, without fear for your security.</p>
<p>You should now see where I&#39;m going: with parsers that are easy to write, as fast or faster than handwritten C, and safe by default; you can replace old and vulnerable C parsers. Rust can work without a runtime, and is easily embedded in C code. It has already been used to write extensions for Ruby, Python, NodeJS and others. It is only a matter of time until it replaces the vulnerable parts of current C projects.</p>
<p>This is one of my long term goals: making reliable, safe building blocks to build our systems. Not only new bricks, but also replacing the old ones. This will require a tremendous effort, and nom is just the first step, but a big one.</p>
<p>To get started using nom, you can include it in your Rust projects from <a href="https://crates.io/crates/nom">crates.io</a>. Here are a few links you will find useful:</p>
<ul>
<li><a href="https://github.com/Geal/nom">Github repository Geal/nom</a></li>
<li><a href="http://rust.unhandledexpression.com/nom/">Reference documentation</a></li>
<li><a href="https://github.com/Geal/nom/wiki/Upgrading-to-nom-1.0">Upgrading to nom 1.0</a></li>
<li><a href="https://gitter.im/Geal/nom">Gitter chat room</a>. You can also go to the #nom IRC
channel on irc.mozilla.org, or ping &#39;geal&#39; on Mozilla, Freenode, Geeknode or oftc IRC</li>
<li><a href="https://fnordig.de/2015/07/16/omnomnom-parsing-iso8601-dates-using-nom/">Tutorial about parsing ISO8601 dates</a></li>
<li><a href="https://github.com/Geal/nom/wiki/Making-a-new-parser-from-scratch">Making a new parser from scratch</a>
(general tips on writing a parser and code architecture)</li>
<li><a href="https://github.com/Geal/nom/wiki/Error-management">How to handle parser errors</a></li>
<li><a href="https://github.com/Geal/nom/wiki/How-nom-macros-work">How nom&#39;s macro combinators work</a></li>
</ul>
<p>Also, if you have existing code running older versions of nom, please take a look at the <a href="https://github.com/Geal/nom/wiki/Upgrading-to-nom-1.0">upgrade documentation</a></p>
]]></description>
										<content:encoded><![CDATA[<p><img width="2560" height="987" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1.jpg 2560w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1-1536x592.jpg 1536w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1-2048x790.jpg 2048w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/nom10-scaled-1-1368x527.jpg 1368w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></p><p><a href="https://github.com/Geal/nom">nom</a> is a parser combinators library witten in Rust that I started about a year ago. Its goal is to let you write parsers that are safe by default, fast, and abstract all of the dangerous or annoying details of data consumption.</p>
<span id="more-2802"></span>

<p>During that year, more than 50 projects have started using it; from toy parsers to high performance production code. Their feedback has been invaluable to improve the library, include more and more parsing patterns, and test ideas on what makes a great parser library. The 1.0 version is the result of that feedback. More stable version, but also a few breaking changes to improve the architecture, make it more flexible and easier to use. We now feel it is reliable enough to be used in production at Clever Cloud. We have a lot of data to manage, coming from trusted and untrusted sources, and this is exactly the kind of tool we need to build a safe infrastructure.</p>
<p>The quantity of open source projects using nom has been really helpful in developing that stable release. If you maintain one of those projects, you may have received a pull request from me. That&#39;s right: I took care of testing the 1.0 branch on every project I could get my hands on, to see what would break, which features developers were using, and document the upgrade process. This has been a lot of work, but worth it. I&#39;ll probably tell more about that in a future blog post, for other library maintainers that want to try the approach.</p>
<p>That&#39;s all good, but why would you use nom right now? Let&#39;s see!</p>
<p>nom is fast. How fast? A few <a href="https://github.com/Geal/nom_benchmarks">benchmarks</a> have shown that it is consistently faster than Parsec and attoparsec (Haskell parser combinator libraries), faster than other Rust parser combinator libraries, and even <a href="https://github.com/hoodie/dateparser_benchmarks/blob/3d76de5edc11ddcb98446bcd2b66e64a87652705/README.md">faster than Rust&#39;s regular expression library</a>. There is even a benchmark where it beats Joyent&#39;s <a href="https://github.com/nodejs/http-parser">http-parser</a> on parsing HTTP request headers.</p>
<p>Why is it faster? I have a few ideas about this. First, unlike most parser combinators systems, nom does not copy data if it is not needed. It uses the slice heavily, a Rust data structure containing a pointer and a length. Since Rust&#39;s compiler manages memory correctly, you can afford to refer to the original input from the beginning to the end of the parser, without copying anything.</p>
<p>Second, nom does not chain parsers at runtime. The macros directly generate the parsing code at compile time. This creates very linear code, something that CPUs find very easy to handle. If you tried to decompile the final binary to C code, you would just see a long list of if-else branches.</p>
<p>It is also a safe alternative to handwritten C parsers. nom bases its memory safety on Rust&#39;s compiler: it knows, at any moment, which part of the code owns which part of the memory, prevents out of bound accesses, automatically manages memory allocation and deallocation. And since that is not enough, some nom parsers were fuzzed to hell with <a href="http://lcamtuf.coredump.cx/afl/">American Fuzzy Lop</a>, just to verify those claims.</p>
<p>The result? The only flaws that were found appeared, not in nom generated code, but in code written manually outside of nom: index calculations that could overflow if a specific value appeared in the input. And those could not result in memory corruption, just crashes.</p>
<blockquote>
<p>you can quickly write a parser that will be safe by default</p>
</blockquote>
<p>This has awesome implications: you can quickly write a parser that will be safe by default. This lets you test ideas, experiment with your design, without fear for your security.</p>
<p>You should now see where I&#39;m going: with parsers that are easy to write, as fast or faster than handwritten C, and safe by default; you can replace old and vulnerable C parsers. Rust can work without a runtime, and is easily embedded in C code. It has already been used to write extensions for Ruby, Python, NodeJS and others. It is only a matter of time until it replaces the vulnerable parts of current C projects.</p>
<p>This is one of my long term goals: making reliable, safe building blocks to build our systems. Not only new bricks, but also replacing the old ones. This will require a tremendous effort, and nom is just the first step, but a big one.</p>
<p>To get started using nom, you can include it in your Rust projects from <a href="https://crates.io/crates/nom">crates.io</a>. Here are a few links you will find useful:</p>
<ul>
<li><a href="https://github.com/Geal/nom">Github repository Geal/nom</a></li>
<li><a href="http://rust.unhandledexpression.com/nom/">Reference documentation</a></li>
<li><a href="https://github.com/Geal/nom/wiki/Upgrading-to-nom-1.0">Upgrading to nom 1.0</a></li>
<li><a href="https://gitter.im/Geal/nom">Gitter chat room</a>. You can also go to the #nom IRC
channel on irc.mozilla.org, or ping &#39;geal&#39; on Mozilla, Freenode, Geeknode or oftc IRC</li>
<li><a href="https://fnordig.de/2015/07/16/omnomnom-parsing-iso8601-dates-using-nom/">Tutorial about parsing ISO8601 dates</a></li>
<li><a href="https://github.com/Geal/nom/wiki/Making-a-new-parser-from-scratch">Making a new parser from scratch</a>
(general tips on writing a parser and code architecture)</li>
<li><a href="https://github.com/Geal/nom/wiki/Error-management">How to handle parser errors</a></li>
<li><a href="https://github.com/Geal/nom/wiki/How-nom-macros-work">How nom&#39;s macro combinators work</a></li>
</ul>
<p>Also, if you have existing code running older versions of nom, please take a look at the <a href="https://github.com/Geal/nom/wiki/Upgrading-to-nom-1.0">upgrade documentation</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The End of the Fortress Metaphor</title>
		<link>https://stagingv6.cleverapps.io/blog/guests/2015/06/16/the-end-of-the-fortress-metaphor/</link>
					<comments>https://stagingv6.cleverapps.io/blog/guests/2015/06/16/the-end-of-the-fortress-metaphor/#comments</comments>
		
		<dc:creator><![CDATA[Geoffroy Couprie]]></dc:creator>
		<pubDate>Tue, 16 Jun 2015 14:04:00 +0000</pubDate>
				<category><![CDATA[Guests]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2015/06/16/the-end-of-the-fortress-metaphor/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/fortress-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/fortress-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/fortress-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/fortress-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/fortress-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/fortress-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><em><a href="https://twitter.com/gcouprie">Geoffroy Couprie</a> is a consultant in software security and an independent developer. He teaches development teams how to write safe software.</em>

This is the most seducing approach in IT security. This is also the worst. For more than 20 years now, people have believed that their network was a fortress, protected from the outside world by firewalls, NAT and DMZ. This idea is obsolete, we must change now.

<span id="more-2992"></span>

20 years ago, it was still possible to see internal networks totally open, with every machine directly addressable from Internet. There were enough IPv4 addresses for everybody, the networks were small, life was good. But the security was atrocious: TCP stacks were remotely exploitable, worms were reproducing on corporate networks, internal file servers were publicly available, so people found the easiest way to secure everything on the cheap: isolate the network from the outside world. There's nothing wrong with that approach: it made sense at the time.

As usual when someone finds a small, temporary hack instead of fixing everything, people kept improving it, approaching the local optimum. This led to firewalls on every machine, every network. People discovered that NAT could hide IP addresses, instead of simply allowing IP reuse, and thought it was a security feature. All of the nonsense about DMZ and airgapped networks appeared. Companies were actually selling hardware which would get packets from one network, disconnect (physically) from it, connect to another network, then send the packets. <a href="http://www.infoworld.com/article/2655459/networking/hack-tales--air-gap-networking-for-the-price-of-a-pair-of-sneakers.html">Airgap, yup</a>.

It worked for a time, since a lot of exploits in the 90s focused on remote exploits in operating systems and servers. If you cannot exploit the public face of the network, everything is alright.
<blockquote>The attacker is only one wrong click on a lovingly crafted PDF file away from your network.</blockquote>
<figure><img id="img" class="gif" src="https://cdn.clever-cloud.com/uploads/2021/08/montypython-play.jpg" width="340" />
<figcaption>Sysadmin taunting hackers</figcaption></figure>
Unfortunately, we cannot think that way anymore. Web applications give too much entry points to your servers. Pivoting from a DMZ server to the internal network is easy, since internal users will also access those web applications. The attacker is only one wrong click on a lovingly crafted PDF file away from your network. Why would you concentrate on firewall rules when phishing is so effective?

Once the attacker is in your network, it is over. Listen to traffic, elevate your privilege, pivot to another machine, impersonate users, traverse the whole network...
<figure><img id="img" src="https://cdn.clever-cloud.com/uploads/2021/08/citadelle.jpg" width="340" />
<figcaption>Traditional IT infrastructure</figcaption></figure>
The fortress metaphor, where everything behind your firewall is safe and trusted, is dead. Your walls are useful, but not that much when the attacker can get insiders to help him, willingly or unknowingly.

<strong>The goal is not to keep the attacker out of your system. It is to detect the threat, isolate it, find the attacker's path and heal the system.</strong> The attacker may have been in your network for months. How would you be sure he is not there anymore?

There is a much better metaphor than the fortress, now. Think of your system as a city. The city can have walls, but to function properly, it should let people enter and get out. You cannot know precisely if everything in your city is legit. Chances are, someone uses his personal USB key. Someone else connected a WiFi router in his office. People are talking on Facebook, watching porn, using forbidden applications, like modern browsers. You will not be able to catch them, unless repression is your main tool, and this will not help them work. You want to reduce criminality in your city, but you will not eradicate it. You cannot prevent fires, but you can prevent them from spreading too far and too fast.

If you imagine the attacker as already present on your network, you go from plugging holes in one wall, to verifying dependencies and access control between systems. The trusted network approach is flawed, you have to think in terms of authorization from one user/app/machine to the other. The attacker will explore your network from one node to the next connected one, from one access level to the upper one, and try to combine them. <a href="http://blogs.technet.com/b/johnla/archive/2015/04/26/defenders-think-in-lists-attackers-think-in-graphs-as-long-as-this-is-true-attackers-win.aspx">Defenders think in lists, attackers think in graphs</a>. You must <a href="http://blogs.wsj.com/cio/2015/05/11/google-moves-its-corporate-applications-to-the-internet/">assume that the internal network is as dangerous as the Internet</a>.
<blockquote>Assuming that servers will be safer if they are on your own network leads to a false sense of security.</blockquote>
This is also why the nonsense around private cloud has to die. Assuming that servers will be safer on your own network leads to a false sense of security. A system built from scratch to handle the worst of internet has a better chance to survive. What matters is access control granularity around data, users and applications. The network is not a security boundary anymore.

<script type="text/javascript"><br />
  $(function(){<br />
    var image = new Image();<br />
    image.src ='https://cdn.clever-cloud.com/uploads/2021/08/montypython.gif';<br />
    var imageStoped = new Image();<br />
    imageStoped.src ='https://cdn.clever-cloud.com/uploads/2021/08/montypython-play.jpg';<br />
    $('#img.gif').click(function(){<br />
      if ($(this).hasClass('playing')) {<br />
        $(this).removeClass('playing');<br />
        $(this).attr('src',imageStoped.src);<br />
      }<br />
      else {<br />
        $(this).attr('src',image.src);<br />
        $(this).addClass('playing');<br />
      };<br />
    });<br />
});<br />
</script>]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/fortress-1.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/fortress-1.jpg 1400w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/fortress-1-300x116.jpg 300w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/fortress-1-1024x395.jpg 1024w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/fortress-1-768x296.jpg 768w, https://staging-cc-assetsv6.cellar-c2.services.clever-cloud.com/uploads/2021/08/fortress-1-1368x528.jpg 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><em><a href="https://twitter.com/gcouprie">Geoffroy Couprie</a> is a consultant in software security and an independent developer. He teaches development teams how to write safe software.</em>

This is the most seducing approach in IT security. This is also the worst. For more than 20 years now, people have believed that their network was a fortress, protected from the outside world by firewalls, NAT and DMZ. This idea is obsolete, we must change now.

<span id="more-2992"></span>

20 years ago, it was still possible to see internal networks totally open, with every machine directly addressable from Internet. There were enough IPv4 addresses for everybody, the networks were small, life was good. But the security was atrocious: TCP stacks were remotely exploitable, worms were reproducing on corporate networks, internal file servers were publicly available, so people found the easiest way to secure everything on the cheap: isolate the network from the outside world. There's nothing wrong with that approach: it made sense at the time.

As usual when someone finds a small, temporary hack instead of fixing everything, people kept improving it, approaching the local optimum. This led to firewalls on every machine, every network. People discovered that NAT could hide IP addresses, instead of simply allowing IP reuse, and thought it was a security feature. All of the nonsense about DMZ and airgapped networks appeared. Companies were actually selling hardware which would get packets from one network, disconnect (physically) from it, connect to another network, then send the packets. <a href="http://www.infoworld.com/article/2655459/networking/hack-tales--air-gap-networking-for-the-price-of-a-pair-of-sneakers.html">Airgap, yup</a>.

It worked for a time, since a lot of exploits in the 90s focused on remote exploits in operating systems and servers. If you cannot exploit the public face of the network, everything is alright.
<blockquote>The attacker is only one wrong click on a lovingly crafted PDF file away from your network.</blockquote>
<figure><img id="img" class="gif" src="https://cdn.clever-cloud.com/uploads/2021/08/montypython-play.jpg" width="340" />
<figcaption>Sysadmin taunting hackers</figcaption></figure>
Unfortunately, we cannot think that way anymore. Web applications give too much entry points to your servers. Pivoting from a DMZ server to the internal network is easy, since internal users will also access those web applications. The attacker is only one wrong click on a lovingly crafted PDF file away from your network. Why would you concentrate on firewall rules when phishing is so effective?

Once the attacker is in your network, it is over. Listen to traffic, elevate your privilege, pivot to another machine, impersonate users, traverse the whole network...
<figure><img id="img" src="https://cdn.clever-cloud.com/uploads/2021/08/citadelle.jpg" width="340" />
<figcaption>Traditional IT infrastructure</figcaption></figure>
The fortress metaphor, where everything behind your firewall is safe and trusted, is dead. Your walls are useful, but not that much when the attacker can get insiders to help him, willingly or unknowingly.

<strong>The goal is not to keep the attacker out of your system. It is to detect the threat, isolate it, find the attacker's path and heal the system.</strong> The attacker may have been in your network for months. How would you be sure he is not there anymore?

There is a much better metaphor than the fortress, now. Think of your system as a city. The city can have walls, but to function properly, it should let people enter and get out. You cannot know precisely if everything in your city is legit. Chances are, someone uses his personal USB key. Someone else connected a WiFi router in his office. People are talking on Facebook, watching porn, using forbidden applications, like modern browsers. You will not be able to catch them, unless repression is your main tool, and this will not help them work. You want to reduce criminality in your city, but you will not eradicate it. You cannot prevent fires, but you can prevent them from spreading too far and too fast.

If you imagine the attacker as already present on your network, you go from plugging holes in one wall, to verifying dependencies and access control between systems. The trusted network approach is flawed, you have to think in terms of authorization from one user/app/machine to the other. The attacker will explore your network from one node to the next connected one, from one access level to the upper one, and try to combine them. <a href="http://blogs.technet.com/b/johnla/archive/2015/04/26/defenders-think-in-lists-attackers-think-in-graphs-as-long-as-this-is-true-attackers-win.aspx">Defenders think in lists, attackers think in graphs</a>. You must <a href="http://blogs.wsj.com/cio/2015/05/11/google-moves-its-corporate-applications-to-the-internet/">assume that the internal network is as dangerous as the Internet</a>.
<blockquote>Assuming that servers will be safer if they are on your own network leads to a false sense of security.</blockquote>
This is also why the nonsense around private cloud has to die. Assuming that servers will be safer on your own network leads to a false sense of security. A system built from scratch to handle the worst of internet has a better chance to survive. What matters is access control granularity around data, users and applications. The network is not a security boundary anymore.

<script type="text/javascript"><br />
  $(function(){<br />
    var image = new Image();<br />
    image.src ='https://cdn.clever-cloud.com/uploads/2021/08/montypython.gif';<br />
    var imageStoped = new Image();<br />
    imageStoped.src ='https://cdn.clever-cloud.com/uploads/2021/08/montypython-play.jpg';<br />
    $('#img.gif').click(function(){<br />
      if ($(this).hasClass('playing')) {<br />
        $(this).removeClass('playing');<br />
        $(this).attr('src',imageStoped.src);<br />
      }<br />
      else {<br />
        $(this).attr('src',image.src);<br />
        $(this).addClass('playing');<br />
      };<br />
    });<br />
});<br />
</script>]]></content:encoded>
					
					<wfw:commentRss>https://stagingv6.cleverapps.io/blog/guests/2015/06/16/the-end-of-the-fortress-metaphor/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
