Closed tsrikanth2511 closed 4 months ago
Hi @tsrikanth2511, Thank you for reporting this. I have reported the issue to the developers. However, the best way to report such bugs is through support.mendix.com. Please note that - I will be closing this current issue. To ensure the best support from the developers, please submit your report again via support.mendix.com. Developers are already informed. Thank you for your cooperation.
Hi @Karuna-Mendix thanks for the response. I have created a support ticket.
Please use the form below, leaving the prefilled data to help us. Thank you.
Marketplace module link: oidc sso
Page link: oidc-sso
Document link: oidc.md
Bug Report: OIDC SSO module - Illegal Base64 Character in JWT Payload
Description
A user reported an issue with accessing our application which uses the OIDC Connect module. The error log contained a stack trace with an
IllegalArgumentException
for an illegal base64 character, specifically the underscore character (_
).The issue originates from the
getDecodedPayload
method in theAzureRoleParse
Java action. This method attempts to decode the payload of a JWT token, which is returned as a base64 encoded string by thejwt.getPayload
method. However, the payload string contains underscore characters, which are not recognized by the standard Base64 decoder.Here is the relevant part of the stack trace:
Possible Solution
JWT (JSON Web Tokens) are defined in RFC 7519. According to this specification, the payload of a JWT is Base64Url encoded. Therefore, a URL-safe Base64 decoder should be used instead of the standard Base64 decoder. In Java, this can be done using
Base64.getUrlDecoder()
.Here is the suggested code change:
References
Please let me know if you need any further assistance.