Why SuiteCRM SAML private keys should leave plain env files
A self-hosted SuiteCRM 8 instance often starts with a plain .env file on the web server that holds everything the application needs, including, once SAML is switched on, the private key used to sign requests to the identity provider. The Symfony secrets vault changes this by storing each sensitive value in an encrypted file in the repository, with the decryption key supplied separately at runtime. A team needs it when more than a handful of people can read the server filesystem, when the same values must be handled differently in staging and production, or when an auditor asks where a signing key lives and who can copy it. The plain env file is convenient, but anyone with read access to the application directory, a backup, or a deployment log can take the key with it.
Moving a value into the vault does not move it automatically. SuiteCRM 8 reads its LDAP and SAML settings from configuration that the SuiteDocs references describe in detail, and those references are the place to start: the SuiteCRM 8 LDAP configuration reference covers the bind password and the AUTH_TYPE=ldap switch, and the SuiteCRM 8.7.0+ SAML configuration reference covers the SAML key settings. For each setting, the team must confirm whether the running release resolves it from the vault or only from an environment variable, because a key left in both places defeats the purpose. Record the answer per setting in the deployment runbook and test it on a staging instance before production.
Where each SuiteCRM credential should live
This table compares three places to keep SuiteCRM credentials such as SAML private keys and LDAP bind passwords: a plain env file, the Symfony secrets vault committed encrypted, and a host or external secret manager that injects values at deploy time. Read each row for the team size or control requirement it fits, then check the trade-off around who holds the decryption key and how rotation happens.
| Storage option | Best fit | Main trade-off | What to confirm before choosing |
|---|---|---|---|
| Plain env file on the server | Small single-server install with one administrator who deploys by hand | Anyone with read access to the server or its backups can read every secret, and changes leave little record of who edited what | Confirm file permissions and that backups of the file are protected at the same level as the database |
| Symfony secrets vault committed encrypted | Multi-environment team that deploys from version control and wants per-environment values in one repository | The decryption key must reach each environment, so key distribution and rotation become a deployment task that someone owns | Confirm how your SuiteCRM 8 version reads vault values for each SAML and LDAP setting in the SuiteDocs references |
| Host or external secret manager injecting values at deploy time | Regulated environment that needs audit of who read or changed each secret | Adds a separate system to run, back up and grant access to, and the deploy job needs permission to fetch secrets | Confirm the manager can supply the SAML private key as a file or value in the form SuiteCRM expects, and how it logs reads |
| SAML private key and certificate | Sign-in through an identity provider, where the key must reach the web tier only | Rotation requires a new certificate registered with the identity provider, so plan both sides before swapping the key | Check the key and certificate settings in the SAML configuration reference for your version |
| LDAP bind account password | Directory sign-in with a dedicated low-privilege bind account | A password stored for the bind account can be used against the directory if the application host is compromised | Confirm which LDAP settings accept vault-stored values and whether a service account rotation needs a restart |
| Database and mail passwords | Any install, since every environment needs them | Changing the database password affects running workers and the scheduler as well as the web tier | List every process that reads the value so the rotation covers all of them |
| Rotation and access review | Teams that must show credential changes to an assessor | Each option differs in how much manual work a rotation takes and how easily access is traced | Ask for the rotation steps and access logs your chosen option produces before you commit to it |
How the vault, decryption key and deploy pipeline fit together
The diagram starts with an engineer setting a value in the encrypted vault file for one environment. That encrypted file is committed to version control, which is the first trust boundary: the repository can hold the ciphertext but not the key. The decryption key is held separately, either in the deploy system or on the production host, and the application decrypts the value at runtime. Confirm the exact vault and key file paths for your SuiteCRM 8 release before you rely on this flow.
General Symfony vault pattern; confirm exact paths for your SuiteCRM 8 release.
Setting up Symfony secrets for SuiteCRM step by step
This sequence moves SuiteCRM SAML and LDAP secret values out of plain env files and into the Symfony secrets vault, starting with dev and ending with a verified production login. Each step closes with a check so the team knows the change worked before moving on.
Inventory every secret value in SAML and LDAP
The platform engineer lists each SAML and LDAP setting in the current env file and marks which ones are secret, such as the SAML service provider private key, certificate passphrases, and the LDAP bind password. Use the SuiteCRM 8.7.0+ SAML configuration reference and the LDAP configuration reference to confirm the setting names for your AUTH_TYPE. Public values like the IdP metadata URL and entity IDs stay in env files. Done when the team has a written list of secret keys, the environments each one exists in, and an owner for each value.
Confirm the Symfony vault commands for your build
Before running any vault command, the engineer checks the Symfony version bundled with the SuiteCRM 8 build in use and confirms the exact secrets commands and the expected file locations for that version in the Symfony documentation. Do not rely on commands copied from older guides. Done when the team has written down the confirmed command set and the vault file paths, and the change is tracked in version control.
Generate and set dev values in the vault
On a developer workstation or the dev environment, the engineer generates new values for each secret, such as a fresh SAML signing key pair and a new LDAP bind password, and stores them in the dev vault using the confirmed commands. Keys are generated on the host and never pasted into tickets or chat. Done when each secret can be listed by name in the dev vault, with values not shown in plain text in any shared location.
Confirm the application reads the vault value
The engineer removes the matching plain value from the dev env file, clears the Symfony cache, and starts SuiteCRM. The app should start and resolve the secret from the vault. A deliberately wrong test value in the vault should cause an authentication failure, which proves the vault is the source. Done when the application starts without the plain value present and the log shows the SAML or LDAP connection initializing against the vault-provided value.
Set production values with a separately held decryption key
The team generates production secret values, stores them in the production vault, and keeps the decryption key in a separate location with restricted access, distinct from the repository and the people who deploy code. Production values should differ from dev and staging. Done when the production vault holds every secret from the inventory, the decryption key is held by named custodians, and access to the key is logged or recorded.
Remove plain copies from env files and history
The engineer deletes the plain secret values from every env file, deployment template and CI variable where they are no longer needed, then checks the repository history for any committed copies. If a value was ever committed, it is treated as exposed: rotate it in the identity provider or LDAP directory and replace it in the vault. Done when a search of the working tree and history finds no plain secret values, and every exposed value has been rotated.
Test login on staging before production
On staging, the team runs a full SAML or LDAP login with a test user from each role type, then checks logout behavior. Note that the SAML implementation in 8.7.0 and later does not support IdP-initiated logout, so logging out at the identity provider does not end the SuiteCRM session. Only after staging passes, the same vault-backed configuration is deployed to production. Done when staging logins succeed for each test role and the production deployment is repeated with the same check.
Verify production login and record the change
After the production deployment, the team runs a login test through the identity provider with a controlled test account, confirms the application starts without any plain secret in the environment, and records the vault paths, key custodians and rotation dates in the runbook. Done when the production login succeeds, the check result is saved with the change record, and the team has a scheduled reminder to review the vault access list.
Per-environment values for dev, staging and production
Development is where engineers build custom modules, test SAML and LDAP settings and break things. Its values should point only at sandbox identity sources and synthetic data. Keep a separate set of keys here so that a developer laptop or shared dev server never holds a credential that can sign in to production. Developers still need working login paths, so the identity provider metadata and bind accounts should describe a test tenant or a test directory. Document which values each developer needs and where they come from, so that production files do not travel through chat or email.
- Identity provider metadata: Point at the test identity provider tenant and keep its metadata file separate from production metadata.
- SAML signing keys: Generate a development-only key pair. Do not place the production private key on any developer machine.
- LDAP bind accounts: Use a read-only bind account on a test directory, with a password that exists nowhere else.
- Site URL: Set the local or dev hostname so that redirects and SAML callback URLs match this environment only.
- Test data: Load synthetic users and records, never customer exports.
Confirm that a fresh developer checkout starts with no production secret present.
Staging is the rehearsal environment. SuiteCRM's migration guidance says to test on a staging instance and to back up files and the database before changing anything, and that discipline applies to secret changes as much as to code. Staging should mirror the configuration shape of production, including the AUTH_TYPE choice for LDAP or SAML, so that a secret reference change or key rotation is proven before users depend on it. Staging must not hold production private keys. A production data copy restored alongside production signing keys would let a staging server sign assertions that the production identity provider trusts.
- Own signing keys: Generate a staging SAML key pair and register its public certificate against a staging service provider entry at the identity provider.
- Own bind account: Use a separate LDAP bind account scoped to a staging directory or a masked copy of it.
- Own site URL: Use the staging hostname so that login redirects never land on production.
- Data copies: If you restore production data to staging, decide which personal data is masked and who may access the copy.
- Promotion path: Move a tested secret change to production through the same steps used for code, with a recorded rollback plan.
Confirm that staging logins go to the staging identity provider and that no production certificate or key appears in the staging configuration.
Production holds the values that matter most: the SAML private key used to sign requests, the LDAP bind credentials and the live site URL. Only the production environment should hold these, and only the deployment process that needs them should be able to read them. Keep vault key material out of source control and out of build artifacts that reach development or staging. Changes should follow the test-first order used for staging, because the migration documentation treats any changed environment as something to verify on staging first. Before go-live, confirm that the identity provider has the production certificate registered and that the team understands the logout behavior.
- Private keys: Keep the production SAML private key only in the production secrets store and limit who can read it.
- Identity provider metadata: Register the production service provider metadata and certificate, and record who approved the registration.
- LDAP bind account: Use a dedicated, least-privilege account and document who can reset its password.
- Site URL and trusted hosts: Set the public hostname exactly, so that redirect and assertion URLs match what users see.
- Logout expectations: Tell users that signing out at the identity provider does not end the SuiteCRM session, because the 8.7.0 and later SAML implementation does not support IdP-initiated logout.
Compare the production secret list with the staging list and confirm that no value was copied across without a decision.
Some values can be the same everywhere, and treating them as shared prevents configuration drift. Non-secret settings such as the AUTH_TYPE choice, attribute mappings and the list of required SAML attributes belong in version-controlled configuration that every environment reads. Secrets are different. Any secret copied from one environment to another should be treated as exposed to the environment it reached, so each copy needs a rotation decision made before the copy happens. The decision is to rotate it, replace it, or accept the risk in writing with a named owner.
- Shared non-secret config: Keep AUTH_TYPE, attribute mapping and feature choices in one versioned file, with per-environment overrides only for hostnames and secret references.
- Copy decision: Before copying any value, record whether it will be rotated on arrival.
- Rotation triggers: Rotate when a copy reaches a less controlled environment, when someone with access leaves, or when a key nears its planned expiry.
- Identity provider coordination: A rotated SAML certificate needs the identity provider updated first, so schedule the change in both systems together.
- Evidence: Keep a log of which secrets were rotated, by whom and when, so that a compliance review can follow the trail.
Ask the team to list every value that crossed an environment boundary in the last quarter and confirm that each one has a recorded rotation decision.
Risks the vault reduces and the ones it leaves open
Moving SuiteCRM credentials into the Symfony secrets vault removes some of the most common ways keys leak, but it only covers the storage layer. The cards below separate what the vault addresses from what stays with your team: host access, access reviews, log hygiene and session behavior.
Secrets left in version control history
Committing a .env file or a SAML private key to Git keeps the value in history even after it is deleted. The vault stores encrypted values in the repository, so the plaintext key never needs to be committed. Check that no earlier commit, fork or CI cache still holds the original plaintext, and rotate any key that was ever exposed.
Plain values readable from server files
Anyone with read access to the application directory can open a plain env file and copy every credential in it. Vault values are encrypted at rest in the repository, so a file read exposes ciphertext rather than the key. Host file permissions, least-privilege service accounts and hardening of the web server still decide who can run commands as the application user.
Shared keys across staging and production
When staging and production read the same secret values, a weaker staging environment exposes production identity and mail credentials. Per-environment vault values keep these separate, but only if someone creates distinct values for each environment. Your team still owns the rule that staging gets its own SAML key pair and its own mail account.
Key loss locking out the application
The vault can only be opened with its decryption key, so losing that key means the encrypted values cannot be recovered. Store the decryption key in a separate, access-controlled location and keep a documented recovery procedure. Test the restore on a staging instance before you rely on it.
Access to the decryption key
Whoever holds the decryption key can read every secret in the vault, so encryption adds no protection for anyone with that key. Limit it to the deployment role, review who holds it during access reviews, and rotate it when people leave. The vault does not decide who receives the key; your access process does.
Logs and error pages echoing configuration
A failed login or debug page can print configuration values into logs or browser output, undoing the vault's protection. The vault does not filter what the application writes, so log scrubbing and disabling debug output in production remain your job. Also note that SAML logout at the identity provider does not end the SuiteCRM session, so key handling does not replace session controls.
What changes in deployment, rotation and rollback
Once SuiteCRM secrets live in the Symfony vault, the deployment pipeline needs the decryption key at deploy time. The runner or deploy host must be able to read the vault key, typically supplied through a separate environment variable, so the pipeline's own credential store becomes part of the secret boundary. Confirm with your SuiteCRM build team which variable the vault key is read from in your version, who can read it in your CI system, and whether build jobs that do not deploy can avoid receiving it. Treat the vault key as a separate secret with its own owner and rotation record, and do not place it in the same file as the vault contents.
Rotating a SAML signing key is the change that most often breaks sign-on. The new private key must be stored in the vault for each environment, and the matching certificate must be registered with the identity provider, both in the same change window. If the IdP still trusts the old certificate when SuiteCRM starts signing with the new key, or the reverse, users will be unable to sign in. Plan the cutover so the IdP accepts both certificates for a short overlap where it supports that, and confirm the exact steps with your IdP vendor and the SuiteCRM SAML configuration reference before you schedule the change.
A rollback must restore the matching vault version along with the code. If a release is reverted but the vault still holds the rotated key, the old code will try to read a secret it was not built against, and if the vault is reverted without the code, the running release may expect a key name that no longer exists. Before each change, back up the files and the database, record the vault state, and test the full rollback on a staging instance that mirrors production settings. The SuiteCRM migration documentation advises the same staging-first approach and warns that customizations under the public/legacy folder can be affected, so review those files during the test as well.
Questions teams ask before storing SuiteCRM secrets in a vault
Can a small team store SuiteCRM secrets in a vault without outside help?
Yes, if one or two engineers already run the instance and can read Symfony's secrets documentation for their version. The work is mostly config changes, a decryption key handled with care, and a deployment step that sets the right values per environment. The harder part is usually confirming which settings your SuiteCRM 8 build reads from the vault and which still need plain environment variables. Teams without a staging instance, or without anyone who has deployed SuiteCRM before, tend to find outside help worth pricing. A written scope from DeployOpen would list the environments, identity providers and secret types covered before any work starts.
What makes the vault work take longer or cost more?
Effort rises with the number of environments, since each one needs its own values and its own deployment check. It also rises with the number of identity providers and with whether LDAP and SAML both run, because each adds settings that hold credentials or certificates. Existing secret tooling matters too: if your organization already runs a vault or CI secret store, the work is integration rather than a fresh design. Finally, count how many secrets currently sit in plain env files and how many places copy them, such as build pipelines and chat logs. Ask any quote to list each of these as a separate line.
What do we need to provide before the work starts?
Three things matter most. First, admin access to the identity provider, so the SAML signing certificate and metadata can be confirmed and, if needed, rotated during the change. Second, a staging SuiteCRM instance that matches production closely enough to test login and a full deployment. Third, a named owner for the Symfony decryption key, who controls where it is stored and who can read it. That owner should be someone who stays in the role, not a shared mailbox. Without these, the change can only be tested in production, which raises risk.
How is the cost of this work structured?
Most engagements of this kind are fixed-scope, so the one-time setup is priced against a written scope that names the environments, settings and deployment steps covered. That covers design, configuration, testing on staging and the production change. Recurring work is separate: rotating secrets, rotating the SAML certificate when it expires, and rotating the decryption key on a schedule your policy sets. Ask any quote to show the one-time and recurring parts apart, and to state who performs rotation after handover. Ongoing support is available as a retainer if your team wants that.
How long does a change window for moving secrets into the vault take?
The window depends on how many environments and identity providers you have, and on how confident the team is in staging results. Plan for a longer window when the production change touches SAML or LDAP settings, because a bad value can lock users out of sign-in. A shorter window is possible when staging has already run the same deployment and the rollback steps are written down. Ask for the planned sequence and rollback plan in writing before agreeing a date. No fixed duration is given here because it depends on your environment.
Which settings can I confirm are vault-backed in my SuiteCRM version?
Do not assume every setting supports the vault. Check each one against the configuration reference for your SuiteCRM 8 release: the LDAP settings for the AUTH_TYPE=ldap path and the SAML settings for the AUTH_TYPE=saml path. For each setting, confirm whether it is read as a secret, whether it can be overridden per environment, and whether a deployment rebuilds the value correctly. Record the answer in a table with the release number, so the next upgrade can recheck it. Where the documentation is unclear, test the setting on staging before relying on it.
Does SuiteCRM Ltd support or a SuiteASSURED package change the work?
A support package from SuiteCRM Ltd, such as SuiteASSURED, changes who answers product questions, not what your team must configure. It does not replace the vault design, the environment split or the decryption key ownership. Ask the vendor whether they will review secret handling settings for your version, and whether a support ticket can cover a failed deployment that involves the vault. Confirm these points in writing before assuming they are included. DeployOpen's work is set by its own written scope, independent of any vendor support contract.
What to confirm in your environment before relying on the vault
The vault only protects secrets if the rest of your SuiteCRM setup reads from it, keeps its key safe and survives your backups and hosting model. Work through these checks in your own environment, because the answers depend on your release, identity provider and infrastructure.
Release and PHP version
Confirm the exact SuiteCRM 8 release your instance runs and the PHP version under it. Check both against the SuiteCRM 8 compatibility matrix before you change how secrets are loaded, since the vault behavior you rely on should match the release you deploy. Record the versions in your change ticket so a later upgrade can be tested against the same baseline.
Compatibility matrixSAML and LDAP settings source
Check whether each SAML and LDAP value, including the private key, is read from the vault or still comes from a plain environment variable. Review the SAML and LDAP configuration references for the exact keys your release expects, then search your deployment files and running container for any leftover copies. A value that exists in both places is only as safe as the weaker copy.
SAML configuration referenceDecryption key storage and recovery
Find out where the vault decryption key lives, who can read it and how it is recovered if the server is rebuilt. A vault whose key sits next to the encrypted file offers little protection, and a key that exists only on one machine can lock the team out of its own credentials. Write down the custody process and test a recovery on a staging instance.
Process and container exposure
Confirm whether your hosting platform, container runtime or orchestrator exposes environment variables, mounted files or the decryption key to other processes, sidecars, logs or people with cluster-level access. Inspect the running PHP-FPM or worker processes and the deployment manifests. Exposure through a debug page or a process listing defeats the vault even when the stored file is encrypted.
Backup handling of vault files
Check how your backups treat the encrypted vault file, the decryption key and the database that holds SuiteCRM settings. Decide whether the key is backed up separately from the vault, who can restore it and whether restored copies are subject to the same access rules. Test a restore on a staging instance to confirm the instance starts with the secrets it needs.
Signing key rotation support
Ask your identity provider whether it supports the signing key rotation you plan, including publishing a new certificate alongside the old one for a transition period. Then confirm that SuiteCRM can be updated with the new private key through the vault without a service outage. Check your identity provider's documentation and test the rotation end to end in staging, including the logout behavior, since SAML logout at the identity provider does not end the SuiteCRM session.
SAML settings referenceHow DeployOpen works on this
DeployOpen scopes the move of SuiteCRM 8 credentials such as SAML private keys into the Symfony secrets vault as a written, fixed-scope piece of work. The work covers per-environment values, the deployment steps that read them, and a handover your team can repeat after the engagement ends.
How we scope
- Inventory every SuiteCRM credential currently held in env files, including SAML keys, database and mail passwords
- Agree which environments (development, staging, production) get separate secret values and who holds decryption keys
- Record the deployment pipeline, container or server setup and any backup jobs that must read the secrets
- Put the scope, deliverables and timeline in writing before any change is made to your instance
How we build
- Move each credential into the Symfony secrets vault and remove plaintext copies from tracked files and shared env files
- Set per-environment values and confirm that production secrets are not readable from development or staging
- Test login, SAML sign-on and a test deployment on staging before any change reaches production
- Check that the migration or upgrade steps you run still work with the vault in place
How we hand over
- Document the vault commands, key storage locations and the exact steps for rotating a secret
- Deliver a runbook for deployments that lists which secrets must exist in each environment before a release
- Walk your platform and security staff through rotation and recovery so they can run it without us
- Provide a retest record showing the final state of secrets, env files and access to the vault
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer if you want DeployOpen to keep the setup current
- Review the vault setup again when you change SuiteCRM minor versions or the SAML configuration
- Confirm with your team which parts of rotation and key custody stay with your own staff after handover
- Agree any retainer scope and fees in writing alongside the original engagement

