-
Notifications
You must be signed in to change notification settings - Fork 64
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
Zowe JWT expiration time can be much longer than z/OSMF LPTA token expiration time #615
Comments
Thanks for creating the issue, Expected behaviour is correct, let me know if I can help at all with this, |
Just a few remarks from looking a bit into the topic. I believe that JWT builder case is the one that we care about. In the documentation it states: The documentation related to the JWT token configuration is here: https://www.ibm.com/support/knowledgecenter/SSLTBW_2.4.0/com.ibm.zos.v2r4.izua300/izuconfig_EnableJSONWebTokens.htm In the documentation I didn't find any endpoint that will give us the information about the validity/expiration of the token. @jordanCain Would it be possible to get the token from zOSMF on the startup and extract the expiration date in the Gateway? |
@balhar-jakub I'm not 100% sure i'm clear with that you're asking. Are you suggesting that we the first time we get the token from z/OSMF we assume its expiration is the same as the default expiration? or we check the server_override.xml for the expiration time? and we then set the JWT to be the same? In this case we would have to assume the token from z/OSMF is newly created to ensure it's not already partially expired. |
@jordanCain Sorry for confusion. The process I had in mind looks like this:
Does this clarify it? |
@balhar-jakub Yes that very clear thanks. As long as we can extract the expiration and creation time of the LTPA this sounds like a great solution. |
@jordanCain Just some more information on what we found with @taban03. In case zOSMF supports the JWT tokens, then the expiration works properly as the tokens are just reused. The expiration case issue is happening when the zOSMF is in older version which doesn't support JWT and as such we can only use the LTPA token which we wrap into JWT provided by the API ML. There we have a default expiration of one day. We propose to solve this issue by updating the default expiration time in the API ML to 8 hours which is default in the zOSMF and documenting the property to change the expiration time in case the user changed expiration of their LTPA token. |
It seems that the LTPA token decryption for retrieving the information depends on the extraction of the LTPA signing keys from the Liberty server, which doesn't really seems like worth it, as the amount of cases it affects is quite limited. |
With the merged PR and the change in the documentation we are closing this Issue. |
Describe the bug
Reported by @jordanCain on Slack:
https://openmainframeproject.slack.com/archives/CC5UUL005/p1586358082094900
Steps to Reproduce
Expected behavior
Zowe JWT token expiration time is not longer than z/OSMF expiration time - both /query and access to z/OSMF should fail after LTPA token is expired.
Zowe should determine the LTPA expiration automatically if possible. Otherwise, this should be explained in the documentation and the system programmer should be able to configure the Zowe JWT expiration time to match z/OSMF expiration time.
Details
The text was updated successfully, but these errors were encountered: