Why the OpenSearch demo security configuration must be replaced
The OpenSearch demo security configuration is meant for evaluation, so a cluster that started with it must have that setup replaced before it holds real data. The install-time script, install_demo_configuration.sh, is a convenience for trying the Security plugin, not a production baseline. Replacing it means reviewing every identity, certificate and access rule the script created and deciding which ones your organization will own.
The demo configuration tool loads demo users, roles, role mappings, audit settings, tenants and allow lists into the security index, which is the store the Security plugin reads its rules from. It also generates demo certificates and edits opensearch.yml, so the file on each node may carry settings you did not write yourself. Before you change anything, export the current state and list each item, so you know what to remove, what to keep and what your identity provider must replace. The demo configuration documentation lists the artifacts the tool creates and is the reference to check your list against.
Treat the replacement as a gate, not a cleanup task. Teams should complete it before onboarding users, before ingesting regulated or sensitive data, and before the cluster is reachable from any network beyond the host it was installed on. Certificates from the demo script are documented as unsuitable for production, so a cluster on the demo PKI must not be exposed or used for real workloads. Confirm the replacement plan with your security and compliance owners before the first real data load, because reversing a live exposure is harder than preventing one.
What install_demo_configuration.sh creates and changes
The demo installer adds a set of accounts, access rules, audit settings and certificates to a cluster in one run. Use these cards to inventory what your cluster received, then remove or replace each item before the cluster holds production data.
Demo users
The installer loads demo user accounts into the security index, each with a known default password. Any account still present after installation is a credential an attacker can try against your cluster. List every user in the security index, delete the demo accounts, and create named accounts or connect an identity backend before anyone signs in with production access. Confirm that no demo account can reach a production index.
Demo configuration docsDemo roles
Demo roles define index, cluster and tenant permissions that the demo users inherit. Their names and permission sets may not match your access model, and some grant broad rights that were convenient for a test setup. Review each role's cluster and index patterns, then delete or rewrite them to match the access your teams need. Check that no role is granted to a backend role your identity provider will populate.
Role mappings
Role mappings connect users and backend roles to the roles above. The demo mappings tie demo accounts to demo roles, so removing the users alone leaves the mapping file in place. Export the current mappings, delete the demo entries, and recreate mappings from the identity groups you plan to use. Confirm that each production group maps to the smallest role set that covers its work.
Audit settings
The installer applies demo audit settings to the security index. Audit logging is how you prove who read or changed data, so these settings decide what is recorded and where. Review which categories are enabled, whether requests and responses are logged, and which users or indices are excluded. Verify that audit events reach a store your security team controls and that retention matches your logging requirements.
Demo tenants and allow lists
Demo tenants create Dashboards spaces for sample teams, and allow lists control which API paths and actions are permitted for given users. Both are loaded into the security index and both can outlive the demo users. Delete demo tenants that hold saved objects you do not want to keep, and review each allow list entry against the endpoints your automation actually calls. Remove any entry that exists only for a demo workflow.
Demo certificates and opensearch.yml edits
The installer generates demo certificates and edits opensearch.yml to point nodes at them. The demo certificates are not suitable for production, and the edited file can keep demo-specific settings after the certificates are replaced. Compare opensearch.yml with the configuration you wrote before installation, replace the certificates with ones from your own PKI, and confirm that the trust chain and hostnames match each node. Record the changes in version control so they are reproducible.
Security best practicesAdmin password rules and replacing demo certificates
Certificates created by install_demo_configuration.sh are not suitable for production, so the first security change on a cluster is replacing the demo certificates with ones issued by your own PKI. The OpenSearch security best practices state this directly. Decide before you start which certificate authority signs the node and REST certificates, which admin certificate will be used by securityadmin.sh, and how the certificate chain and trust store will be distributed to every node and to Dashboards. Confirm with your PKI team that the certificates carry the subject and Subject Alternative Name entries your hostnames require, because a mismatch here will block node-to-node and client connections only after the cluster restarts. Plan the restart window for this step, since the transport and HTTP settings in opensearch.yml change with the certificates.
The admin password is the other item to change before the security index is reloaded. Use the password rules your organization applies to privileged accounts, and do not reuse the demo password, which is publicly documented in the install guide. Confirm the current minimum length, character rules and hashing requirements in the OpenSearch security documentation for your exact version, because these rules are version-specific and this page does not restate them. Store the new password in your secrets manager before you apply it, and record which system holds the admin certificate and password so that recovery does not depend on one person's workstation. Remove or lock any other demo accounts so they cannot be used to sign in after the change.
Verify the change in order: confirm each node presents the new certificate, sign in with the new admin credentials, and check that the demo users no longer authenticate. Only then reload the security index with the updated configuration, because reloading before the certificate and password changes are in place can lock out the administrator. Keep a copy of the previous certificates and the security configuration files until the cluster has passed these checks, so that you have a documented rollback path.
Choosing how to replace users, roles and mappings
A cluster that has never held production data is the simplest case. Nothing yet depends on the demo accounts, so the main risk is leaving them in place by accident. The work is to replace the local model before any client or person reaches the cluster, then confirm that the demo material is gone.
- What changes: remove the demo users, roles and role mappings from the security index, then create your own local users, roles and mappings before the first connection.
- Certificates: replace the demo certificates that the installer generated with certificates from your own PKI before the node is used on any shared network. The demo configuration documentation lists what the installer creates.
- Who must be told: the security team, the platform owners who will hold the administrator credential, and any team that will receive a service account.
- Rollback position: rebuilding the cluster is usually the rollback, because no data depends on the configuration. Confirm this holds if the test cluster already has indexes that someone plans to keep.
Before you finish, check that no demo account can authenticate on any reachable endpoint and that no test index is carried into production by mistake.
A cluster already serving users has dependencies that an empty cluster does not. Application service accounts, Dashboards users and their saved objects can all break if roles change without warning. The change should follow an agreed window, add the new access model first, verify it, and only then remove the old access.
- What changes: create and test the new accounts and roles while the demo or existing accounts still work, then remove the demo material. This avoids a moment where no administrator can sign in.
- Keep an administrator path: confirm at least one working administrator credential exists before anything is removed, and document a break-glass account that the security team controls.
- Who must be told: application owners whose service accounts or roles change, the on-call team, and Dashboards users whose access or tenants may move.
- Rollback position: take a snapshot and export the current security configuration before the change. Test that the snapshot repository works and that the export can be reapplied in a non-production copy, because an untested rollback is not a rollback plan.
Before you finish, check that existing application credentials still authenticate, that scheduled jobs and pipelines still write, and that the saved export can restore the previous state.
A multi-node cluster managed through infrastructure code applies the security configuration across several nodes through automation. Changes should be made in version control, reviewed and applied by the pipeline, so that the repository stays the record of what the cluster is supposed to contain.
- What changes: update the source files for users, roles, mappings and certificate inputs in the repository, then let the pipeline apply them. Avoid editing live nodes by hand, since the next pipeline run will overwrite those edits or leave the cluster in an unknown state.
- Certificates across nodes: plan certificate rotation in an order that keeps every node trusting the certificate authority in use. Confirm that each node trusts the new authority before the old one is removed.
- Who must be told: the team that owns the automation, the change approvers, and the security team that reviews the access model.
- Rollback position: reverting the commit and rerunning the pipeline is the usual path. Confirm that the revert also updates the security index, since file changes alone may not, and run that test in a non-production cluster first.
Before you finish, check that the live cluster matches the repository state and that the rollback has been exercised outside production.
How to apply the production security configuration
This sequence moves an OpenSearch cluster from the install-time demo security setup to a production configuration with your own certificates, credentials, roles and mappings, applied through the security index and verified before the demo accounts are removed.
Inventory every demo object before changing anything
Start by listing what the demo tool created: demo users, roles, role mappings, audit settings, tenants, allow lists, the generated demo certificates, and the edits it made to opensearch.yml. Export the current security index contents and keep a copy of the original opensearch.yml and certificate files, so you can compare later and roll back if needed. The security owner and the platform engineer should both sign off on the list. The step is done when every demo object is matched to a production decision or marked for removal.
Generate or obtain production certificates
Issue node, REST and admin certificates from your own PKI or an approved internal certificate authority. The demo certificates are not suitable for production, so they must be replaced rather than reused. Confirm that subject names and subject alternative names match each node's hostname and the load balancer address, and that the admin certificate is kept out of general use. The step is complete when each certificate chains to your CA and passes a validation check against the target hostnames.
Replace the admin and service credentials
Set a new admin password that meets the password rules in the OpenSearch security configuration, and store it in your secrets manager. Create separate credentials for each pipeline, monitoring agent and automation account, rather than sharing one login. Confirm the new password against the documented rules in a test login before you rely on it. The step is complete when the admin and service accounts can be authenticated with the new credentials and the demo admin password is no longer used by any process.
Define roles and role mappings
Write the roles that each team needs, with index permissions limited to the patterns they use, and map backend users or groups to those roles in the role mappings file. Keep the admin role for a small named group and avoid mapping broad roles to everyone. Record each role's purpose so reviewers can check it later. The step is done when each planned role has a written purpose and a mapping, and the mappings reference only identities your backend actually provides.
Update the security configuration files
Edit the security YAML files for authentication backends, users, roles, role mappings, tenants and audit settings so they reflect the production design. Remove demo users and any demo-only tenants or allow lists. Update opensearch.yml to point at your production certificates and keystores, and reverse the demo edits the installer made. Keep the files in version control so changes can be reviewed. The step is complete when the files contain no demo entries and a review confirms every setting matches the design.
Apply the configuration with the security admin tool
Restart or reload the nodes so the new transport and REST certificates are in place, then load the updated YAML files into the security index with the security admin tool, authenticating with the admin certificate. Check the tool output for errors and confirm that the configuration was written. The step is done when the tool reports success and the cluster health remains green or the expected status after the nodes come back.
Verify logins, role access and audit logging
Create a test user mapped to a single non-admin role. Confirm that it can sign in through the intended backend, can read only the indices and fields its role allows, and is denied writes or other indices it should not reach. Then check that the audit log records the login attempts and the denied requests as configured. Repeat the test for each major role. The step is complete when every test produces the expected allow or deny result and the matching audit entries.
Disable or remove the demo accounts
Once production logins and role tests pass, remove the demo users from the security configuration and reapply it, or disable them if your process requires keeping them for a short period. Confirm that the demo accounts and their default passwords no longer authenticate, and record the date and reviewer in your change log. Keep the test accounts only where your process requires them, and remove them when testing ends. The step is done when a login attempt with each demo account fails and the change is recorded.
How the security configuration moves from files to the cluster
The flow starts with the demo state, where install_demo_configuration.sh has loaded demo users, roles, mappings, tenants and demo certificates into the cluster. Replacing certificates comes first, then the security YAML files are edited and applied to the security index with an admin certificate. The last checks confirm that the new configuration is live and that client traffic uses your certificates, not the demo ones. The admin certificate sits on the trust boundary between configuration changes and client traffic.
Demo state becomes production security through certificates, YAML files and the security index.
Security and operational risks during the switch
Swapping the demo configuration for production settings touches accounts, certificates and the security index at once, so a mistake can lock out administrators or leave a known credential live. Each card below names one risk and the control that prevents it, and the checks to run before and after the change.
Demo accounts left active
The demo configuration creates demo users, roles and role mappings in the security index. If those accounts remain after go-live, anyone who knows the published demo credentials can sign in to a production cluster. Before cutover, list every user in the security index, delete or disable each demo account, and confirm that no demo role mapping still grants access to production indices. Then test login with each demo name and confirm it is refused.
Demo configuration docsDemo certificates in trust stores
Certificates generated by the demo installer are not suitable for production. If applications, clients, or other services still trust the demo certificate authority, they will accept connections from any host presenting a certificate signed by it. Replace the certificates with ones from your own PKI, then remove the demo CA from every application trust store, load balancer and monitoring agent that references it. Confirm that connections fail when the demo chain is presented.
Security best practicesAdministrators locked out on reload
The security configuration is applied from YAML files to the security index, and a bad admin mapping can remove the only account able to make further changes. Before applying new roles or mappings, confirm that a certificate-based admin identity from your own PKI is mapped to an admin role and works in a test session. Keep the previous configuration files so you can reapply them, and keep a break-glass path that does not depend on the change being reviewed.
Mismatched node certificates
If only some nodes receive new certificates, the cluster can fail to form or can split during a rolling change, because nodes validate each other's transport certificates. Issue the full set of node and admin certificates from the same CA, roll them out to every node, and check the distinguished names against the node certificate mapping before restarting. Verify cluster health and node membership after each node restarts, and stop the rollout if any node fails to join.
Audit visibility lost in transition
Audit settings come from the demo configuration, and the cutover can silently replace them with defaults or disable them. If audit logging stops, you lose the record of who changed roles, who signed in and who was denied access during the switch itself. Confirm the audit configuration after applying the new settings, and check that events from the security change and from test logins arrive in the destination you monitor. Keep a copy of the pre-change audit state.
Partial config applied across environments
Demo files applied in one environment and production settings applied in another create drift that is hard to see from inside the cluster. A role that exists in staging but not production, or a mapping that was changed by hand, breaks access checks after the next deployment. Record the exact security configuration files used for each environment, apply them from version control, and compare the live security index with those files after each change.
What to confirm in your environment before cutover
Which OpenSearch version is my cluster running, and is it still in maintenance?
Start by confirming the exact version string from your cluster, then check its maintenance status on the OpenSearch releases page. Versions stay under maintenance until the next major version enters maintenance or one year passes, whichever is longer. During maintenance, a version receives bug fixes and security patches but no new features. Version 1 reached end of life on May 6, 2025, and version 2 is maintained through the 4.0 GA release. The security configuration files and securityadmin.sh options can differ between releases, so the version determines which documentation you follow. If your version is near end of maintenance, plan the upgrade before or alongside the security change rather than after it.
Which file set and tool options apply to my exact OpenSearch version?
Use the demo configuration and security documentation for your version, not the latest page by default. The demo script loads demo users, roles, role mappings, audit settings, tenants and allow lists into the security index, generates demo certificates and edits opensearch.yml. Before cutover, list every file the script changed on your nodes and every security index entry it created, then confirm which of those your version expects you to replace. Check the flags and paths your version's tooling accepts, and ask the vendor documentation whether any default has changed. Record the answers in your change ticket so the cutover runbook matches the release you run.
Is TLS for REST enabled, and what does my cluster currently use?
Confirm whether REST-layer TLS is on for every node and whether clients connect over HTTPS only. Check plugins.security.ssl.http.enabled and the certificate chain presented on port 9200, and record which clients, scripts, pipelines and Dashboards connections depend on plaintext or on the demo certificate authority. Node-to-node transport TLS is a separate setting and must be verified too. Ask the vendor documentation how to enable REST TLS with your own certificate authority and how the admin certificate is used by securityadmin.sh. Test each client after the change, because a client that trusts only the demo CA will fail once the demo certificates are removed.
How will certificates be issued, rotated and replaced in production?
Decide the certificate authority, who issues node, REST and admin certificates, and how long each lasts before you start the cutover. The vendor's security best practices state that certificates generated by the demo script are not suitable for production and should be replaced with your own. Confirm the key format your version expects, the keystore or PEM file paths, and whether a restart is required after replacement. Document the rotation procedure in the same runbook as the cutover, and ask the vendor documentation how to rotate certificates without a full cluster outage. Expiry dates should be tracked from day one, since an expired node certificate can stop cluster communication.
Does my cluster run on containers, packages or the Kubernetes operator?
The install method decides where files live, how configuration is applied and how a rollback works. OpenSearch documents installation with Docker, Helm, the OpenSearch Kubernetes Operator, tarball, RPM, Debian packages, an Ansible playbook and Windows. For containers and operators, the security configuration is often baked into images, mounted as secrets or applied through a job, so the demo files may be restored on every pod restart unless you change the source. For packages and tarballs, edits to opensearch.yml and the security directory persist on the host but must be applied on every node. Confirm your install method with your platform team and ask the vendor documentation for the supported procedure for that method before any file is changed.
Who owns the admin password and the admin certificate after cutover?
Name the owner of the admin credentials before the demo accounts are removed, because the admin certificate is what allows securityadmin.sh to push configuration changes. Confirm the password rules your version enforces for the admin account and where the password will be stored, such as a secrets manager you control. Check whether the demo admin password is used by any monitoring, backup or automation job, since those jobs will fail after the change. Ask the vendor documentation how to reset the admin password if access is lost, and record who can perform that reset under your access policy.
What rollback plan do I need if the new security configuration fails?
A rollback plan should exist before any demo file is removed. Take a snapshot of the security index and a copy of the security directory and opensearch.yml on every node, then confirm how your version restores them. Ask whether a snapshot of the security index can be restored and whether the cluster can be reconfigured without the admin certificate if that certificate is wrong. Test the rollback on a non-production cluster that uses the same version and install method. Keep a named owner for the decision to roll back and a time limit for the cutover window, both agreed with the business owners of the cluster.
How DeployOpen works on this
DeployOpen plans and implements self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For this work, we start from your current demo-configured cluster, agree the replacement identity, certificate and role model in writing, then apply and verify it in your environment.
How we scope
- Inventory every demo user, role, role mapping, tenant and allow list still present in your security index
- Agree in writing which certificates, identity backends and admin accounts replace the demo set
- Confirm the admin password rules, storage location and who holds each credential before work starts
How we build
- Replace demo certificates with certificates issued from your own PKI, with the trust chain checked on every node
- Rebuild users, roles and role mappings from your access model, then apply the configuration and verify each role
- Test admin login, node communication and Dashboards access against the new settings before the demo accounts are removed
How we hand over
- Deliver a written record of each removed demo component, the replacement it received and where it is stored
- Document the procedure for applying future security configuration changes and who approves them
- Walk your platform and security teams through the verification results and the open items they own
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover
- Retest the security configuration after OpenSearch version upgrades or certificate rotation
- Scope any follow-on work, such as SSO or tenant design, as a separate written engagement

