Comments (6)
@OceanTrader1 From what I can tell, looking at the codebase, Gopass handles passwords by simply having them as the first line, always, and assuming that the other lines are other fields, or the body text. For example:
❯ gopass insert my-entry <<EOF
username: my-username
password: my-secret
EOF
❯ gopass show my-entry
Secret: my-entry
username: my-username
password: my-secret
❯ gopass show -o my-entry
username: my-username
It would have to be it's own feature, as the default way gopass
parses passwords (where the first line is always the password) is depended on and expected by several external integrations.
Maybe there could be discussion about a feature / alternative syntax that would allow saving and parsing of a password that was several lines?
A side note though, the --multiline
flag isn't the clearest about it's functionality. It's essentially --edit
or --editor=$EDITOR
, but could imply that the password
and all password
features, will be handled by that.
from gopass.
Gopass handles passwords by simply having them as the first line, always, and assuming that the other lines are other fields, or the body text...It would have to be it's own feature
I agree with the points stated. Either (1) the language for the --multiline
documentation should be clarified regarding this limitation if the current scope of gopass is working as intended, or (2) introduce new functionality for multi-line passwords.
external integrations
Is there a recommended method that exists already for reading stored private keys having the -----[BEGIN|END] OPENSSH PRIVATE KEY-----
format?
from gopass.
@OceanTrader1 Can I ask which circumstances you're in that can't be satisfied by the generic gopass show <secret>
? If you're concerned about the first line that says Secret: <secret>
, it doesn't actually get carried over to the output when piping or setting variables.
To clarify, I set a multiline password with the following text:
---
my
multiline
ssh
key
---
❯ gopass show test
Secret: test
---
my
multiline
ssh
key
---
❯ gopass show test | cat
---
my
multiline
ssh
key
---
❯ my_var="$(gopass show test)" && echo "$my_var"
---
my
multiline
ssh
key
---
Though I may be overlooking something so feel free to let me know. I'm also not well-versed in the Windows implementation, if that applies, though I would imagine (or hope, at least) it's similar.
from gopass.
I am using MacOS, so I can not speak directly to the Windows implementation either.
I concur that piping for works adequately for reading a stored key though it was not apparent that only the multi-line key is piped to STDOUT. Still, the wording for the --password
flag seems misleading in this context. My suggestion is to adjust the language in the documentation to express this behaviour more clearly. Thoughts?
from gopass.
If you want to have a multiline key-value, that should work, relying on our YAML parsing support:
---
key: |
-----BEGIN OPENSSH PRIVATE KEY-----
...
...
-----END OPENSSH PRIVATE KEY-----
user: bob
and you can get the multi-line key using:
$ gopass show name/of/entry key
Secret: testy
Key: key
-----BEGIN OPENSSH PRIVATE KEY-----
...
...
-----END OPENSSH PRIVATE KEY-----
As mentioned earlier by someone, we display extra information on stderr
, such as the name of the secret and the key being queried.
These do not get copied nor piped further:
gopass -c name/of/entry key
will copy just the multiline key-value.
You can check this by seeing that
gopass name/of/entry key | cat
works and it doesn't get piped further.
Another option is to just disable all parsing and force output with:
gopass show -n -f name/of/entry
from gopass.
Hm, I wasn't thinking of the YAML support for multi-line passwords with a specific key. Cool stuff. I probably should have grep
ed for multi-line haha.
from gopass.
Related Issues (20)
- Team function for importing a public key with sync (or via updates) is broken
- gopass otp gives git error HOT 3
- $PASSWORD_STORE_DIR expansion creates unintended directory structure when using fscopy HOT 2
- Including .gpg extension causes unintended results when calling fscopy HOT 9
- `gopass setup`: inconsistent behaviour and merge failure because of "unrelated histories" HOT 2
- gopass generate -g xkdc now fails if no language is set in config. HOT 1
- Feature Request: Wizard type multiline / editor HOT 4
- "Failed to check environment" & "Failed to list store" after fresh install HOT 1
- panic: runtime error: invalid memory address or nil pointer dereference HOT 3
- Feature Request: Ignoring passwords in the audit feature HOT 3
- gopass attempts to make GPG key despite there being one already HOT 3
- Feature request: configuration option to disable logo in notification HOT 4
- setup creates new branch in existing store
- audit /audit summary is broken/regressed HOT 4
- [FR] In a `gopass create` template, how do I specify that password should not be generated?
- Public keys are not exported into mounted stores HOT 5
- The same recipient can be added several times HOT 1
- gopass audit: checks still report as failure
- Gopass does not consistently respect upper and lowercase in secret names / Git commit fails if secret exists in different case HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gopass.