Skip to content

Instantly share code, notes, and snippets.

@joemiller
Created June 25, 2019 14:54
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save joemiller/c26b1092a3d58ef09f5c65c692edbe6a to your computer and use it in GitHub Desktop.

test plan:

scenarios:

  1. vanilla
  2. with forked keyring lib

steps:

  • keychain
    • record stdout/stderr + exit code:
      • aws-vault list
      • aws-vault add
      • aws-vault remove
  • pass
    • scenarios:
      • uninitialized pass environment (ie: 'pass init' not executed)
      • initialized pass environment
    • record stdout/stderr + exit code:
      • aws-vault list
      • aws-vault add
      • aws-vault remove
  • wincred
    • record stdout/stderr + exit code:
      • aws-vault list
      • aws-vault add
      • aws-vault remove
  • secret-service
    • record stdout/stderr + exit code:
      • aws-vault list
      • aws-vault add
      • aws-vault remove

keychain

# keychain
$ aws-vault --backend=keychain --keychain="aws-vault-test" list
aws-vault: error: No such keychain (-25294)
# (exit: 1)

$ aws-vault --backend=keychain --keychain="aws-vault-test" add test1
Added credentials to profile "test1" in vault
# (exit: 0)

$ aws-vault --backend=keychain --keychain="aws-vault-test" list
Profile                  Credentials              Sessions                 
=======                  ===========              ========                 
test1                    test1                    -                        
# (exit: 0)

$ aws-vault --backend=keychain --keychain="aws-vault-test" remove test1
Deleted credentials.
Deleted 0 sessions.
# (exit: 0)

$ aws-vault --backend=keychain --keychain="aws-vault-test" list
Profile                  Credentials              Sessions                 
=======                  ===========              ========                 
aws-vault: error: No credentials found
# (exit: 1)

pass

Before running 'pass init '

$ aws-vault --backend=pass --pass-dir=./tmppass list
Profile                  Credentials              Sessions                 
=======                  ===========              ========                 
aws-vault: error: No credentials found
# (exit: 1)

$ aws-vault --backend=pass --pass-dir=./tmppass add test1
Enter Access Key ID: foo
Enter Secret Access Key: bar
Error: You must run:
    pass init your-gpg-id
before you may use the password store.

aws-vault: error: exit status 1
# (exit: 1)

After running 'pass init'

$ aws-vault --backend=pass --pass-prefix="aws-vault-test" list
Profile                  Credentials              Sessions                 
=======                  ===========              ========                 
aws-vault: error: No credentials found
# (exit: 1)

$ aws-vault --backend=pass --pass-prefix="aws-vault-test" add test1
Added credentials to profile "test1" in vault
# (exit: 0)

$ aws-vault --backend=pass --pass-prefix="aws-vault-test" list
Profile                  Credentials              Sessions                 
=======                  ===========              ========                 
test1                    test1                    -                        
# (exit: 0)

$ aws-vault --backend=pass --pass-prefix="aws-vault-test" remove test1
Deleted credentials.
Deleted 0 sessions.
# (exit: 0)

$ aws-vault --backend=pass --pass-prefix="aws-vault-test" list
Profile                  Credentials              Sessions                 
=======                  ===========              ========                 
aws-vault: error: No credentials found
# (exit: 1)

secret-service

$ aws-vault --backend=secret-service list
aws-vault: error: The collection "awsvault" does not exist. Please add a key first
# (exit: 1)

$ aws-vault --backend=secret-service add test1
Added credentials to profile "test1" in vault
# (exit: 0)

$ aws-vault --backend=secret-service list
Profile                  Credentials              Sessions                 
=======                  ===========              ========                 
test1                    test1                    - 
# (exit: 0)

$ aws-vault --backend=secret-service remove test1
Deleted credentials.
Deleted 0 sessions.
# (exit: 0)

$ aws-vault --backend=secret-service list
Profile                  Credentials              Sessions                 
=======                  ===========              ========                 
test1                    -                        -                        
aws-vault: error: No credentials found
# (exit: 1)

wincred

$ aws-vault --backend=wincred list
Profile                  Credentials              Sessions
=======                  ===========              ========
aws-vault: error: No credentials found
# (exit: 1)

$ aws-vault --backend=wincred add test1
Added credentials to profile "test1" in vault
# (exit: 0)

$ aws-vault --backend=wincred list
Profile                  Credentials              Sessions
=======                  ===========              ========
test1                    test1                    -
# (exit: 0)

$ aws-vault --backend=wincred remove test1
Deleted credentials.
Deleted 0 sessions.
# (exit: 0)

$ aws-vault --backend=wincred list
Profile                  Credentials              Sessions
=======                  ===========              ========
test1                    -                        -
aws-vault: error: No credentials found
# (exit: 1)

test plan:

scenarios:

  1. vanilla
  2. with forked keyring lib

steps:

  • keychain
    • record stdout/stderr + exit code:
      • aws-vault list
      • aws-vault add
      • aws-vault remove
  • pass
    • scenarios:
      • uninitialized pass environment (ie: 'pass init' not executed)
      • initialized pass environment
    • record stdout/stderr + exit code:
      • aws-vault list
      • aws-vault add
      • aws-vault remove
  • wincred
    • record stdout/stderr + exit code:
      • aws-vault list
      • aws-vault add
      • aws-vault remove
  • secret-service
    • record stdout/stderr + exit code:
      • aws-vault list
      • aws-vault add
      • aws-vault remove

keychain

# keychain
$ aws-vault --backend=keychain --keychain="aws-vault-test" list
aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

$ aws-vault --backend=keychain --keychain="aws-vault-test" add test1
Added credentials to profile "test1" in vault
# (exit: 0)

$ aws-vault --backend=keychain --keychain="aws-vault-test" list
Profile                  Credentials              Sessions                 
=======                  ===========              ========                 
test1                    test1                    -                        
# (exit: 0)

$ aws-vault --backend=keychain --keychain="aws-vault-test" remove test1
Deleted credentials.
aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

$ aws-vault --backend=keychain --keychain="aws-vault-test" list
aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

pass

Before running 'pass init '

$ aws-vault --backend=pass --pass-dir=./tmppass list
aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

$ aws-vault --backend=pass --pass-dir=./tmppass add test1
Enter Access Key ID: foo
Enter Secret Access Key: bar
Error: You must run:
    pass init your-gpg-id
before you may use the password store.

aws-vault: error: exit status 1
# (exit: 1)

After running 'pass init'

$ aws-vault --backend=pass --pass-prefix="aws-vault-test" list
aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

$ aws-vault --backend=pass --pass-prefix="aws-vault-test" add test1
Added credentials to profile "test1" in vault
# (exit: 0)

$ aws-vault --backend=pass --pass-prefix="aws-vault-test" list
Profile                  Credentials              Sessions                 
=======                  ===========              ========                 
test1                    test1                    -                        
# (exit: 0)

$ aws-vault --backend=pass --pass-prefix="aws-vault-test" remove test1
Deleted credentials.
aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

$ aws-vault --backend=pass --pass-prefix="aws-vault-test" list
aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

secret-service

$ aws-vault --backend=secret-service list
aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

$ aws-vault --backend=secret-service add test1
Added credentials to profile "test1" in vault
# (exit: 0)

$ aws-vault --backend=secret-service list
Profile                  Credentials              Sessions                 
=======                  ===========              ========                 
test1                    test1                    - 
# (exit: 0)

$ aws-vault --backend=secret-service remove test1
Deleted credentials.
Deleted 0 sessions.
# (exit: 0)

$ aws-vault --backend=secret-service list
Profile                  Credentials              Sessions                 
=======                  ===========              ========                 
test1                    -                        -                        
aws-vault: error: No credentials found
# (exit: 1)

wincred

$ aws-vault --backend=wincred list
aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

$ aws-vault --backend=wincred add test1
Added credentials to profile "test1" in vault
# (exit: 0)

$ aws-vault --backend=wincred list
Profile                  Credentials              Sessions
=======                  ===========              ========
test1                    test1                    -
# (exit: 0)

$ aws-vault --backend=wincred remove test1
Deleted credentials.
aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

$ aws-vault --backend=wincred list
aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)
--- JOE-NOTES.md	2019-06-25 07:44:18.000000000 -0700
+++ JOE-NOTES-fork.md	2019-06-25 07:45:06.000000000 -0700
@@ -37,7 +37,7 @@
 ```sh
 # keychain
 $ aws-vault --backend=keychain --keychain="aws-vault-test" list
-aws-vault: error: No such keychain (-25294)
+aws-vault: error: The specified item could not be found in the keyring
 # (exit: 1)
 
 $ aws-vault --backend=keychain --keychain="aws-vault-test" add test1
@@ -52,13 +52,11 @@
 
 $ aws-vault --backend=keychain --keychain="aws-vault-test" remove test1
 Deleted credentials.
-Deleted 0 sessions.
-# (exit: 0)
+aws-vault: error: The specified item could not be found in the keyring
+# (exit: 1)
 
 $ aws-vault --backend=keychain --keychain="aws-vault-test" list
-Profile                  Credentials              Sessions                 
-=======                  ===========              ========                 
-aws-vault: error: No credentials found
+aws-vault: error: The specified item could not be found in the keyring
 # (exit: 1)

@@ -69,9 +67,7 @@

$ aws-vault --backend=pass --pass-dir=./tmppass list
-Profile                  Credentials              Sessions                 
-=======                  ===========              ========                 
-aws-vault: error: No credentials found
+aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

$ aws-vault --backend=pass --pass-dir=./tmppass add test1
@@ -89,9 +85,7 @@

```sh
$ aws-vault --backend=pass --pass-prefix="aws-vault-test" list
-Profile                  Credentials              Sessions                 
-=======                  ===========              ========                 
-aws-vault: error: No credentials found
+aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

$ aws-vault --backend=pass --pass-prefix="aws-vault-test" add test1
@@ -106,13 +100,11 @@

$ aws-vault --backend=pass --pass-prefix="aws-vault-test" remove test1
Deleted credentials.
-Deleted 0 sessions.
-# (exit: 0)
+aws-vault: error: The specified item could not be found in the keyring
+# (exit: 1)

$ aws-vault --backend=pass --pass-prefix="aws-vault-test" list
-Profile                  Credentials              Sessions                 
-=======                  ===========              ========                 
-aws-vault: error: No credentials found
+aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

@@ -122,7 +114,7 @@

$ aws-vault --backend=secret-service list
-aws-vault: error: The collection "awsvault" does not exist. Please add a key first
+aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

$ aws-vault --backend=secret-service add test1
@@ -153,9 +145,7 @@

```sh
$ aws-vault --backend=wincred list
-Profile                  Credentials              Sessions
-=======                  ===========              ========
-aws-vault: error: No credentials found
+aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

$ aws-vault --backend=wincred add test1
@@ -170,13 +160,10 @@

$ aws-vault --backend=wincred remove test1
Deleted credentials.
-Deleted 0 sessions.
-# (exit: 0)
+aws-vault: error: The specified item could not be found in the keyring
+# (exit: 1)

$ aws-vault --backend=wincred list
-Profile                  Credentials              Sessions
-=======                  ===========              ========
-test1                    -                        -
-aws-vault: error: No credentials found
+aws-vault: error: The specified item could not be found in the keyring
# (exit: 1)

\ No newline at end of file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment