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>
This commit adds warnings when trying to copy encrypted
secret files from or to the store. Some warnings can be skipped
with --force.
Fixes#2768
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* [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>
The AKV secret type does rely on the bufio.Scanner and that uses
a 64k limit by default. This change extends the limit to always
match the supplied input data. This might exceed the available
memory but not corrupt the output data.
If we want to support payloads larger than the available memory
we must make large changes to the parser. But since the issue
is quite severe and we don't advertise to support huge playloads
this seems to be a good compromise.
Fixes#2594
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
For a short while we may have written incorrect, lower-case MIME
headers so when decoding we need to check those, too.
Fixes#2518
RELEASE_NOTES=[BUGFIX] Also accept lower case CTE headers.
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* Do not enforce lower case keys
Fixes#1777
RELEASE_NOTES=[ENHANCEMENT] Do not enforce lower case keys
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* Use canonical MIME header key for well known header keys
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
* 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>
Running gci in order to make sure we have properly deterministic imports
RELEASE_NOTES=n/a
Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
This header was a left over artifact from the MIME imeplementation
and isn't really used anyway. So instead of fighting with ClamAV
just remove it.
Fixes#1807
RELEASE_NOTES=[BUGFIX] Do not trigger ClamAV FP
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Remove usage of io/ioutil: https://golang.org/doc/go1.16?s=03#ioutil
RELEASE_NOTES=[ENHANCEMENT] Use Go 1.16
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
This commit renames the existing out methods that expect
a format string to include the common f suffix and introduces
new out methods without this suffix that don't accept a
format string or variadic arguments.
Fixes#1793
RELEASE_NOTES=n/a
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
RELEASE_NOTES=[ENHANCEMENT] KV secrets are now key-values, supporting multiple same key with different values
Fixes#1576
Signed-off-by: Yolan Romailler <yolan@romailler.ch>
This PR moves some packages from internal to pkg to increase the
independence of binaries in cmd/ from internal packages further.
RELEASE_NOTES=n/a
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
This commit introduces a new MIME-based secrets format that will
eventually replace any existing secret format.
Fixes#1310
RELEASE_NOTES=[BREAKING] New secrets format.
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>