-
Notifications
You must be signed in to change notification settings - Fork 281
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
[Bug Fix] Fix the demo configuration script and remove the admin credential from internal_user.yml
#3449
[Bug Fix] Fix the demo configuration script and remove the admin credential from internal_user.yml
#3449
Conversation
…of internal users file Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #3449 +/- ##
============================================
- Coverage 64.56% 64.54% -0.02%
+ Complexity 3545 3544 -1
============================================
Files 269 269
Lines 20363 20363
Branches 3376 3376
============================================
- Hits 13147 13143 -4
- Misses 5525 5529 +4
Partials 1691 1691 |
Note: the BWC failure is expected due to the release related version changes. |
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
@@ -52,6 +58,33 @@ jobs: | |||
- name: Checkout security | |||
uses: actions/checkout@v4 | |||
|
|||
- name: Insert Admin Credential on Linux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is broken without this section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the log:
- org.opensearch.security.InitializationIntegrationTests.testDefaultConfig
- org.opensearch.security.InitializationIntegrationTests.testInvalidDefaultConfig
- org.opensearch.security.TransportUserInjectorIntegTest.testSecurityUserInjection
- org.opensearch.security.SlowIntegrationTests.testDelayInSecurityIndexInitialization
For example, the test of InitializationIntegrationTests.testDefaultConfig
is using the admin admin credential to send out the request:
security/src/test/java/org/opensearch/security/InitializationIntegrationTests.java
Line 287 in 93f79f8
HttpResponse res = rh.executeGetRequest("/_cluster/health", encodeBasicHeader("admin", "admin")); |
@@ -10,13 +10,6 @@ _meta: | |||
|
|||
## Demo users | |||
|
|||
admin: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the cluster fail to startup with this change? Could you include what that looks like?
We do not want a cluster to start without admin credentials. What do you think about closing this @RyanL1997 ? |
@RyanL1997 Since the password change was reverted in 2.11 - lets regroup and figure out how to approach this. I'm going to close out this PR - we can reopen if we need it. Thanks |
Description
By working with @DarshitChanpura for addressing the following issue:
We need the initiation of the cluster to be failed once we encountered a failure of our demo configuration script. This PR introduces the method that if we failed to set up a admin credential during the set up of demo configuration script, it will lead to an absent of admin credential section in
internal_users.yml
, so that the initiation of the cluster will be failed.Bug fix
The cluster initiation will be succeed and keep using the
admin:admin
credential even if the there is an hard exit on the set up on demo configuration script.Issues Resolved
Testing
CI
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.