Skip to content

Server: Support specifying a password hash to FAKTORY_PASSWORD instead of plaintext #510

@f3ndot

Description

@f3ndot

For the Faktory server, it would be nice to optionally supply a password hash to FAKTORY_PASSWORD for additional security with the Web UI's HTTP Basic. If we use the standard form:

$2a$12$KH2Yy3w5bx.fljs0kCEB4uXGIcGXFRadfTy8mx7myzVb8LXsIo.o2

Faktory can detect a hash and use it as such, otherwise assume a plaintext.

Alternatively an optional FAKTORY_PASSWORD_HASH or FAKTORY_HASH can be prioritized over FAKTORY_PASSWORD if set.

The rationale for this suggestion is minor but threefold:

  • Some systems may use bcrypt, scrypt, or other hashes for other HTTP Basic auths outside of Faktory and being able to re-use it for Faktory's Web UI would be nice without slumped security posture of exposing its plaintext equivalent in Faktory's configuration
  • Web UI would get a slower/harder password check which is a desirable property for authentication
  • If somehow, for whatever reason, that configuration parameters of the Faktory process is exposed-- whether through Faktory server itself as an exploit, the image, or host machine with configured parameters-- the attacker could not connect to the server and inject jobs or cause chaos.

I recognize that FAKTORY_PASSWORD is also used for client/server authentication, assuming that implementers of the client-side known to keep a longer connection, the additional cost/slowness of a hash comparison shouldn't be too much of a penalty. And obviously clients would still always supply the plaintext into FAKTORY_PASSWORD.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions