Feilong is a open source z/VM cloud connector project under the Open Mainframe Project umbrella that will accelerate the z/VM adoption, extending its ecosystem and its user experience. It provides a set of APIs to operate z/VM including guest, image, network, volume etc.
with the user token provided by the CreateToken() function, one systematically gets:
HTTP status: 401, body: {"overallRC": 400, "rc": 400, "rs": 401, "modID": 120, "output": "", "errmsg": "This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required."}
The logs in DEBUG mode show the message:
[2023-12-12 22:16:57] [DEBUG] token not valid
After debugging, it appears that the function jwt.decode() now needs a third argument with the decoding algorithms, as shown by this small python program:
When running the command
with the user token provided by the
CreateToken()
function, one systematically gets:The logs in DEBUG mode show the message:
After debugging, it appears that the function
jwt.decode()
now needs a third argument with the decoding algorithms, as shown by this small python program:This PR prevents that decoding exception when using authentication tokens, by adding this missing parameter.