Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2.12.0] Ensure CI/documentation reflect changes to default admin credentials #703

Closed
2 tasks
DarshitChanpura opened this issue Jan 18, 2024 · 3 comments
Closed
2 tasks
Assignees

Comments

@DarshitChanpura
Copy link
Member

Background

Previously, when installing the security plugin demo configuration, the cluster was spun up with the default admin credentials, admin:admin. A change was made in main and backported to 2.x for the 2.12.0 release, which now requires an initial admin password to be passed in via the environment variable OPENSEARCH_INITIAL_ADMIN_PASSWORD. This will break some CI/testing that relies on OpenSearch to come up without setting this environment variable. This tracking issue is to ensure compliance with the new changes.

Coming from: opensearch-project/security#3624

Acceptance Criteria

  • All documentation references to the old default credentials admin:admin are removed
  • Ensure that CI/testing is working with main and 2.x branches
@prudhvigodithi
Copy link
Member

[Triage]
The Operator does not run install_demo_configuration.sh and logs the message /usr/share/opensearch/config/opensearch.yml seems to be already configured for Security. Quit.. The operator does security setup for the cluster. However the default username and password is admin:admim, but the user can always change this with Custom Admin User, this feature is already in operator for quite a long time and can change the password during and after the cluster startup.

I have tested with the latest 2.12.0 latest RC using the docker image opensearchstaging/opensearch:2.12.0.9399 and was able to access the cluster without any error and works as expected with Custom Admin User.

Sample test log when changing the password with Custom Admin User

curl https://localhost:9400 -k -u admin:test    
{
  "name" : "pgcluster-masters-0",
  "cluster_name" : "pgcluster",
  "cluster_uuid" : "1yrQzHAJRRGrtrS2GjlxcA",
  "version" : {
    "distribution" : "opensearch",
    "number" : "2.12.0",
    "build_type" : "tar",
    "build_hash" : "a9c03c2d08051dc3f8e5f8c7920473e53d0d2752",
    "build_date" : "2024-02-13T00:07:52.941773788Z",
    "build_snapshot" : false,
    "lucene_version" : "9.9.2",
    "minimum_wire_compatibility_version" : "7.10.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "The OpenSearch Project: https://opensearch.org/"
}

Sample log with default:

curl https://localhost:9400/ -k -u admin:admin
{
  "name" : "pgcluster-masters-0",
  "cluster_name" : "pgcluster",
  "cluster_uuid" : "65WJtBZqRkWbRZKoh2u3mA",
  "version" : {
    "distribution" : "opensearch",
    "number" : "2.12.0",
    "build_type" : "tar",
    "build_hash" : "a9c03c2d08051dc3f8e5f8c7920473e53d0d2752",
    "build_date" : "2024-02-13T00:07:52.941773788Z",
    "build_snapshot" : false,
    "lucene_version" : "9.9.2",
    "minimum_wire_compatibility_version" : "7.10.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "The OpenSearch Project: https://opensearch.org/"
}

Adding @dbason @swoehrl-mw @jochenkressin @pchmielnik @salyh @bbarani @peterzhuamazon

@prudhvigodithi prudhvigodithi removed the untriaged Issues that have not yet been triaged label Feb 13, 2024
@prudhvigodithi prudhvigodithi self-assigned this Feb 13, 2024
@DarshitChanpura
Copy link
Member Author

@prudhvigodithi Can this issue be marked as closed with "no action needed"?

@prudhvigodithi
Copy link
Member

prudhvigodithi commented Feb 13, 2024

Yes closing this issue as no further action needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants