ptarmiganlabs / qs-jwt

Command line tool for creating JWTs that can be used to authenticate with client-managed Qlik Sense (a.k.a Qlik Sense Enterprise on Windows, QSEoW) and Qlik Sense Cloud.
MIT License
6 stars 1 forks source link

payload contains parameter values instead of provided value #159

Open youritorchalski opened 2 weeks ago

youritorchalski commented 2 weeks ago

What version of QS JWT are you using?

1.12.0

What version of Node.js are you using? Not applicable if you use the standalone version of QS JWT.

N/A

What command did you use to start QS JWT?

qs-jwt create-qseow --userdir XXX --userid "exampleuser" --username "exampleuser" --useremail "" --groups "" --expires 364d --audience hLjrej784jiLE --cert-privatekey-file cert.pem

What operating system are you using?

Windows 11 Pro

What CPU architecture are you using?

x64

What Qlik Sense versions are you using?

QSEoW 202402 Patch 3

Describe the Bug

When using the following command, the payload shows the parameter value --group instead of no value, which was expected. qs-jwt create-qseow --userdir XXX --userid "exampleuser" --username "exampleuser" --useremail "" --groups "" --expires 364d --audience hLjrej784jiLE --cert-privatekey-file cert.pem

Payload: { "userId": "exampleuser", "userDirectory": "XXX", "name": "exampleuser", "email": "--groups", "iat": 1718818337, "exp": 1750267937, "aud": "hLjrej784jiLE" }

When using the following command, the program throws an error. qs-jwt create-qseow --userdir XXX --userid "exampleuser" --username "exampleuser" --useremail "example@exampleorg.com" --groups "" --expires 364d --audience hLjrej784jiLE --cert-privatekey-file miklatorg.pem

Error: error: required option '--expires

Conclusion: It seems that either the useremail or groups parameter is not correctly handled.

Expected Behavior

That you can provide empty strings for a required parameter.

To Reproduce

Use the commands that I provided in the description of the bug.

mountaindude commented 1 week ago

Hi @youritorchalski !

I am away from the keyboard a couple of weeks, will look into this big when I get a chance. Sounds like there's something not quite working as intended.