HA embedded mqtt

Hi all,
how can I configure the embedded mqtt server for use authentication ?
Hi have this configuration:

mqtt:
  embedded:
    listeners:
        default:
            max-connections: 50000
            type: tcp
            bind: 0.0.0.0:1883
    timeout-disconnect-delay: 2
    auth:
        plugins: ['auth_file']
        allow-anonymous: false
        password-file: /opt/homeassistant/passwd.mqtt
  broker: 127.0.0.1
  port: 1883

but I can connect to the broker without password.

Regards
Alessandro

The embedded brocker use the http API password with user homeassistant by default.

http:
  api_password: YOUR_PASSWORD

Hi touliloup,
thank you for the replay. I know about the API password in a standard configuration. What I want is a specifica password client side so I can change the API password without change the client password.
I found the solution in the documentation but does not work.

Regards
Alessandro

@aferraz Your best might be to just install something like Mosquitto. I went through the same thing you did a month ago, and spent a few hours trying to get it working. I had Mosquitto up and running withing 10 minutes.

hello @simpat1zq, thank you for your replay.
I have already installed mosquitto but I preferred to have everything in one product.

Regards

@aferraz did you use the correct hash as the password in the passwords file? Another thing you might try is to remove the anonymous plugin and anonymous:false as well

I Messed around with the internal server earlier today and created the pull request - https://github.com/home-assistant/home-assistant/pull/5132

Still think an easy way to change the password to not default to the http password would be good and will probably add this feature if there is more interest

Thanks @kellerza but finally I configured mosquitto as mqtt server.