Dependency on pwqgen not mentioned in readme #147

Closed
opened 2021-04-16 16:35:00 +00:00 by roxxers · 11 comments
Owner

Is required for secret generation.

Is required for secret generation.
Author
Owner

Is there native soloutions we can have as a fallback like /dev/urandom? Might be good to make pwqgen an optional dependancy

Is there native soloutions we can have as a fallback like /dev/urandom? Might be good to make pwqgen an optional dependancy
Author
Owner

I think passwdqc-utils is unmaintained

I think passwdqc-utils is unmaintained
Author
Owner

Cant seem to give my own command either. Aliasing pwqgen doesnt work

Cant seem to give my own command either. Aliasing pwqgen doesnt work
Author
Owner

Makes using abra on arch based systems impossible as you cannot download the binary and I cannot find the source

Makes using abra on arch based systems impossible as you cannot download the binary and I cannot find the source
decentral1se added the
bug
label 2021-04-16 21:12:43 +00:00
decentral1se added this to the Beta release milestone 2021-04-16 21:12:50 +00:00
Owner

@roxxers do you have pwgen (without the Q) installed? We could use that as a fallback if pwqgen isn't available. If not, yeah let's use /dev/urandom or some excitement.

Did you at least get an error message "ERROR: 'pwqgen' program is not installed" or is that also not working?

Lastly you can manually hack around this using the <cmd> option to abra .. secret generate, e.g.

abra app foo_bar secret generate --all "pwgen"
@roxxers do you have `pwgen` (without the Q) installed? We could use that as a fallback if `pwqgen` isn't available. If not, yeah let's use /dev/urandom or some excitement. Did you at least get an error message `"ERROR: 'pwqgen' program is not installed"` or is that also not working? Lastly you can manually hack around this using the `<cmd>` option to `abra .. secret generate`, e.g. abra app foo_bar secret generate --all "pwgen"
Author
Owner

pwgen is installed. Still get the same error which is the "ERROR: 'pwqgen' program is not installed one and providing my own command like you showed still shows the same error so I think the logic might be bugged a lil from what I saw of the code. Didnt deep dive the bash but I did see how it might just ignore everything of pwqgen isn't installed

pwgen is installed. Still get the same error which is the `"ERROR: 'pwqgen' program is not installed` one and providing my own command like you showed still shows the same error so I think the logic might be bugged a lil from what I saw of the code. Didnt deep dive the bash but I did see how it might just ignore everything of pwqgen isn't installed
Owner

I think the logic might be bugged a lil from what I saw of the code.

Yep, seems so. Looking at it now

> I think the logic might be bugged a lil from what I saw of the code. Yep, seems so. Looking at it now
Author
Owner

I'll provide screenshots in a bit

I'll provide screenshots in a bit
Owner

It now seems to work with the <cmd> option, at least:

➜ abra app traefik_demo secret generate foobar v1 pwgen
SUCCESS: Password: di3Avohl
^C
➜ abra app traefik_demo secret generate foobar v1 
ERROR: 'pwqgen' program is not installed

(I tested by renaming my pwqgen binary)

Suggest keeping this ticket open until we have the default fallback -- @roxxers do you think pwgen is a safe option here or should we do some exciting pure-bash generation?

It now seems to work with the `<cmd>` option, at least: ``` ➜ abra app traefik_demo secret generate foobar v1 pwgen SUCCESS: Password: di3Avohl ^C ➜ abra app traefik_demo secret generate foobar v1 ERROR: 'pwqgen' program is not installed ``` (I tested by renaming my `pwqgen` binary) Suggest keeping this ticket open until we have the default fallback -- @roxxers do you think `pwgen` is a safe option here or should we do some exciting pure-bash generation?
Author
Owner

@3wordchant I think just moving to a more native solution as a fallback would help portability. As for security, I think the default length when using pwgen is too small. Using something like pwgen 1 32 for a 32 char length is safer. The ones generated for me after the fix were 8 chars long. I'd have to research which method is best but from what I recall, urandom should be fine. Esp when secrets don't need memorisation or ease of typing like passphrases do.

@3wordchant I think just moving to a more native solution as a fallback would help portability. As for security, I think the default length when using pwgen is too small. Using something like `pwgen 1 32` for a 32 char length is safer. The ones generated for me after the fix were 8 chars long. I'd have to research which method is best but from what I recall, urandom should be fine. Esp when secrets don't need memorisation or ease of typing like passphrases do.
decentral1se added the
secrets
label 2021-04-17 22:45:05 +00:00
Owner

I think just moving to a more native solution as a fallback would help portability.

Yeah sounds legit, patch welcome! Otherwise I'll get to it ASAP.

As for security, I think the default length when using pwgen is too small.

See #153; I think this was my mistake providing the above workaround. Normally, abra already generates passwords of the length specified in an app's .env.sample file – a quick rg --hidden length in my ~/.abra/apps dir suggests that the shortest length we'll generate will be 43 (for Gitea's SECRET_JWT_SECRET_VERSION).

Esp when secrets don't need memorisation or ease of typing like passphrases do.

Depends which; it seems possible that someone at some point is gonna need to read a MySQL root password over the phone, in which case pwqgen-generated passwords are going to be many many times easier.

> I think just moving to a more native solution as a fallback would help portability. Yeah sounds legit, patch welcome! Otherwise I'll get to it ASAP. > As for security, I think the default length when using pwgen is too small. See #153; I think this was my mistake providing the above workaround. Normally, `abra` already generates passwords of the length specified in an app's `.env.sample` file – a quick `rg --hidden length` in my `~/.abra/apps` dir suggests that the shortest length we'll generate will be 43 (for Gitea's `SECRET_JWT_SECRET_VERSION`). > Esp when secrets don't need memorisation or ease of typing like passphrases do. Depends which; it seems possible that someone at some point is gonna need to read a MySQL root password over the phone, in which case `pwqgen`-generated passwords are going to be many many times easier.
3wordchant changed title from Dependancy on pwqgen not mentioned in readme to Dependency on pwqgen not mentioned in readme 2021-04-20 09:06:20 +00:00
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
2 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/abra#147
No description provided.