diff --git a/components/org.wso2.carbon.identity.local.auth.api.core/pom.xml b/components/org.wso2.carbon.identity.local.auth.api.core/pom.xml index 7cb3934..4809a97 100644 --- a/components/org.wso2.carbon.identity.local.auth.api.core/pom.xml +++ b/components/org.wso2.carbon.identity.local.auth.api.core/pom.xml @@ -107,6 +107,7 @@ org.wso2.carbon.core.util; version="${carbon.kernel.imp.pkg.version}", org.wso2.carbon.user.core.*; version="${carbon.kernel.imp.pkg.version}", org.wso2.carbon.utils.multitenancy; version="${carbon.kernel.imp.pkg.version}", + org.wso2.carbon.utils.*; version="${carbon.kernel.imp.pkg.version}", org.wso2.carbon.idp.mgt; version="${carbon.identity.framework.imp.pkg.version}", org.wso2.carbon.identity.core.*; version="${carbon.identity.framework.imp.pkg.version}", diff --git a/components/org.wso2.carbon.identity.local.auth.api.core/src/main/java/org/wso2/carbon/identity/local/auth/api/core/JWTAuthTokenGenerator.java b/components/org.wso2.carbon.identity.local.auth.api.core/src/main/java/org/wso2/carbon/identity/local/auth/api/core/JWTAuthTokenGenerator.java index 021de49..963230f 100644 --- a/components/org.wso2.carbon.identity.local.auth.api.core/src/main/java/org/wso2/carbon/identity/local/auth/api/core/JWTAuthTokenGenerator.java +++ b/components/org.wso2.carbon.identity.local.auth.api.core/src/main/java/org/wso2/carbon/identity/local/auth/api/core/JWTAuthTokenGenerator.java @@ -42,6 +42,7 @@ import org.wso2.carbon.idp.mgt.IdentityProviderManagementException; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.core.service.RealmService; +import org.wso2.carbon.utils.security.KeystoreUtils; import java.nio.charset.StandardCharsets; import java.security.Key; @@ -58,7 +59,6 @@ public class JWTAuthTokenGenerator implements AuthTokenGenerator { private static final Log log = LogFactory.getLog(JWTAuthTokenGenerator.class); - private static final String KEY_STORE_EXTENSION = ".jks"; // We are keeping a private key map which will have private key for each tenant domain. We are keeping this as a // static Map since then we don't need to read the key from keystore every time. private static Map privateKeys = new ConcurrentHashMap<>(); @@ -187,7 +187,6 @@ private int getTenantId(String tenantDomain) throws AuthAPIServerException { private String getTenantKeyStoreName(String tenantDomain) { - String ksName = tenantDomain.trim().replace(".", "-"); - return ksName + KEY_STORE_EXTENSION; + return KeystoreUtils.getKeyStoreFileLocation(tenantDomain); } } diff --git a/pom.xml b/pom.xml index fada4fb..513b09c 100644 --- a/pom.xml +++ b/pom.xml @@ -276,7 +276,7 @@ [1.7.0, 2.0.0) [1.2.0, 2.0.0) - 4.6.0 + 4.9.23 [4.5.0, 5.0.0) 5.25.28 [5.20.321, 8.0.0)