问题
I am using WSO2 IS 5.10.0 running in the official Docker image and followed the guide here to setup session limiting for users with defined roles. I have attempted to use the main way described in the article (using the active-session-limit-handler), as well as the alternative method described in section 2 (using adaptive authentication Javascript functions). Neither method has worked for me.
Through error logs I was able to trace the issue back to the following query:
SELECT USER_ID FROM IDN_AUTH_USER WHERE USER_NAME =? AND TENANT_ID =? AND DOMAIN_NAME =?
This query is returning no results, which causes the JS function to fail/believe there are no active sessions for the user.
I assumed this was possibly because I wasn't explicitly turning on session persistence, so I followed the docs and modified my deployment.toml to persist sessions. After restarting WSO2 IS with the modified deployment.toml I am still failing in the same way. The query returns no results even if the user has multiple active sessions.
How do I enable limiting the maximum number of sessions?
回答1:
There is an already reported issue[1] as limiting active user sessions feature is not working as expected in the IS-5.10.0 GA pack. It has been fixed in the 5.10 WUM updated pack and the latest release of IS-5.11.0. You can switch to the latest version or otherwise, you can apply a patch with the fix.
来源:https://stackoverflow.com/questions/65151603/unable-to-limit-maximum-session-on-wso2-identity-server