Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70421

Re: [OT] Testing and credentials best practices?

References <267e12d3-ea01-4886-bfa7-5c7270adbe92@googlegroups.com>
Date 2014-04-21 02:45 +1000
Subject Re: [OT] Testing and credentials best practices?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.9382.1398012333.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, Apr 21, 2014 at 2:36 AM, Miki Tebeka <miki.tebeka@gmail.com> wrote:
> How do you deal with tests (both on dev machine and Jenkins) that need credentials (such as AWS keys)?. I know of the following methods:
>
> 1. Test user with known (stored in source control) limited credentials
> 2. ~/.secrets (or any other known location) RC file which is not in source control
> 3. Credentials service (such as ZooKeeper) accessed only from VPN
> 4. Credentials pre user encrypted (gpg) and stored in source control

I've done several of these. Another option that may work in some
contexts is to mock the test altogether; have a server that simulates
whatever you needed credentials for, and accepts a key of all zeroes
or equivalent. Obviously that key can happily go into the source code
:)

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[OT] Testing and credentials best practices? Miki Tebeka <miki.tebeka@gmail.com> - 2014-04-20 09:36 -0700
  Re: [OT] Testing and credentials best practices? Chris Angelico <rosuav@gmail.com> - 2014-04-21 02:45 +1000
    Re: [OT] Testing and credentials best practices? Miki Tebeka <miki.tebeka@gmail.com> - 2014-04-21 12:03 -0700
  Re: [OT] Testing and credentials best practices? Roy Smith <roy@panix.com> - 2014-04-20 14:32 -0700

csiph-web