Repository navigation
Manticore Search authentication rollout checklist for production #4948
githubmanticore
announced in
Blog
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Originally published on the Manticore Search website on July 16, 2026
Manticore Search authentication rollout checklist for production
A practical checklist for migrating standalone, distributed, and replicated Manticore Search deployments to authentication without losing access or cluster state.
In production, "turn it on and done" almost never works. On a standalone node, the technical sequence is short: enable
auth, restart Manticore, create an admin user, and update clients. A topology with distributed tables or replication clusters needs extra preparation because nodes must authenticate to each other as well.Handle the rollout like a small release. Inventory clients and nodes, prepare the auth data, rehearse the procedure for your topology, and then cut over. A rehearsal exposes failures before the maintenance window.
This checklist is for users who plan to enable authentication and want to roll it out as safely as possible in an existing system. Remember that authentication is disabled until you configure
auth; after cutover, clients that still omit credentials will fail.Choose the procedure by topology:
authPhase 1: inventory before changing anything
Start by listing every client that connects to Manticore Search, including each application and independently deployed application component. Do this before editing the config.
Common things to check:
For each client, record something like this:
productsreadproductswriteproductsschema*adminThen confirm the deployment basics:
pid_fileconfigured in the config? Bootstrap needs it.If replication is present, also record every cluster name and its persisted
userin each node's/manticore.json. Back up the complete data directory, configuration, and any existing auth store before the rehearsal and again before production cutover.Do not skip the credential-handling questions.
CREATE USERreturns a raw Bearer token;TOKENgenerates a new token for the specified user.SHOW TOKENlater shows the stored token hash, not the raw token. If the raw token is lost, rotate it withTOKENand update the token in your application.Phase 2: set up least-privilege users
Create users based on specific workloads, rather than granting permissions based on what someone might need later.
Use a small matrix like this:
app_readGRANT read ON 'products' TO 'app_read'app_ingestGRANT write ON 'products' TO 'app_ingest'schema_jobGRANT schema ON 'products' TO 'schema_job'security_adminGRANT admin ON * TO 'security_admin'cluster_replGRANT replication ON 'posts' TO 'cluster_repl'Keep in mind that
adminis a narrow permission. It only allows managing authentication and authorization state; it does not implyread,write,schema, orreplication.That matters because a person who manages credentials does not automatically need to read business data. A service that searches products does not need to write documents. A migration job does not need to manage users.
Plan negative permission tests as well. For every user you create, choose at least one thing it should be able to do and one thing it should not be able to do.
Examples:
app_readcan searchproducts.app_readcannot insert intoproducts.app_ingestcan write toproducts.app_ingestcannot manage auth.schema_jobcan change schema forproducts.schema_jobcannot read tables unless you grantread.Phase 3: test in staging
Use a staging environment to rehearse the sequence of steps you plan to follow in production.
In RT mode:
searchd { data_dir = /var/lib/manticore auth = 1 auth_log_level = info ... }To turn auth off explicitly in RT mode:
searchd { data_dir = /var/lib/manticore auth = 0 ... }In plain mode:
searchd { auth = /var/lib/manticore/auth.json auth_log_level = info ... }Keep the auth file private. Before the first bootstrap, Manticore may create an empty auth file. After bootstrap, that file stores auth data and credential hashes.
This bootstrap sequence works on a standalone node or on an isolated temporary daemon that prepares auth data for several nodes. Never start an existing replication data directory with an empty auth store. Its persisted cluster user will be missing, and Manticore may skip the cluster descriptor.
Start
searchd, then bootstrap the first administrator:For scripted setup:
Bootstrap creates the first administrator with all actions, including
replication; no additional grant is needed. The command does not return a bearer token. If the administrator needs HTTP Bearer access, connect as that user and runTOKEN, or use the HTTPPOST /tokenendpoint.For a multi-node deployment, create the auth store once. Use a temporary daemon with its own empty data directory, PID file, and listeners. Bootstrap the administrator and shared service users, then stop the daemon cleanly. Copy the resulting auth store to every participating node before enabling authenticated node-to-node traffic. Do not recreate the same users independently: matching names and passwords can still produce different stored authentication material.
Next, create staging users based on the notes from the previous phases. For example:
Store the returned Bearer tokens in secure storage. Remember: raw tokens must not be left in logs, shell history, or unprotected files. If you need to rotate one, use:
TOKEN 'app_read';SHOW TOKENis not a way to recover the raw token:SHOW TOKEN FOR 'app_read';Review users and permissions:
SHOW USERS; SHOW PERMISSIONS; SHOW PERMISSIONS FOR 'app_read';Run one allow and one deny test for every user. For the read-only user:
Then verify that an unauthorized operation is denied:
For this HTTP request, expect a
403 Forbiddenresponse. Over SQL/MySQL, a permission denial returnsERROR 1045with a permission-denied message.SQL clients should connect with a Manticore user name and password. The SQL/MySQL protocol in Manticore supports
mysql_native_password.MYSQL_PWD=ReadPass#2026 \ mysql -h127.0.0.1 -P9306 -uapp_read \ -e "SELECT * FROM products LIMIT 10"HTTP clients can use Basic authentication or Bearer tokens:
curl -u app_read:ReadPass#2026 \ https://mnt.cr/go/HEgxlN \ -d "SELECT * FROM products LIMIT 10"HTTP authentication schemes (
Basic,Bearer) are case-insensitive; user names are case-sensitive.If you edit the auth file outside the daemon during maintenance, reload it:
Phase 4: production rollout checklist
Use this checklist for every deployment, then follow the procedure for your topology.
manticore.jsonand the existing auth store separately.pid_fileis set in the config.Standalone node
For a standalone node, the direct bootstrap sequence is sufficient:
authand startsearchd.searchd --config --auth.Distributed tables and remote agents
Distributed queries send remote-agent requests as the current session user. Each remote node must have the same stored authentication material for that user and grant the required permission on the remote table.
For a new rollout across distributed nodes:
authand place the same canonical auth store on every participating node. Preserve restrictive ownership and permissions, and compare checksums.Create shared users only once. Independently created accounts can have different stored authentication material even when their names and passwords match.
Existing replication cluster
Moving an existing unauthenticated replication cluster to auth requires a coordinated restart. Do not enable
authand bootstrap the first user against the existing cluster data. The empty store does not contain the persisted cluster user, so Manticore may skip the cluster descriptor.Use this sequence:
While the unauthenticated cluster is healthy, choose its future replication identity and persist it:
UPDATE userwrites the name to the cluster metadata. Authentication is still disabled, so Manticore neither creates nor checks the account at this point. Create it in step 3, before restarting any real cluster node with authentication enabled.Verify that every node's
/manticore.jsonnow stores"user": "cluster_repl"for the cluster. If a node hosts several clusters, update each cluster to a user that will exist in the new auth store, or create and grant every persisted user before cutover.Stop all cluster nodes cleanly and use the replication state to select the safe primary. After a clean shutdown, this is normally the node stopped last, with
safe_to_bootstrap: 1in its/grastate.dat. See Restarting a cluster.Bootstrap
cluster_replas the first administrator in the isolated temporary daemon. The first administrator already has every action, includingreplication, so it needs no additional grant. If the cluster will use a separate least-privilege identity, create it once and grantreplicationbefore distributing the store.Stop the temporary daemon. Configure
authon every real cluster node and copy the exact generated auth store to each one. Keep the files private and byte-identical. Do not start a real cluster node before this store is in place.Restart a two-node cluster in this order:
closedat this point; do not write to it.--new-cluster, or use the correspondingmanticore_new_clusterservice action.cluster_products_status=primaryandcluster_products_node_state=synced.primaryandsyncedvalues on that peer. Never use--new-clusteron it.The safe primary reads the persisted cluster user from a descriptor peer during startup, so the initial peer must already be listening. Starting the safe primary alone can fail with
failed to fetch donor user from any nodeeven when the auth store is correct. For a larger cluster, rehearse the sequence in staging. Use one non-primary node as the initial metadata peer, establish the safe primary, and then start or restart the remaining peers normally.On each node, check that the cluster component is primary, the local node is synchronized, and the pre-migration data is present:
Wait until the two status values are
primaryandsynced, respectively, before treating the node as writable.Before returning traffic, make a disposable one-row table and add it to the recovered cluster:
Confirm that the peer returns one row from
products:migration_control. If this check fails after the pre-migration data checks passed, investigate table transfer rather than the migration itself.After the cluster is healthy, create the remaining administrative users and, if needed, a dedicated least-privilege replication user. Change the stored cluster identity only after the new user and its auth data are visible on every node:
Do not remove the bootstrap administrator until another administrator and the final replication identity have both been verified.
When a node joins an authenticated cluster, the donor's auth data replaces the joining node's local auth data. At
infoor a more verbose auth log level, Manticore writes the previous data tosearchd.log.authas a backup. The log can contain salts and credential hashes, so restrict access and redact it before sharing.Authentication logging during cutover
Authentication events are written to a separate auth log when authentication is enabled. If the daemon log is
/var/log/manticore/searchd.log, the auth log is/var/log/manticore/searchd.log.auth.The
auth_log_levelvalues are:disablederrorwarninginfoalltraceThe default is
info. Start there unless you have a reason to reduce or increase the logging detail. Usetraceonly for diagnostics; it also includes all successful internal auth traffic.Useful cleanup and maintenance commands:
SET PASSWORDchanges the password used by SQL/MySQL and HTTP Basic auth. It does not revoke existing bearer tokens. To rotate Bearer access, create a new token withTOKENorPOST /tokenand update the client.Phase 5: rollback and troubleshooting
For a standalone node, restore the previous configuration and network restrictions, restart Manticore, and revert the client configuration if necessary.
Roll back all communicating nodes together. A mix of authenticated and unauthenticated nodes will not work. Restore the same configuration and auth state on each node, then restart remote agents before their masters.
Keep the pre-cutover
manticore.jsonbackup for every replication cluster. If a node started with auth before the persisted cluster user existed, stop it and compare the current descriptor with the backup. A clean stop may have saved the skipped state without the cluster descriptor; restore the backed-up descriptor before retrying. Do not recreate clustered tables or delete their data.Do not delete the rollout notes. They are usually the fastest way to see which client was updated, which token was stored where, and which permissions were created.
mysql_native_password.Authorizationheader and whether the client uses Basic auth or Bearer token auth.SHOW PERMISSIONS FOR ''.TOKEN '', store the returned token, and update the client.read,write,schema,replication, oradmin.WITH ALLOW 0rules.replicationmanticore.json,SHOW PERMISSIONS, and the pre-cutover backup before restarting.failed to fetch donor user from any nodesearchd.log.authon both nodes.Permission rules are determined by action type. When rules conflict, an explicit deny always takes precedence over an allow, even if the allow is more specific. If no matching allow exists, access is denied.
Final check
Before calling the rollout done, confirm that:
SHOW TOKENdoes not return the raw token, but shows its hash; useTOKENor the HTTP endpoint to get a new token.synced, and its existing data is present on every node.We wish you a smooth authentication and authorization rollout!
All reactions