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

mosquitto_passwd should not be part of the docker image #269

Open
ccvca opened this issue Mar 14, 2023 · 1 comment
Open

mosquitto_passwd should not be part of the docker image #269

ccvca opened this issue Mar 14, 2023 · 1 comment

Comments

@ccvca
Copy link

ccvca commented Mar 14, 2023

mosquitto_passwd should not be part of the docker image, as the generated passwords are not compatible.

COPY --from=mosquitto_builder /usr/local/bin/mosquitto_passwd /usr/bin/mosquitto_passwd

From my point of view, this should be either omitted, or replaced with a shell script, which outputs, something like this: mosquitto_passwd is not supported by mosquitto-go-auth, use /mosquitto/pw instead

PS: If someone is iterested, the hashed passwords are nearly compatible, when using a recent mosquitto_passwd with the default settings, only the PBKDF2 prefix is missing, so this $7$101$BZwdvumJzWygl4Bp$nO25BJ4fb7r8So1KAqeoAo... must be edited to this PBKDF2$7$101$BZwdvumJzWygl4Bp$nO25BJ4fb7r8So1KAqeoAo....

@iegomez
Copy link
Owner

iegomez commented Mar 16, 2023

Hey, @ccvca, thanks for reporting this.

I was taking a look and found this old issue: #115
I'm not sure if I just forgot to address it or was a bit reluctant to do so at the time. The man pages still state Passwords are stored in a similar format to [crypt](https://linux.die.net/man/3/crypt)(3). 🤷
So I don't know, It's been a long while since it was posted.

As you say, right now crypto(3) strategy used by mosquitto_passwd is not supported and the image most likely doesn't need to ship with it, I never thought it'd be a source for confusion given the docs. If you feel strongly about removing or addressing it, I'd welcome a PR for adding support or simply getting rid of the utility since I'm not actively working on the plugin itself and prefer to review contributions instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants