In some of my microcontroller testing code, I find it necessary to save things so that if I make a mistake, I can go back to a previously known-good configuration.

On a microcontroller, it's not as simple as grabbing a password/passphrase from an environment variable or file from disk, so until I get all of my code working, I set up temporary wifi/other-comms channels and embed the creds within the source (and subsequently save to Github (insert other online repo location if necessary)).

I understand completely how this is insecure, but throughout testing, I one-off my communication channel names, and flick out passphrases for them, then when I go to prod for real, I write code that will write to EEPROM, save the prod connection info, then go from there.

For me, if you're in my area (unlikely), you might bite on one of my SB5, SB9, SB66, SBx (etc) wifi (or 433MHz RF) networks, which is routed to a null VLAN, so my case is an easy one; I don't care about creds.

In the real world, if you *must* have creds in your source files (even initially), how do you deal with it?

Do you mask creds each push to your repo (prone to forgetting)? Do you set up temporary and fake comm channels until you go to production? Or do you first create the back-end compilation and storage of your creds somewhere else that isn't in a repo?

The last question in that last paragraph was loaded... even if you store creds to disk or otherwise, you *still* have to store them somehow... how do you maintain the code that does this within your Distributed Version Control System?

This might all seem like a smartass thing, but I've been fighting with committing/pushing code with passphrases and not, and the difference is that my efficiency goes downhill if I decide not to include them. I find myself without the commits to backtrack to after a major mistake because I haven't committed in some time, due to 'fear'.

Sick of banging my head due to lack of committing because of this nonsense. What do you do?


In reply to Passwords/passphrases in your Distributed Version Control System by stevieb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.