64 Commits

Author SHA1 Message Date
google-labs-jules[bot]
882d06e001
feat: Add cryptfs storage backend for filename encryption (#3249)
* feat: Add cryptfs storage backend for filename encryption

This commit introduces a new storage backend called `cryptfs`. This backend encrypts the filenames of secrets to enhance privacy while maintaining compatibility with existing VCS backends like Git.

Key features:
- For each secret, a cryptographically secure hash (SHA-256) of its name is generated and used as the filename for the underlying storage.
- A mapping from the original secret name to the hashed filename is maintained in an encrypted file (`.gopass-mapping.age`) within the repository.
- The mapping file is encrypted using the `age` encryption backend, with recipients read from the store's `.age-recipients` file.
- The `cryptfs` backend is implemented as a wrapper around any existing storage backend (e.g., `gitfs`, `fs`), which can be configured by the user.
- The backend is registered with gopass and can be enabled by setting `storage: cryptfs` in the store's configuration.

This implementation addresses issue #2634.

* [fix] Fix lint errors

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Fix the remaining tests and add some docs.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-09-24 08:47:09 +02:00
google-labs-jules[bot]
86720090b6
docs: Add GoDoc to pkg and improve markdown files (#3251)
This change adds GoDoc comments to many of the public symbols in the
`pkg/` directory. It also includes various improvements to the
documentation in `README.md` and other markdown files in the `docs/`
directory.

This is a partial documentation effort, as requested by the user, to
get a pull request submitted quickly.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-09-22 19:37:15 +02:00
google-labs-jules[bot]
8c60b17c24
feat(age): Add unlock command to age agent (#3244)
* feat(age): Add unlock command to age agent

This change introduces a proper lock/unlock mechanism for the age agent.

The issue was that after locking the agent with `gopass age lock`, there was no way to unlock it without restarting the agent. This made the lock command mostly useless.

This change introduces a new `unlock` command for the agent and a `locked` state.

- The `lock` command now sets a `locked` flag to `true` in addition to clearing identities.
- The `decrypt` function in the agent now checks this `locked` flag and returns an error if the agent is locked.
- When the gopass client receives the "agent is locked" error, it will ask the user for their passphrase, reload the identities, and send them to the agent.
- A new `gopass age agent unlock` CLI command is added to trigger this new functionality.
- The `gopass age agent status` command is enhanced to report whether the agent is locked.
- The old top-level `gopass age lock` command is hidden, and a new `gopass age agent lock` command is introduced for consistency.

Fixes #3242

* feat(age): Add unlock command to age agent

This change introduces a proper lock/unlock mechanism for the age agent.

The issue was that after locking the agent with `gopass age lock`, there was no way to unlock it without restarting the agent. This made the lock command mostly useless.

This change introduces a new `unlock` command for the agent and a `locked` state.

- The `lock` command now sets a `locked` flag to `true` in addition to clearing identities.
- The `decrypt` function in the agent now checks this `locked` flag and returns an error if the agent is locked.
- When the gopass client receives the "agent is locked" error, it will ask the user for their passphrase, reload the identities, and send them to the agent.
- A new `gopass age agent unlock` CLI command is added to trigger this new functionality.
- The `gopass age agent status` command is enhanced to report whether the agent is locked.
- The old top-level `gopass age lock` command is hidden, and a new `gopass age agent lock` command is introduced for consistency.

I have also addressed the PR comment about the import alias. I have removed the alias and used a dot import instead to avoid the name collision.

Fixes #3242

* feat(age): Add unlock command to age agent

This change introduces a proper lock/unlock mechanism for the age agent.

The issue was that after locking the agent with `gopass age lock`, there was no way to unlock it without restarting the agent. This made the lock command mostly useless.

This change introduces a new `unlock` command for the agent and a `locked` state.

- The `lock` command now sets a `locked` flag to `true` in addition to clearing identities.
- The `decrypt` function in the agent now checks this `locked` flag and returns an error if the agent is locked.
- When the gopass client receives the "agent is locked" error, it will ask the user for their passphrase, reload the identities, and send them to the agent.
- A new `gopass age agent unlock` CLI command is added to trigger this new functionality.
- The `gopass age agent status` command is enhanced to report whether the agent is locked.
- The old top-level `gopass age lock` command is hidden, and a new `gopass age agent lock` command is introduced for consistency.

To avoid name collisions with the imported `filippo.io/age` package, the local `age` package has been renamed to `agecrypto`.

Fixes #3242

* feat(age): Add auto-lock feature to age agent

This change introduces an auto-lock feature for the age agent. The agent will now automatically lock itself after a configurable period of inactivity.

This change also includes the initial fix for issue #3242, which introduced a proper lock/unlock mechanism for the age agent.

- A new config option `age.agent-timeout` is added to specify the inactivity timeout in seconds.
- The agent now has a timer that is reset on every successful decryption operation.
- If the timer expires, the agent locks itself.
- A new `set-timeout` command is added to the agent protocol to configure the timeout.
- The gopass client sends the timeout to the agent when it starts or when it unlocks the agent.
- A new test `TestAgentAutoLock` is added to verify the new functionality.

To avoid name collisions with the imported `filippo.io/age` package, the local `age` package has been renamed to `agecrypto`.

Fixes #3242

* [fix] Fix lint issues

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-09-20 17:09:12 +02:00
google-labs-jules[bot]
baad47c7ef
feat(age): add agent for passphrase caching (#3218)
* This change introduces an agent for the age backend to cache passphrases for age identities.

The agent is a long-running process that listens on a Unix domain socket. Gopass communicates with the agent to request decryption of secrets. The agent caches the passphrases for the identities and performs the decryption, so the passphrases never leave the agent process. This addresses the security concerns with the initial implementation.

The agent can be controlled with the following commands:
- `gopass age agent`: starts the agent in the foreground.
- `gopass age lock`: locks the agent, clearing all cached passphrases.

The age backend will automatically start the agent if it's not already running and the `age.agent-enabled` configuration option is set to `true` (the default).

This change includes:
- The implementation of the age agent in `internal/backend/crypto/age/agent/`.
- Modifications to the age backend to communicate with the agent.
- A new configuration option `age.agent-enabled`.
- Unit tests for the agent.
- Updated documentation for the age backend.

The integration test for this feature (`TestAgeAgent`) is currently failing. The issue is that the test environment is non-interactive, and the code path for initializing a new age store requires a password for the identity keyring, which triggers a `pinentry` call that fails without a TTY. I have tried several approaches to work around this, including setting the `GOPASS_PASSWORD` environment variable and providing a custom pinentry script, but none have been successful so far. The core implementation of the agent is believed to be correct, but the integration test needs further work to run in a non-interactive environment.

* This change introduces an agent for the age backend to cache passphrases for age identities.

The agent is a long-running process that listens on a Unix domain socket. Gopass communicates with the agent to request decryption of secrets. The agent caches the passphrases for the identities and performs the decryption, so the passphrases never leave the agent process. This addresses the security concerns with the initial implementation.

The agent can be controlled with the following commands:
- `gopass age agent`: starts the agent in the foreground.
- `gopass age lock`: locks the agent, clearing all cached passphrases.

The age backend will automatically start the agent if it's not already running and the `age.agent-enabled` configuration option is set to `true` (the default).

This change includes:
- The implementation of the age agent in `internal/backend/crypto/age/agent/`.
- Modifications to the age backend to communicate with the agent.
- A new configuration option `age.agent-enabled`.
- Unit tests for the agent.
- Updated documentation for the age backend.

* This change introduces an agent for the age backend to cache passphrases for age identities.

The agent is a long-running process that listens on a Unix domain socket. Gopass communicates with the agent to request decryption of secrets. The agent caches the passphrases for the identities and performs the decryption, so the passphrases never leave the agent process. This addresses the security concerns with the initial implementation.

The agent can be controlled with the following commands:
- `gopass age agent`: starts the agent in the foreground.
- `gopass age lock`: locks the agent, clearing all cached passphrases.

The age backend will automatically start the agent if it's not already running and the `age.agent-enabled` configuration option is set to `true` (the default).

This change includes:
- The implementation of the age agent in `internal/backend/crypto/age/agent/`.
- Modifications to the age backend to communicate with the agent.
- A new configuration option `age.agent-enabled`.
- Unit tests for the agent.
- Updated documentation for the age backend.

* This change introduces an agent for the age backend to cache passphrases for age identities.

The agent is a long-running process that listens on a Unix domain socket. Gopass communicates with the agent to request decryption of secrets. The agent caches the passphrases for the identities and performs the decryption, so the passphrases never leave the agent process. This addresses the security concerns with the initial implementation.

The agent can be controlled with the following commands:
- `gopass age agent`: starts the agent in the foreground.
- `gopass age lock`: locks the agent, clearing all cached passphrases.

The age backend will automatically start the agent if it's not already running and the `age.agent-enabled` configuration option is set to `true` (the default).

This change includes:
- The implementation of the age agent in `internal/backend/crypto/age/agent/`.
- Modifications to the age backend to communicate with the agent.
- A new configuration option `age.agent-enabled`.
- Unit tests for the agent.
- Updated documentation for the age backend.

* Fix some test failures and add more logging.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix lint error

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Fix integration tests

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-09-15 22:03:33 +02:00
Dominik Schulz
39dcc4f311
[feat] Add Age custom ssh path options (#3199)
* [feat] Add Age custom ssh path options

This commit adds a new flag `--age-ssh-key-path` and a new config option
`age.ssh-key-path` to specify the path to an additional SSH Key file
directory or file.

Fixes #2933

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Fix docs

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Fix lint issues

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Remove GetSSHKeyPath

Not needed.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-08-15 18:52:25 +02:00
Parham Alvani
46dfddaef0
Handle referencing in passwords (#3163)
* feat: handle referencing in passwords

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* feat: use seq over slice to improve performance

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* feat: handle error during reference following

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* feat: provide a flag for not following references

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* feat: disable ref following on edit and remove the flag

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* feat: provide a configuration for follow-references

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* fix: correct configuration tests

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* fix: correct tests and document the new flag

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* fix: correct integration test

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* fix: correct tests

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

---------

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>
2025-05-28 18:10:54 +02:00
Fabio Alessandro Locati
b7a43e6485
Add otp.onlyclip, otp.alsoclip and the -C parameter to otp (#3093)
Signed-off-by: Fabio Alessandro Locati <mail@fale.io>
2025-04-25 19:57:59 +02:00
Joel Lau
ecb848ff4b
specify ssh dir (#2981)
* specify ssh dir

Signed-off-by: Joel Lau <joellau@protonmail.com>

* added documentation, prefer GOPASS_SSHDIR

Signed-off-by: Joel Lau <joellau@protonmail.com>

* check for empty path

Signed-off-by: Joel Lau <joellau@protonmail.com>

---------

Signed-off-by: Joel Lau <joellau@protonmail.com>
2024-11-09 10:30:15 +01:00
AnomalRoil
4c2caf3e9b
[FEATURE] Allow for non-interactive age setup (#2970)
* [FEATURE] Allow for non-interactive age setup

Also updates Go to Go 1.23.2 and get rid of min and max functions

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

* [n/a] also renaming clear for Windows

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

* [n/a] bumping our GHA to Go 1.23

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

* [n/a] make our harden runner softer

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

* [n/a] make our harden runner accept go.dev

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

* [n/a] applying code review changes

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
2024-10-14 19:32:26 +02:00
Dominik Schulz
7c5db4d144
[feat] Add verbosity levels to the debug package (#2851)
* [feat] Add verbosity levels to the debug package

Use debug.V(N).Log instead of debug.Log to indicate message
verbosity (higher numbers indicate more verbose messages).

Use GOPASS_DEBUG_VERBOSE=N to control the desired level
of verbosity in the log output.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Document the verbosity env vars.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Allow negative verbosity values

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2024-03-29 19:18:36 +01:00
Dominik Schulz
9b41761dfa
[feat] Add option to disable notification icon (#2845)
* [feat] Add option to disable notification icon

Fixes #2810

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Document new config option

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2024-03-29 09:49:27 +01:00
Daniel Lublin
bf426e64a1
[feature] Allow setting autosync.interval in different time units (#2731)
Solves https://github.com/gopasspw/gopass/issues/2730

Signed-off-by: Daniel Lublin <daniel@lublin.se>
2023-12-01 12:04:49 +01:00
Yolan Romailler
5f18942781
[BUGFIX] Try to always honor local config for mounts (#2724)
* [BUGFIX] Try to always honor local config for mounts

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [BUGFIX] Better propagate mount to config

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] CR nit fix

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2023-11-25 17:48:37 +01:00
Yolan Romailler
d168602f77
Improved config handling and bugfixes (#2716)
* [CLEANUP] Misc changes around debug logging and configs

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [BUGFIX] Handle uninitialized stores with gopass config

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [BUGFIX] Do not always commit upon config changes

Fixes #2673

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Following code review comments

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] More code review changes

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Forgot one change

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2023-11-24 18:00:58 +01:00
Dominik Schulz
2e2fe828f5
[feature] Add new pwgen options to capitalize and include numbers in (#2703)
* [feature] Add new pwgen options to capitalize and include numbers in
xkcd style passwords.

Depends on martinhoefling/goxkcdpwgen#10

Fixes #2573

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Recommend bash-completion

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Replace the goxkcdgenerator dependency with the fork until it is merged.
Also adds and fixes some config options related to the xkcd pwgen.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-11-20 21:35:11 +01:00
Yolan Romailler
d56639fcd7
[CLEANUP] Migration of options to more appropriate sections (#2681)
* [CLEANUP] Moving options to the correct config section

This adds an easy migration path to our config handling, which should
allow us to migrate option names around much more easily in the future.

Any system level config or env variables options are not migrated.

This also fixes a bug in our test code, where the root mount path was
not properly set in our config, because we used "path:" instead of
"path=" to set it.

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [DOCUMENTATION] Document legacy options and their migration path

This also makes sure that legacy options aren't used in the code anymore using the docs test and its regexp

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Removing weird spaces from changelog

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [DOCUMENTATION] Reformatting our Markdown tables properly

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [TESTING] Patching a timezone bug in tests

This is a fun one where if your Timezone isn't UTC and you are past midnight but it's not past midnight UTC, the tests would fail because you're not using the right date to validate it.

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Fix a typo and use the correct Env variables in the doc about the custom Env variables

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [BREAKING] Custom Env options moved from GOPASS_CONFIG_CONFIG_KEY_i to GOPASS_CONFIG_KEY_i

As discussed in #2617, this actually reflects the way GIT_CONFIG works.

It also fixes a potential Panic in our codebase when IsSet was called
without any Preset config on a non-existing key.

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [CLEANUP] Patching all of the new linter complaints

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [CLEANUP] Use Go1.21 everywhere

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] Increase our Golangci timeout

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] code review comment and extra regression test

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2023-11-03 18:40:58 +01:00
Dominik Schulz
c391b0784b
[bugfix] Do not remove unused keys on import by default (#2657)
The cleanup during import is currently buggy on some scenarios
so as a workaround we'll disable auto-cleanup by default and
introduce `recipients.remove-extra-keys` to allow users to turn
it back on.

See GH-2620

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-09-11 15:24:49 +02:00
Sylvain Pelissier
b0c5ce7e00
Use default length defined in config file (#2652)
* Use default length define in config file

Signed-off-by: Sylvain Pelissier <sylvain.pelissier@gmail.com>

* Change default password length name

Signed-off-by: Sylvain Pelissier <sylvain.pelissier@gmail.com>

---------

Signed-off-by: Sylvain Pelissier <sylvain.pelissier@gmail.com>
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-09-11 15:24:33 +02:00
Leo Lou
63534c5f92
Add config generate.strict (#2655)
Signed-off-by: Leo Lou <louyuhong@gmail.com>
2023-09-09 20:44:01 +02:00
Dominik Schulz
b3a410215a
Add ov pager (#2510)
* Add ov pager

RELEASE_NOTES=[ENHANCEMENT] Add internal pager (ov).

Fixes #2507

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Document output.internal-pager.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix default value.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Update license check

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-04-07 18:30:11 +02:00
sudoforge
9fdb08b210
feat: add core.autopush to separate push/autosync behavior (#2569)
This change adds a `core.autopush` configuration option (which defaults
to a value of `true`). This new configuration option is used in
post-write-ish actions, to determine if the remote repository should be
pushed to. In doing this, we support workflows where a user may want to
always push to the remote, but disable the behavior of "sync", which
fetches updates from remotes for all mounts (including the root store).

Closes: gopasspw/gopass#2551

Signed-off-by: sudoforge <9c001b67637a@sudoforge.com>
2023-04-07 17:18:23 +02:00
Dominik Schulz
8bc952d5bd
Add edit.auto-create option (#2538)
This will allow to restore the old behaviour where gopass edit would
automatically create a secret if a non-existing name was given.

RELEASE_NOTES=[ENHANCEMENT] Add edit.auto-create

Fixes #2531

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-02-05 15:54:11 +01:00
Dominik Schulz
79c055240c
Clarify fsck description (#2541)
Fixes #2522

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-02-05 15:52:10 +01:00
Dominik Schulz
932d7a1d54
Rewrite gopass audit (#2506)
* Start new auditor

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Add new files

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Rewrite gopass audit

Fixes #2504

RELEASE_NOTES=[ENHANCEMENT] Rewrite gopass audit. Add HTML and CSV
exports.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix tests

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Add template flag

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2023-01-03 21:03:42 +01:00
Dominik Schulz
c702df1ce1
Add some hooks (#2499)
* Add some hooks

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Add generic hooks

Fixes #2500

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Address some review comments and fix some tests.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Document options

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Error formatting

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-31 13:47:13 +01:00
Dominik Schulz
858664f2ff
Add audit.concurrency and debug logging (#2498)
See #1017

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-28 17:17:07 +01:00
Dominik Schulz
dc295b9ae1
Add recipients.hash checking (#2481)
This PR adds a new attempt at validating recipients files to prevent
malicious actors from updating them and tricking users into sharing
their new and updated secrets with a wider-than-inteded audience.

This includes two new config options (`recipients.hash` and
`recipients.check`) and one new command `gopass recipients ack`
to update the hash after validating it's content.

Fixes #2478

RELEASE_NOTES=[ENHANCEMENT] Add recipients hash checking.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-18 18:20:58 +01:00
Dominik Schulz
4c4f8218fa
Add domain alias documentation and fix lookup logic (#2455)
Fixes #2453

RELEASE_NOTES=[BUGFIX] Fix domain alias lookup

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-07 19:13:45 +01:00
Dominik Schulz
3276ea4504
Support german language for the xkcd generator (#2454)
Fixes #2451

RELEASE_NOTES=[ENHANCEMENT] Support german language in the password
generator

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-07 09:08:34 +01:00
Dominik Schulz
ca6abaa9a5
Add generate.symbols and generate.length options to (#2443)
control gopass password generation behavior.

Fixes #2151

RELEASE_NOTES=[ENHANCEMENT] Add generate.symbols and generate.length
options.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-04 21:04:40 +01:00
Dominik Schulz
31630220d6
Introduce config option to disable update checks (#2436)
RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-12-03 22:28:11 +01:00
Dominik Schulz
1e7a6b160a
Maintain secret structure when parsing (#2433)
* Maintain secret structure when parsing

This commit introduces a new KV secret type ("AKV") that fully maintains
the secret format when parsing. As such it obsoletes the old KV and
Plain formats and the need for the core.parsing option.

Fixes #2431

RELEASE_NOTES=[ENHANCEMENT] Maintain secret structure when parsing

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Update internal/action/edit.go

Co-authored-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

* Address review comments

This brings back the noparsing flag since we need this to cover some
corners cases.

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
2022-12-01 22:53:40 +01:00
Dominik Schulz
18ffee354f
Add .gitconfig parser (#2395)
This commit adds yet another config handler for gopass. It is based on
the format used by git itself. This has the potential to address a lot
of long standing issues, but it also causes a lot of changes to how we
handle configuration, so bugs are inevitable.

Fixes #1567
Fixes #1764
Fixes #1819
Fixes #1878
Fixes #2387
Fixes #2418

RELEASE_NOTES=[BREAKING] New config format based on git config.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

address comments

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-11-25 10:50:34 +01:00
Enzo Venturi
61af2065c4
docs/config.md: add path for windows (#2413) 2022-11-18 18:35:18 +01:00
Dominik Schulz
832d2cde4d
Add autosync once a week (#2191)
RELEASE_NOTES=[ENHANCEMENT] Automatically sync once a week

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-07-18 21:55:05 +02:00
FG
ed7451678c
Determine password length from env variable, if set (#2219)
* Determine password length from env variable, if set.

With this change, the variable `GOPASS_PW_DEFAULT_LENGTH` can be used to
set a default length for the `generate` cmd.

RELEASE_NOTES=[ENHANCEMENT] Environment variable GOPASS_PW_DEFAULT_LENGTH can be used to overwrite default password length of 24 characters.

Signed-off-by: dotcs <git@dotcs.me>

* Don't ask for password length if env variable is set

Signed-off-by: dotcs <git@dotcs.me>

* Fix PR finding: Don't skip test in short mode

Signed-off-by: dotcs <git@dotcs.me>

* Fix lint issues

Signed-off-by: dotcs <git@dotcs.me>

* Fix lint issue (code complexity) by moving code to separate function

Signed-off-by: dotcs <git@dotcs.me>
2022-05-16 13:38:19 +02:00
Dominik Schulz
979c356faa
Allow overriding GPG binary path (#2153)
RELEASE_NOTES=[ENHANCEMENT] Allow overriding GPG path

Fixes #2003

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-03-12 17:02:11 +01:00
Justin Kromlinger
6758797df0
Add env variables for custom clipboard commands (#2091)
* Add env variables for custom clipboard commands

Adds `GOPASS_CLIPBOARD_COPY_CMD` and `GOPASS_CLIPBOARD_CLEAR_CMD`
environment variables which are called instead of the normal
implementation if set. The commands receive the name of the password as
their first parameter and the password or its checksum on `STDIN`.

Resolves #2042.

RELEASE_NOTES=[FEATURE] Add env variables for custom clipboard commands.

Signed-off-by: hashworks <mail@hashworks.net>

* Improve two line test ambiguity

The output might contain the previous value "and". Additionally with the
new values it is now clearer what is tested.

RELEASE_NOTES=[TESTING] Improve two line test ambiguity.

Signed-off-by: hashworks <mail@hashworks.net>

* Use a helper to unset env vars in clipboard tests

RELEASE_NOTES=[TESTING] Use a helper to unset env vars in clipboard tests.

Signed-off-by: hashworks <mail@hashworks.net>
2022-01-11 10:02:08 +01:00
Lex Sheehan
e3a827de2e
Remove references to autosync in doc (#1960)
RELEASE_NOTES=n/a

Co-authored-by: Lex Sheehan <l3x@users.noreply.github.com>
Co-authored-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2021-09-29 16:09:01 +02:00
Dominik Schulz
1131dbf5fb
Remove GOPASS_NOCOLOR (#1937)
Fixes #1936

RELEASE_NOTES=[CLEANUP] Remove GOPASS_NOCOLOR in favor of NO_COLOR

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-08-05 22:33:31 +02:00
Dominik Schulz
2e1f2e442d
Avoid logging credentials (#1886)
This commit adds filtering to avoid logging credentials in the debug
logs. If logging of credentials, e.g. for debugging secret parsers,
is required GOPASS_DEBUG_LOG_SECRETS can be set to an non empty
string to enable logging of secrets.

Fixes #1883

RELEASE_NOTES=[BUGFIX] Avoid logging credentials

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-03-27 21:28:09 +01:00
Dominik Schulz
203806fd9c
Remember when fsck was last run and remind after 90d (#1792)
This adds a reminder when fsck was not run within the last 90d (or never).

RELEASE_NOTES=[ENHANCEMENT] Remind to run gopass update/fsck/audit after 90d
RELEASE_NOTES=[ENHANCEMENT] Added a env var to disable reminders
2021-02-15 20:00:06 +01:00
Yolan Romailler
fb2553bba0
Disable input parsing (#1681)
Fixes #1602
Fixes #1614
Fixes #1600
Fixes #1594
Fixes #1601
Fixes #1650

RELEASE_NOTES=[BUGFIX] Disabling all kind of parsing of the input
RELEASE_NOTES=[ENHANCEMENT] Adding the flag show -n to disable output parsing
RELEASE_NOTES=[ENHANCEMENT] Adding the option parsing to disable all parsing

Signed-off-by: Yolan Romailler <yolan@romailler.ch>
2021-01-07 21:53:06 +01:00
Yolan Romailler
37b66e93e3
Correcting typos (#1521)
RELEASE_NOTES=n/a

Correcting typos

Signed-off-by: Yolan Romailler <yolan.romailler@kudelskisecurity.com>
2020-08-14 18:00:35 +02:00
Dominik Schulz
34538ea68e
Add documentation for audit, generate, insert and show flags (#1516)
RELEASE_NOTES=[DOCUMENTATION] Document audit, generate, insert and show
flags

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-08-14 06:48:25 +02:00
Dominik Schulz
794feb0d42
Remove config option confirm (#1512)
Fixes #1503

RELEASE_NOTES=[CLEANUP] Remove config option confirm

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-08-13 08:33:39 +02:00
Dominik Schulz
9e70dc8218
Remove autoclip integration for gopass show (#1513)
Fixes #1502
Fixes #1441

RELEASE_NOTES=[CLEANUP] Remove autoclip for gopass show

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-08-13 06:36:52 +02:00
Yolan Romailler
9fddc0aeba
Handling 2 regressions from #1391 (#1461)
* Fix panic in config and cleanup

Fixes #1458
Fixes #1459

This is fixing a panic in config that was not catched by the tests, it
augments the tests to catch it and it cleans up the config code that
still had some code from the time where we supported per-mount
configuration. Documentation is updated as well to reflect the change
made in #1391 that is dropping some config options.

It is also adding a test to detect regressions in the ways mount
shadowing works.

RELEASE_NOTES=[BUGFIX] Fix config panic with mounts

Signed-off-by: Yolan Romailler <yolan@romailler.ch>

* Adding a test for the mount shadowing

RELEASE_NOTES=[TESTING] Add a test to detect shadowing issue with mount

Signed-off-by: Yolan Romailler <yolan@romailler.ch>
2020-07-21 20:54:26 +02:00
Dominik Schulz
0cfa536d28
Add debug package (#1396)
This commit adds a new debug package to gopass.
It is heavily inspired by github.com/restic/restic/internal/debug
and adapted for the gopass use case.

This change allows to further trim down the source code since the
new package doesn't propagate the debug flag in the context anymore.
As such we can now omit passing ctx in most places.

In order to ensure we don't accidentially keep passing ununsed
parameters we also introduce unparam to check for extra arguments.

RELEASE_NOTES=[ENHANCEMENT] New Debug package

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-05-29 13:47:35 +02:00
Dominik Schulz
c2448abbf3
Remove autoprint (#1386)
This config option conflicts with autoclip.

RELEASE_NOTES=[DEPRECATION] Remove AutoPrint

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-05-25 21:17:53 +02:00