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

incorrect username and client_id payload given to on_auth_m5 webhook #2026

Open
andrewsaputra opened this issue Aug 29, 2022 · 3 comments · May be fixed by #2123
Open

incorrect username and client_id payload given to on_auth_m5 webhook #2026

andrewsaputra opened this issue Aug 29, 2022 · 3 comments · May be fixed by #2123

Comments

@andrewsaputra
Copy link

andrewsaputra commented Aug 29, 2022

Environment

  • VerneMQ Version: 1.12.5
  • OS: Ubuntu 22.04
  • Erlang/OTP version (if building from source): 24

Expected behaviour

Webhook documentation mentioned sample expected payload :

{
    "username": "username",
    "mountpoint": "",
    "client_id": "client-id",
    "properties": {
      "p_authentication_data": "QVVUSF9EQVRBMA==",
      "p_authentication_method": "AUTH_METHOD"
    }
}

Actual behaviour

username and client_id value are incorrect when arriving on registered webhook endpoint for on_auth_m5 :

{
    "username": null,
    "mountpoint": "",
    "client_id": "undefined",
    "properties": {
        "p_authentication_data": "<auth_data>",
        "p_authentication_method": "EXTERNAL",
        "p_session_expiry_interval": 3600
    }
}

Is the above behaviour expected ?

@ioolkos
Copy link
Contributor

ioolkos commented Aug 30, 2022

@andrewsaputra Thanks, looks wrong, yes.

What username/clientid are you using in the initial register attempt here?


👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq
👉 Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription.

@andrewsaputra
Copy link
Author

andrewsaputra commented Aug 31, 2022

Hi @ioolkos i'm using standard alphanumeric values with a bit of symbols, e.g. :
username : "home-user"
client_id : "device1-08fe1b11-edb3-4dd6-9d1a-4dcc59d24c4a"

aside from this, i'm also encountering a separate issue preventing successful on_auth_m5 response, symptoms look similar with #1780

@ioolkos
Copy link
Contributor

ioolkos commented Sep 1, 2022

@andrewsaputra
ok, thanks. If the username is not set, it is "nullified", so that seems correct. The ClientID should probably never be undefined here, since Verne will allocate a random ClientID in case you don't provide one. Will check this.


👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq
👉 Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription.

@mths1 mths1 linked a pull request Mar 22, 2023 that will close this issue
13 tasks
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

Successfully merging a pull request may close this issue.

2 participants