<?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: Alex Macniven</title>
    <description>The latest articles on DEV Community by Alex Macniven (@alexmacniven).</description>
    <link>https://dev.to/alexmacniven</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%2F36156%2F977a9a2b-7186-4503-9f1a-af2e2def06f9.jpeg</url>
      <title>DEV Community: Alex Macniven</title>
      <link>https://dev.to/alexmacniven</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alexmacniven"/>
    <language>en</language>
    <item>
      <title>What's your favourite server naming convention?</title>
      <dc:creator>Alex Macniven</dc:creator>
      <pubDate>Tue, 16 Jun 2020 09:46:59 +0000</pubDate>
      <link>https://dev.to/alexmacniven/what-s-your-favourite-server-naming-convention-390h</link>
      <guid>https://dev.to/alexmacniven/what-s-your-favourite-server-naming-convention-390h</guid>
      <description>&lt;p&gt;I headed back into the office yesterday for the first time since lockdown began here in the UK. I was tasked with building a few servers for our local network that is needing a bit of love.&lt;/p&gt;

&lt;p&gt;We still have a few legacy servers that are named after characters from the Flintstones cartoon.&lt;/p&gt;

&lt;p&gt;So I was wondering; what's the best server naming conventions you have seen or are using?&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>Shushi - Minimalist Secrets Management in Python</title>
      <dc:creator>Alex Macniven</dc:creator>
      <pubDate>Mon, 06 Apr 2020 18:48:06 +0000</pubDate>
      <link>https://dev.to/alexmacniven/shushi-minimalist-secrets-management-in-python-2lkg</link>
      <guid>https://dev.to/alexmacniven/shushi-minimalist-secrets-management-in-python-2lkg</guid>
      <description>&lt;p&gt;A lot of the work I produce as a 9-5 developer lives in private repositories. Given the unprecedented times we are all currently experiencing I wanted to take the opportunity to port some of my work into open source repositories.&lt;/p&gt;




&lt;h1&gt;
  
  
  Problem
&lt;/h1&gt;

&lt;p&gt;When I'd create applications in python I'd create a &lt;code&gt;config.json&lt;/code&gt; to store credentials and other sensitive assets needed by the application.&lt;/p&gt;

&lt;p&gt;This posed 2 problems for me;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Credentials are spread across multiple &lt;code&gt;config.json&lt;/code&gt; files&lt;/li&gt;
&lt;li&gt;Generally, the &lt;code&gt;config.json&lt;/code&gt; files are in plan-text&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Solution
&lt;/h1&gt;

&lt;p&gt;As a result I built &lt;a href="https://github.com/alexmacniven/shushi"&gt;shushi&lt;/a&gt;, &lt;em&gt;minimalist secrets management in Python.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;How does shushi address the above?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Credentials are stored in a single &lt;code&gt;vault&lt;/code&gt; file&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;vault&lt;/code&gt; file is encrypted using &lt;a href="https://cryptography.io/en/latest/"&gt;cryptography&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Shushi comes complete with...
&lt;/h2&gt;

&lt;p&gt;A CLI developed using &lt;a href="https://click.palletsprojects.com/"&gt;click&lt;/a&gt;;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; shushi -p [password] get twitter
name = twitter
user = alexmacniven
password = secret_password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Access to the back-end functionality;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;shushi&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;shushi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="s"&gt;"twitter"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;VaultRecord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"twitter"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"alexmacniven"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"secret_password"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Unit tests written with &lt;a href="https://docs.pytest.org/en/latest/"&gt;pytest&lt;/a&gt; in mind;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; pytest
============================= test session starts =============================
platform win32 -- Python 3.8.2, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: ~\Code\shushi
plugins: mock-2.0.0
collected 25 items

tests\test_api.py ..                                                     [  8%]
tests\test_core.py ..............                                        [ 64%]
tests\test_crpyto.py ........                                            [ 96%]
tests\test_record.py .                                                   [100%]

============================= 25 passed in 1.24s ==============================
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Contributions are welcomed using &lt;a href="https://github.com/alexmacniven/shushi/issues"&gt;Github issues&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Psst this is my first dev.to post&lt;/em&gt; 🥳&lt;/p&gt;

</description>
      <category>python</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
