Skip to content

Releases: arcanericky/totp

v1.1.2

24 Mar 13:01
9a75d16
Compare
Choose a tag to compare

Release 1.1.2

User Facing Changes

  • Enable go install github.com/arcanericky/totp@latestthanks to @ryan-yalo

Internal Updates

  • Update setup-go GitHub Action version
  • DRY the Makefile thanks to @ryan-yalo

v1.1.1

20 Mar 14:57
d81cf99
Compare
Choose a tag to compare

Release 1.1.1

User Facing Updates

There is now a release binary for Darwin ARM64 thanks to @brig.

Internal Updates

  • Build with Go 1.20
  • Update various dependencies
  • Refine dependabot
  • Upgrade some build tools

v1.1.0

09 Jul 18:09
Compare
Choose a tag to compare

Release 1.1.0

There are many user facing and internal updates in this release which means there may be a few defects. Please file on issue or submit a PR with a correction while falling back to version 1.0.9 until they are resolved. If you don't report a defect, it probably won't get fixed.

User Facing Updates

Command Line Autocompletion

Autocompletion for secret names has now been enabled thanks to a submission by @alfstorm. To use this, generate the autocompletion script using the totp completion command, then configure your shell with it. When running totp from the command line, type the first few letters of the desired seed name and hit tab to attempt the autocomplete. Execute totp completion --help and see the README for more information.

QR Code Generation

Generate a QR code for Google Authenticator and other apps using the --qrcode option. To generate a QR code using an entry in your configuration use totp --qrcode <secret name>. To generate a QR code using a secret not in your configuration use totp --qrcode --secret <secret value> <secret name>. This is an initial implementation so it's probably rough around the edges. Examples:

totp --qrcode google
totp --qrcode --secret NV4XGZLDOJSXICQ google

Customize Configuration File Location

The usage of the TOTP_CONFIG environment variable has been added to customize the location of the secrets collection file.

User Confirmation on Reset and Delete (possibly a breaking change for you)

Get user confirmation for the config reset and config delete commands if the --yes option is not given.

Sorted Secret Names

The names of the secrets are now sorted when using config list.

Hiding of Secrets when using config list

The use of config list no longer defaults to also showing secrets (it's a security thing). To see the secrets you must now use config list --all.

Config Completion Command Has Been Moved (possibly a breaking change for you)

The config completion command has been removed and the completion command should be used instead. This also makes completion a reserved command and you can no longer name a secret completion.

Various Internal Updates

There are many internal changes, and while a test script (scripts/totp-test.sh) has been introduced to exercise the primary functionality, stuff happens. If an issue is identified, file an issue and/or submit a PR with the correction.

  • Eliminate use of init() and global Cobra command variables
  • Script for automated user testing added to workflow (scripts/totp-test.sh)
  • Update Cobra dependency from v1.2.1 to v1.5.0
  • Remove deprecated ioutil usage
  • Export API errors for API users
    • ErrSecretNotFound, ErrNoFilename, ErrSecretNameEmpty, ErrSecretValueEmpty
  • Improve error branching and code flow
  • Add the ls and l aliases to the config list command
  • Document command aliases in README
  • Improve unit tests for the base collection API
  • Improve error handling
  • Update some GitHub Actions
  • Introduce golangci-lint to the workflow

v1.0.9

29 Mar 12:47
Compare
Choose a tag to compare

Build with Go 1.18

v1.0.8

02 Nov 20:47
Compare
Choose a tag to compare
  • Add Linux ARM binaries
  • Build with Go 1.17.2

Thank you @pugmarx.

v1.0.7

12 Aug 23:04
8153a99
Compare
Choose a tag to compare
  • Build with Go 1.16.7
  • Update dependencies
    • pquerna/otp v1.3.0
    • spf13/cobra v1.2.1
  • GitHub Actions for test builds
  • GoReleaser for releases
  • Unit tests pass using Windows
  • Fix defect closing file after collection load

v1.0.6

11 Oct 00:29
v1.0.6
cb0a98e
Compare
Choose a tag to compare

Build with Go 1.13.1

1.0.5

26 Jul 13:50
1.0.5
72a6c26
Compare
Choose a tag to compare

This release offers support for continuous output using the --follow flag.

With continuous output, a new code is generated on the minute and half-minute, then output to the terminal This is similar to the continuously updating codes you may be accustomed to in the apps on your mobile device.

$ totp --follow mysecretname
322240
872373
395948

This feature is also compatible with the --time, --forward, and --backward flags.

$ totp --follow --time 2019-06-01T20:00:00-05:00 --backward 1h --forward 30m mysecretname
292801
741368
414478

1.0.4

07 Jun 01:36
3491778
Compare
Choose a tag to compare

TOTP now has a Time Machine

totp now has the --time, --forward, and --backward options that are used to manipulate the time for which the TOTP code is generated.

The --time option takes an RFC3339 formatted time string as its argument and uses it to generate the TOTP code. Note that the --forward and --backward options will modify this option value.

Examples with --time:

$ date '+%FT%T%:z'
2019-06-01T19:58:47-05:00
$ totp --time $(date '+%FT%T%:z') --secret seed
931665
$ totp --time 2019-06-01T20:00:00-05:00 --secret seed
526171

The --forward and --backward options move the current time forward and backward by their duration formatted arguments. See Go's time.ParseDuration() documentation for more details on this format.

Examples with --forward and --backward

$ totp --time 2019-06-01T20:00:00-05:00 --backward 3m --secret seed
222296
$ totp --time 2019-06-01T20:00:00-05:00 --forward 30s --secret seed
820148

1.0.3

05 Jun 22:44
2ab44c2
Compare
Choose a tag to compare

Support for Standard I/O

The code generation (ex. totp secretname) and totp config list commands now support loading a collection of secrets with standard input. The totp config update, totp config delete, and totp config rename commands supporting loading a collection of secrets with standard input and sending the modified collection of secrets to standard output. Use the --stdio option to specify this.

See the README for more details, but the highlights are below.

This gives you the ability to roll your own encryption if you don't like storing your secrets in cleartext.

A contrived example for doing this with GnuPG follows.

Create an encrypted collection

totp config add --stdio secretname myvalue < /dev/null | \
  gpg --batch --yes --passphrase mypassphrase --output totp-collection.gpg --symmetric

View the collection

gpg --quiet --batch --passphrase mypassphrase --decrypt totp-collection.gpg | \
  totp config list --stdio

Add another secret

gpg --quiet --batch --passphrase mypassphrase --decrypt totp-collection.gpg | \
  totp config add  --stdio newname newvalue | \
  gpg --batch --yes --passphrase mypassphrase --output totp-collection.gpg --symmetric

View the modified collection

gpg --quiet --batch --passphrase mypassphrase --decrypt totp-collection.gpg | \
  totp config list --stdio

Generate a TOTP code

gpg --quiet --batch --passphrase mypassphrase --decrypt totp-collection.gpg | totp --stdio secretname