Skip to content

Commit

Permalink
Fix ssoadm dsameuser SSO token cleanup (WrenSecurity#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
karelmaxa committed Jul 25, 2023
1 parent 412aeac commit d9c5a56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

/**
* Portions copyright 2013-2016 ForgeRock AS.
* Portions Copyright 2023 Wren Security.
*/
package com.iplanet.sso.providers.dpro;

Expand Down Expand Up @@ -340,7 +341,7 @@ public void destroyToken(SSOToken token) throws SSOException {
SSOTokenID tokenid = token.getTokenID();
String id = tokenid.toString();
SessionID sessid = new SessionID(id);
Session session = sessionCache.getSession(sessid);
Session session = sessionCache.getSession(sessid, true);
session.destroySession(session);
} catch (Exception e) {
if (debug.messageEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,12 @@ public static void reset() {
}

private void resetInstance() {
if (appSSOToken != null) {
// XXX Temporarily disabled to workaround unavailable CTS token store issue (see https://github.com/WrenSecurity/wrenam/issues/63)
// try {
// getInstance().tokenManager.destroyToken(appSSOToken);
// } catch (SSOException ssoe) {
// debug.error("AdminTokenAction.reset: cannot destroy appSSOToken.", ssoe);
// }
if (appSSOToken != null && !SystemProperties.isServerMode()) {
try {
getInstance().tokenManager.destroyToken(appSSOToken);
} catch (SSOException ssoe) {
debug.error("AdminTokenAction.reset: cannot destroy appSSOToken.", ssoe);
}
appSSOToken = null;
}
internalAppSSOToken = null;
Expand Down

0 comments on commit d9c5a56

Please sign in to comment.