Issue
- Configured SAML in Liferay.
- The SAML certificates are deleted when the Kubernetes pod (Liferay server) is restarted.
Environment
- DXP 2023.Q4.0
Resolution
-
The SAML certificate is stored at
/opt/liferay/data/
. In Kubernetes deployments, this directory must be part of a persistent volume to ensure the certificate and other critical data are retained across pod restarts. -
If this path is not mapped to a persistent volume, or if only an alternative path (such as
/opt/liferay/data/document_library
) is configured, the SAML certificate may be lost when the Kubernetes pod is restarted. It is important to verify that it/opt/liferay/data/
is correctly included in your Kubernetes volume mounts. -
Additionally, there may be cases where the certificate is temporarily stored in memory and not immediately written to disk. This is more likely if the pod is restarted shortly after SAML configuration. To avoid data loss, ensure the certificate is properly saved before performing a restart.
Additional Information
- For more insights into how Kubernetes manages storage and persistence, refer to the Kubernetes volumes documentation: