product-is
product-is copied to clipboard
j2 template improvement for additional properties in cookie config
Describe the improvement The below config can be used to set/override properties of cookies.
[[identity.cookies]]
name = "commonAuthId"
domain = "test.com"
httpOnly = true
secure = true
According to [1][2], there are 08 such properties which can be set from this config.
But only following properties are supported from the j2 template which blocks the ability set other properties from the deployment.toml.
<Cookie name="{{cookie.name}}"
domain="{{cookie.domain}}"
httpOnly="{{cookie.httpOnly}}"
secure="{{cookie.secure}}"
sameSite="{{cookie.sameSite}}" />
[1] https://github.com/wso2/carbon-identity-framework/blob/8e10f99abe90cf67dd4ef9a8a69efcf50b3660e6/components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/util/FrameworkUtils.java#L2218-L2251 [2] https://github.com/wso2/carbon-identity-framework/blob/8e10f99abe90cf67dd4ef9a8a69efcf50b3660e6/components/identity-core/org.wso2.carbon.identity.core/src/main/java/org/wso2/carbon/identity/core/util/IdentityConfigParser.java#L395-L445