| Age | Commit message (Collapse) | Author |
|
=== Breaking changes
* all: make the path to private key static
Instead of prompting user, make the private key static, located at
"$XDG_CONFIG_DIR/gotp/gotp.key".
If the key exist, the issuer will be encrypted.
=== Enhancements
* all: ask for passphrase when removing or renaming label
Even though "rename" command does not read the encrypted secret, as long
as the private key is in use, it should ask for passphrase.
The remove operation allow only the one that know the private key can
modify the issuer.
* _sys: fix the bash completion installation directory
In POSIX system, the correct installation for bash completion script
should be /usr/share/bash-completion not under /etc directory.
|
|
|
|
|
|
In POSIX system, the correct installation for bash completion
script should be /usr/share/bash-completion not under /etc
directory.
|
|
Even though rename does not read the encrypted secret, as long as the
private key is in use, it should ask for passphrase.
The remove operation allow only the one that know the private key can
modify the issuer.
|
|
The lib/crypto.LoadPrivateKeyInteractive provides a simple way to read
passphrase from stdin that also support SSH_ASKPASS.
While at it, add test for Cli with passphrase.
|
|
If the label or rawConfig is empty, return an error immediately.
|
|
Check for valid provider name and parse the imported file
before loading private key.
|
|
Instead of prompting user, make the private key static, located at
"$XDG_CONFIG_DIR/gotp/gotp.key".
Implements: https://todo.sr.ht/~shulhan/gotp/1
|
|
|
|
=== New features
* all: implement command "get"
The "get" command get and print the issuer by its LABEL.
This will print the issuer secret, unencrypted.
=== Enhancements
* all: unfold private key path before reading
By unfolding, user can set the path to private key using "~" that points
to their home.
This make the key can works across home directory, in case user have
multiple homes (Linux and macOS have different home path and maybe
user name, but both can use "~" as substitution for $HOME)
* Makefile: add task to install and uninstall gotp in macOS
|
|
|
|
|
|
|
|
The "get" command get and print the issuer by its LABEL.
This will print the issuer secret, unencrypted.
|
|
Previously, the configuration directory initialized inside NewCli.
This changes we make the NewCli accept the config directory so we can
changes it during testing.
|
|
We use revive [1], fieldalignment [2], and shadow [3] as linters.
[1] https://github.com/mgechev/revive
[2] https://pkg.go.dev/golang.org/x/tools@v0.13.0/go/analysis/passes/fieldalignment/cmd/fieldalignment
[3] https://pkg.go.dev/golang.org/x/tools@v0.13.0/go/analysis/passes/shadow/cmd/shadow
|
|
The "lib/crypto" DecryptAoep and EncryptAoep support large message.
|
|
By unfolding, user can set the path to private key using "~" that points
to their home.
This make the key can works across home directory, in case user have
multiple homes (Linux and macOS have different home path and maybe
user name, but both can use "~" as substitution for $HOME)
|
|
=== Bug fix
* all: load private key only when needed
In case the configuration use private key with passphrase, the bash
completion will hang due to the command ask for passphrase.
This changes fix this issue by loading private key only when doing add,
generate, import, or remote-private-key.
|
|
In case the configuration use private key with passphrase, the bash
completion will hang due to the command ask for passphrase.
This changes fix this issue by loading private key only when doing add,
generate, import, or remote-private-key.
|
|
=== New features
* all: add command to remove the private key
* all: add command to set private key
=== Chores
* all: update Go version to 1.19 and all dependencies
|
|
The remove-private-key decrypt the issuer's value back using previous
private key and store it back to file as plain text.
|
|
The set-private-key command encrypt the issuer's value (hash:secret...)
in the file using private key.
The supported private key is RSA.
|
|
If the file is not set, do nothing.
|
|
The MarshalText convert the config object back to INI format.
|
|
|
|
This changes require the loadPrivateKey method detached from Cli and
become function.
|
|
The loadConfig load the configuration from raw bytes.
This replace part of newConfig with loadConfig to minimize duplicate.
The idea of loadConfig is to simplify testing later.
|
|
Use the constant Version instead, no need to automate this.
While at it, fix the test coverage HTML output file name.
|
|
|
|
I use two remote repositories: GitHub and SourceHut.
GitHub support rendering README using asciidoc while SourceHut not.
This cause the repository that use README.adoc rendered as text in
SourceHut which make the repository page less readable.
Also, the pkg.go.dev now render README but only support Markdown.
Since we cannot control the SourceHut and go.dev, the only option is
to support converting Markdown in ciigo so I can write README using
Markdown and the rest of documentation using Asciidoc.
|
|
=== Enhancements
* all: add bash completion script
=== Chores
* all: move the installation steps in AUR to Makefile
* make: change the build and install directory
The build task now create binary under _sys/usr/bin/, while the install
task install the binary based on $DESTDIR environment variable, not
$GOBIN.
|
|
|
|
|
|
|
|
The build task now create binary under _sys/usr/bin/, while the install
task install the binary based on $DESTDIR environment variable, not
$GOBIN.
|
|
=== Bug fix
* all: fix the go:embed reference to symbolic link
=== Chores
* all: add task to serve and preview the documentation at _doc
* all: group all documents into directory _doc
|
|
|
|
|
|
Due to previous commit, where we rename the README.adoc to README, and
change it to symbolic link, the build then failed when doing go:embed.
|
|
|
|
=== Bug fixes
* all: fix base32 decoding on secret
=== Chores
* _AUR: add package build for Arch Linux
* go.mod: set minimum Go version to 1.18 and update all modules
|
|
This package build the gotp based on the latest tag and commit.
|
|
|
|
The golang.org/x/crypto/ssh/terminal has been deprecated.
|
|
The "version" command print the module version based on the latest tag,
with additional commit number and hash.
|
|
The 1.17 has been deprecated since the release of 1.19.
This update affect the test cases on Cli.
|
|
|
|
Changes,
* Replace variable declaration ":=" using explicit one
* Use raw string literal whenever possible
* Realign struct Config from 56 to 40 bytes (-16 bytes)
* Realign struct Issuer from 88 to 72 bytes (-16 bytes)
|