You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-15Lines changed: 32 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ This will download the github 0.1.0 binary release for mac, and move any of your
14
14
keyfob add [name] [key]
15
15
keyfob otp [name]
16
16
keyfob list
17
+
keyfob vault [name] [profile]
17
18
keyfob help
18
19
19
20
+`keyfob add name` adds a new key to the keyfob keychain with the given name. It
@@ -29,7 +30,9 @@ clipboard.
29
30
30
31
+`keyfob list` prints the names of all the added keys, if any.
31
32
32
-
The time-based authentication codes are derived from a hash of the
33
+
+`keyfob vault [name] [profile]` acts as a will act as an [AWS credential helper](https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#sourcing-credentials-from-external-processes) using [AWS Vault](https://github.com/99designs/aws-vault/) and a One Time Password.
34
+
35
+
The Time-based One Time Password (TOTP) authentication codes are derived from a hash of the
33
36
key and the current time, so it is important that the system clock have at
34
37
least one-minute accuracy.
35
38
@@ -51,9 +54,10 @@ Then whenever GitHub prompts for a 2FA code, run keyfob to obtain one:
51
54
$ keyfob otp github
52
55
268346
53
56
54
-
## Derivation
57
+
## Derivation (Credit where Credit is due)
55
58
56
59
This is just a little toy cobbled together from [2fa](https://github.com/rsc/2fa/), [cobra](https://github.com/spf13/cobra), and [go-keyring](https://github.com/zalando/go-keyring) and using [goreleaser](https://github.com/goreleaser/goreleaser).
60
+
The directions I had below this were confusing, so I stole some of the directions from [this article on how to do a similar thing with a yubikey](https://hackernoon.com/use-a-yubikey-as-a-mfa-device-to-replace-google-authenticator-b4f4c0215f2).
57
61
58
62
## Really, does this make sense?
59
63
@@ -91,37 +95,50 @@ keyring frontend program [Seahorse](https://wiki.gnome.org/Apps/Seahorse):
91
95
92
96
This assumes you have installed `keyfob` but need to set up your secrets.
93
97
94
-
Your own organization __*might*__ have a different preferred `source_profile` name from `sosourcey` below.
98
+
__*Note:*__Your own organization __*might*__ have a different preferred `source_profile` name from `source` below, and your AWS account number is probably not `111111111111`.
95
99
96
100
1. Skip to **[2](#2)** if you already added your AWS access key and secret access key to aws vault. Otherwise do this:
97
101
```
98
-
$ aws-vault add sosourcey --keychain login
102
+
$ brew cask install aws-vault
103
+
$ brew install go zbar awscli
104
+
$ aws-vault add source --keychain login
99
105
```
100
-
2. <aname="2"></a>Go to AWS, and [make a new MFA token](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_virtual.html#enable-virt-mfa-for-iam-user). Either take a screenshot of the QR Code (⌘⇧3 aka Command-Shift-3) and run `zbarimg` on it as below, or click the option to see the text version. Save that secret somewhere. Also add it to your Google Authenticator as normal.
106
+
107
+
2. <aname="2"></a>Go to the AWS Web console to [make a new MFA token](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_virtual.html#enable-virt-mfa-for-iam-user).
108
+
109
+
3. After login, go to IAM > Users and click in your user name. Then you need to click on the “Security credentials” tab.
0 commit comments