Skip to content

Commit

Permalink
vBump
Browse files Browse the repository at this point in the history
  • Loading branch information
Thumimku committed Dec 13, 2024
1 parent 2b04eef commit f892ecc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ public void setCookie(JsServletResponse response, String name, Object... params)
if (sign) {
try {
String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
signature = Base64.encode(IdentityUtil.signWithTenantKey(value, tenantDomain));
} catch (Exception e) {
// For getCookie, setCookie functionalities tenant shouldn't use its tenanted keystore.
// Hence, below code will create a keystore for this context if not exists.
HTTPFunctionsServiceHolder.getInstance().getIdentityKeyStoreGenerator()
.generateKeyStore(tenantDomain, KEY_STORE_CONTEXT);
signature = Base64.encode(IdentityUtil.signWithTenantKey(value, tenantDomain, KEY_STORE_CONTEXT)); } catch (Exception e) {
log.error("Error occurred when signing the cookie value.", e);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,6 @@ public void setIdentityKeyStoreGenerator(IdentityKeyStoreGenerator identityKeySt

public void unsetIdentityKeyStoreGenerator(IdentityKeyStoreGenerator identityKeyStoreGenerator) {

HTTPFunctionsServiceHolder.getInstance().setIdentityKeyStoreGenerator(identityKeyStoreGenerator);
HTTPFunctionsServiceHolder.getInstance().setIdentityKeyStoreGenerator(null);
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
<carbon.kernel.version>4.10.22</carbon.kernel.version>
<carbon.kernel.package.import.version.range>[4.6.0, 5.0.0)</carbon.kernel.package.import.version.range>
<carbon.user.package.import.version.range>[1.0.1, 2.0.0)</carbon.user.package.import.version.range>
<carbon.identity.framework.version>7.7.23</carbon.identity.framework.version>
<carbon.identity.framework.version>7.7.34</carbon.identity.framework.version>
<identity.organization.management.core.version>1.0.89</identity.organization.management.core.version>
<carbon.identity.framework.testutils.version>5.20.447</carbon.identity.framework.testutils.version>
<carbon.identity.package.import.version.range>[5.14.0, 8.0.0)</carbon.identity.package.import.version.range>
Expand Down

0 comments on commit f892ecc

Please sign in to comment.