Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a pass backend as alternative to the Linux keyring to retrieve the shibboleth credentials #32

Closed
Ma27 opened this issue Jul 5, 2022 · 1 comment · Fixed by #33
Closed
Labels
enhancement New feature or request

Comments

@Ma27
Copy link
Contributor

Ma27 commented Jul 5, 2022

Rather than using e.g. KWallet or gnome-keyring, I prefer to manage all my credentials with pass(1).

I'm not aware of any integration between the freedesktop secret-manager standard and pass, also it doesn't seem so uncommon to provide different backends depending on where to retrieve credentials, see for instance how aws-vault does this. The primary downside of course would be the increased maintenance load.

The integration could basically look like this:

KIT-ILIAS-downloader --keyring

for using the system keyring or

KIT-ILIAS-downloader -U uXXXX --pass-prefix edu/kit/uXXXX

with --pass-prefix and --keyring being mutually exclusive.

Would you be open to accept such a change? If yes, I may take some time soonish(tm) and implement that :)

@FliegendeWurst FliegendeWurst added the enhancement New feature or request label Jul 6, 2022
@FliegendeWurst
Copy link
Owner

I'd accept this new option.

pub fn ask_user_pass(opt: &Opt) -> Result<(String, String)> {
is probably a good starting point when implementing a new password backend.

Rather than using e.g. KWallet or gnome-keyring

FWIW, I'm currently using the secret service integration included in KeepassXC (because it can be set up to require confirmation on each password access, unlike KWallet).

Ma27 added a commit to Ma27/KIT-ILIAS-downloader that referenced this issue Jul 10, 2022
`pass(1)`[1] is a small CLI-based password manager. When passing
`--pass-path edu/kit/uXXXX` to `KIT-ILIAS-Downloader`, it now attempts
to retrieve the password from `pass(1)`.

It is assumed that `pass(1)` is available in the `$PATH` of the process. If
that's not the case, it errors out with an error like this:

    Error: credentials input failed

    Caused by:
        pass not found in $PATH!

It's also taken care of the case where the value `--pass-path` is not
present in the store, the error will look like this:

    Error: credentials input failed

    Caused by:
        `pass` failed with non-zero exit code 1: Error: edu/kit/uXXXX is not in the password store.

Closes FliegendeWurst#32

[1] https://www.passwordstore.org/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants