Hello,
I am quite impressed with the features of Keycloak, but now we are facing an interesting requirement in our system. We generate caldav URLS for students of universities to view their own study schedule. Not extremely sensitive but it still needs a little bit of protection. For example something like: webdav://
myuniversity.edu/calendar?student=12345678&token=abcdefgh
It needs to be a fixed URL that the student can import into their calendar client. So the URL already needs to contain a 'token' to identify the student and cannot be changed afterwards since we do not want to instruct the student to update their calendar client every x weeks or months.
I can go about this several ways:
- Increase the session duration to > 1 year and keep all these idle sessions active so the access token is still valid after more than a year. Perhaps theoretically possible, but I need to do this partly on the whole realm, plus the sessions are stored in infinispan and then need to be persisted, etc.
- Same as above, but only validate the JWT token in the application and not validate it through Keycloak (no introspect) so expired sessions are not longer the problem. Of course, not validating the token in Keycloak has disadvantages of its own.
- Use offline tokens. However, I read that these are actually refresh tokens that themselves need to be refreshed once in a while (every couple of months). Since we have a fixed token, that is not possible.
- Just forget about Keycloak for such a particular usecase and build the token into the application itself and bypass Keycloak altogether.
What is the recommended way to approach such a usecase?
Thanks
Evert-Jan