Page MenuHomePhabricator

OpenSearch on K8s: Create separate user for the OpenSearch operator
Closed, ResolvedPublic

Description

As it stands today, the OpenSearch operator and the human admin user share the same username. This is not ideal from a security or auditing standpoint, so let's:

  • Create a separate user for the operator
  • Verify that the operator logs in with that user instead of the human admin's user.

Event Timeline

This Slack thread contains some useful links about how the operator connects to the cluster, where it gets the creds, etc.

At a high level, I think we can achieve our goal by:

  • Tweaking secret.yaml so it creates 2 separate admin users:
    • A hard-coded operator user, and
    • A dynamically-generated human user

I think I'd prefer to have the operator user auth via mTLS since that doesn't require keeping track of secrets in private puppet. I'll study the linked code and discuss this with further with my colleagues.

Change #1201104 had a related patch set uploaded (by Bking; author: Bking):

[operations/deployment-charts@master] WIP: opensearch-cluster: Add operator user

https://gerrit.wikimedia.org/r/1201104

Change #1202769 had a related patch set uploaded (by Bking; author: Bking):

[operations/deployment-charts@master] opensearch-cluster: create separate user for operator and admin

https://gerrit.wikimedia.org/r/1202769

Change #1202769 merged by Bking:

[operations/deployment-charts@master] opensearch-cluster: create separate user for operator and admin

https://gerrit.wikimedia.org/r/1202769

bking changed the task status from Open to In Progress.Nov 6 2025, 11:09 PM
bking claimed this task.
bking triaged this task as Medium priority.
bking updated Other Assignee, added: RKemper.
bking updated the task description. (Show Details)

I've redeployed opensearch-test and opensearch-ipoid-test clusters after merging the above changes, and I can confirm that both the`operator` and opensearch user are created correctly. I've also confirmed that I can create indices with the opensearch user:

curl -H "Content-type: Application/json" -u ${OS} -XPUT https://opensearch-test.discovery.wmnet:30443/enwikibooks -d @mapping.json

and retrieve them: curl -XGET -u ${OS} https://opensearch-test.discovery.wmnet:30443/enwikibooks?pretty

As such, I'm closing out this ticket.

Change #1201104 abandoned by Bking:

[operations/deployment-charts@master] WIP: opensearch-cluster: Add operator user

Reason:

superseded by 1202769

https://gerrit.wikimedia.org/r/1201104