<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gavin Uhma</title>
    <description>The latest articles on DEV Community by Gavin Uhma (@gavinuhma).</description>
    <link>https://dev.to/gavinuhma</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F937281%2F5cac1067-62af-40af-ace2-9ace18672271.jpeg</url>
      <title>DEV Community: Gavin Uhma</title>
      <link>https://dev.to/gavinuhma</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gavinuhma"/>
    <language>en</language>
    <item>
      <title>When is data encrypted in your app?</title>
      <dc:creator>Gavin Uhma</dc:creator>
      <pubDate>Tue, 08 Nov 2022 17:15:07 +0000</pubDate>
      <link>https://dev.to/gavinuhma/when-is-data-encrypted-in-your-app-2jho</link>
      <guid>https://dev.to/gavinuhma/when-is-data-encrypted-in-your-app-2jho</guid>
      <description>&lt;p&gt;I’m curious, at what point in your app do you encrypt data? Do you ever encrypt it explicitly? Or do you rely on things like at-rest encryption within your database, and TLS over the network?&lt;/p&gt;

&lt;p&gt;Do you do your own key management or rely on a key management service like Vault or from a cloud provider? How do you control access to the keys?&lt;/p&gt;

&lt;p&gt;Which encryption libraries do you use? Which protocols (AES, RSA, etc)?&lt;/p&gt;

&lt;p&gt;Do you use keys for anything else like JWTs or data signing and verification, SSH etc?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>security</category>
      <category>keymanagement</category>
      <category>encryption</category>
    </item>
    <item>
      <title>Introducing Nitrogen: Deploy Web Servers and Databases to AWS Nitro Enclaves</title>
      <dc:creator>Gavin Uhma</dc:creator>
      <pubDate>Fri, 28 Oct 2022 18:21:16 +0000</pubDate>
      <link>https://dev.to/gavinuhma/introducing-nitrogen-deploy-web-servers-and-databases-to-aws-nitro-enclaves-45k9</link>
      <guid>https://dev.to/gavinuhma/introducing-nitrogen-deploy-web-servers-and-databases-to-aws-nitro-enclaves-45k9</guid>
      <description>&lt;p&gt;&lt;em&gt;TL;DR: &lt;a href="https://github.com/capeprivacy/nitrogen"&gt;Nitrogen&lt;/a&gt; is a tool for deploying web servers, databases, and other services to AWS Nitro Enclaves. Given a Dockerfile, Nitrogen will spin up an EC2 instance, configure external networking, and build and deploy your web service. What you get back is a hostname and port that's ready to use. Nitrogen is &lt;a href="https://github.com/capeprivacy/nitrogen"&gt;fully open source&lt;/a&gt; and comes with &lt;strong&gt;pre-built scripts for popular services like Redis, and Nginx&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For example, to deploy Nginx, first install Nitrogen:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/capeprivacy/nitrogen/main/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clone the examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone git@github.com:capeprivacy/nitrogen.git
&lt;span class="nb"&gt;cd &lt;/span&gt;nitrogen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note: An AWS account is required. If you have AWS cli configured you can &lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-where"&gt;retrieve your credentials&lt;/a&gt; with &lt;code&gt;cat ~/.aws/credentials&lt;/code&gt;. See &lt;a href="https://github.com/capeprivacy/nitrogen#troubleshooting"&gt;troubleshooting&lt;/a&gt; if your AWS account uses MFA&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;AWS_ACCESS_KEY_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;YOUR ACCESS KEY&amp;gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;AWS_SECRET_ACCESS_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;YOUR SECRET&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then setup, build, and deploy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nitrogen setup my-nginx-enclave ~/.ssh/id_rsa.pub
nitrogen build ./examples/nginx
nitrogen deploy my-nginx-enclave ~/.ssh/id_rsa
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it! &lt;strong&gt;You have a Nitro Enclave running Nginx&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl http://ec2-34-56-789-0.compute-1.amazonaws.com:5000
&lt;span class="c"&gt;# Hello World!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How Nitrogen Works
&lt;/h2&gt;

&lt;p&gt;A Nitro Enclave can run &lt;em&gt;almost&lt;/em&gt; anything that a regular EC2 instance can, but typically you need do a lot of work. A Nitro Enclave is an isolated VM carved out of an EC2 instance by the Nitro Hypervisor. By default, it has no network, no disk, and no shell access. (Even a root user has no access!) These constraints are core security features, but you need to open things up a little in order to run your application. (A complete blackbox would have no effect on the outside world!) To understand this complexity, see &lt;a href="https://dev.to/bendecoste/running-an-http-server-with-aws-nitro-enclaves-elo"&gt;Running an HTTP Server with AWS Nitro Enclaves&lt;/a&gt; by &lt;a class="mentioned-user" href="https://dev.to/bendecoste"&gt;@bendecoste&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nitrogen makes working with Nitro Enclaves super easy&lt;/strong&gt;. Let's walk through the example of deploying Nginx with Nitrogen in more detail...&lt;/p&gt;

&lt;h3&gt;
  
  
  Launch a Nitro Enclave Capable EC2 Instance
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# nitrogen setup &amp;lt;name&amp;gt; &amp;lt;public_key&amp;gt;&lt;/span&gt;
nitrogen setup my-nginx-enclave ~/.ssh/id_rsa.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;nitrogen setup&lt;/code&gt; uses CloudFormation to spawn an EC2 instance, and configure networking like SSH. You can now SSH into the EC2 instance if you want, but you don't need to. Nitrogen defaults to &lt;code&gt;m5a.xlarge&lt;/code&gt; EC2 instance type but you can also specify &lt;code&gt;--instance-type &amp;lt;any-enclave-enabled-instance-type&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Build an Enclave Image File (EIF) from a Dockerfile
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# nitrogen build &amp;lt;dockerfile-directory&amp;gt;&lt;/span&gt;
nitrogen build ./examples/nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;nitrogen build&lt;/code&gt; will first build a docker image from the Dockerfile you specify, and then convert it to an Enclave Image File and save it locally.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploy an EIF to a Nitro Enclave
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# nitrogen deploy &amp;lt;name&amp;gt; &amp;lt;private_key&amp;gt;&lt;/span&gt;
nitrogen deploy my-nginx-enclave ~/.ssh/id_rsa
&lt;span class="c"&gt;# Listening: ec2-34-56-789-0.compute-1.amazonaws.com:5000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;nitrogen deploy&lt;/code&gt; will upload the EIF to the EC2 instance and launch it into the Nitro Enclave.&lt;/p&gt;

&lt;p&gt;And that's it! Nginx is now setup and running on an AWS Nitro Enclave and we can &lt;code&gt;curl&lt;/code&gt; the server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://ec2-34-56-789-0.compute-1.amazonaws.com:5000
&lt;span class="c"&gt;# Hello World!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What's Next for Nitrogen?
&lt;/h2&gt;

&lt;p&gt;In a follow up post we'll walkthrough how Nitrogen works under the hood. And we'll share more details about the roadmap.&lt;/p&gt;

&lt;p&gt;For now, you can &lt;code&gt;curl -fsSL https://raw.githubusercontent.com/capeprivacy/nitrogen/main/install.sh | sh&lt;/code&gt; and start using it. We'd love to hear what you think in the comments below. &lt;a href="https://github.com/capeprivacy/nitrogen/"&gt;Please star Nitrogen on GitHub&lt;/a&gt;, and come chat on &lt;a href="https://discord.gg/nQW7YxUYjh"&gt;Discord&lt;/a&gt;. Thanks!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>aws</category>
      <category>nitroenclaves</category>
      <category>security</category>
    </item>
  </channel>
</rss>
