-
Notifications
You must be signed in to change notification settings - Fork 298
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] securityadmin.sh -backup gives ERR: Seems audit from cluster is not in legacy format: java.io.IOException: A version of 1 #1876
Comments
[Triage] Thanks for reporting the issue! |
Same for me. Configs are correctly validated for security admin v7, but the backup detects all configs as version 6 Dropping and recreating .opendistro_security index does not solved the problem. |
OpenSearch 1.0.0 is a fork of Elasticsearch 7.10.2. It supports migration from ES 7.10.2 to OpenSearch 1.0.0, but doesn't support migration from ES 6 to OpenSearch. |
There was no migration in my case. My opensearch cluster is quite fresh. It started from scratch on v1.2.4. Week ago I bumped it to 2.0.0 so .opensearch_security index was originally created with securityadmin v7 on opensearch 1.2.4.
This error appeared after upgrading to 2.0.0 |
I'm getting exactly the same error on a freshly created cluster v 2.0.0. |
Same after upgrading v 1.3.2 to V 2.0.1. |
I have some problem after migration ODFE 1.13.1.0 to OpenSearch 2.0.0
But after migrating to OpenSearch I still get the error: Аt the same time, it is not possible to carry out the migration, when I start |
Same issue Here, everything was ok before 2.0.0 |
I still have the same issue in 2.0.1 |
I suggest to deprecate the securityadmin tools in favor of the Security REST API. Let the admin user, or users with the right permissions, to manage security configuration through the REST API. |
How should the |
Below is a call to update the security config. It is all documented here https://opensearch.org/docs/latest/security-plugin/access-control/api/#update-configuration PUT _plugins/_security/api/securityconfig/config |
Moreover, the current securityadmin utility also calls a (hidden) REST API. I think that API should be visible to the admin user. As for the reserved users such as the admin, you can set it as a regular user first time you start the cluster. In fact, I still wonder why the "reserved" admin is designed not to be able to change his own password! As far as I have seen, all securityadmin functionality is possible through the REST API except for changing security index replication settings. There is no visible REST API to do it. |
@asfoorial In the same link you have a note that suggests using securityadmin.sh as it is far safer thank REST API call. |
Existing documentation tells the user to use securityadmin.sh, specifically recommending it over using API calls (which are barely documented). At the same time securityadmin.sh spews errors and 0-byte files when trying to protect existing configurations (as the documentation recommends). This leaves the user in limbo. |
The documentation issues are tracked with opensearch-project/documentation-website#530 If there are more things that you'd like to see please file issues on the documentation website and we can see about providing better details, or if you'd like to improve the docs themselves we would be happy to review pull requests. |
Updating to 2.1.0 didn't solve the issue with securityadmin.sh |
Same problem with a completely fresh install of opensearch 2.1.0 |
+1 |
For users and roles we can use the API but I think it is important that we can update the security config in a secure manner (not with API mainly when it's not "supported" => plugins.security.unsupported.restapi.allow_securityconfig_modification ) |
I am in favor of replacing securityadmin tool with the API. I still wonder why it still not supported. It is more consistant to have everything done through the API. |
if it's done through API, it would be good to work like the "restricted" user and roles => Only admin user authentified with SSL Certificate should be able to call this API. |
2.2.0 has still the same issue. |
I had the same error by running securityadmin.sh in a cluster v2.0.0 after upgrade from version 1.2.2 In my case it seems that the issue was caused by te following check inside the src/main/java/org/opensearch/security/tools/SecurirtyAdmin.java
as workaround i've tried to recompile a copy src/main/java/org/opensearch/security/tools/SecurirtyAdmin.java by forcing legacy to false and in my case it seems to works. I've compared differences between the two version and previously there was an additional check inside the index mappings
could it be the cause of my issue? if could help i attach the output of GET /.opendistro_security
here part of the output of my securityadmin ./securityadmin.sh -backup /tmp/b -icl -nhnv -cacert ../../../config/root-ca.pem -cert ../../../config/kirk.pem -key ../../../config/kirk-key.pem ** This tool will be deprecated in the next major release of OpenSearch ** Security Admin v7 .... |
Hello @cwperks / All, I am also trying to integrate the OpenID connect with Opensearch and I am executing the securityadmin.sh and getting the same error message as mentioned above..
|
Hey @sabil05, the fix is scheduled to be included in the 2.3.0 release at the end of this week (9/15/22). This bug impacted 2.0, 2.1 and 2.2. |
@mysinmyc Thank you for the detailed explanation of the incorrect legacy check in the security admin script! A fix for the issue has been scheduled for the 2.3.0 release. |
Hello @cwperks, Thank you so much for the information. |
We are doing some "spring cleaning in the fall", and to make sure we focus our energies on the right issues and we get a better picture of the state of the repo, we are closing all issues that we are carrying over from the ODFE era (ODFE is no longer supported/maintained, see post here). If you believe this issue should still be considered for current versions of OpenSearch, apologies! Please let us know by re-opening it. Thanks! |
This issue is related to OpenSearch 2.x and not ODFE. Some of us talked about an upcoming fix in 2.3.0 but it is not released yet for us to verify. |
I think @davidlago closed out this issue by accident, I'm reopening since there is active discussion and issues that we should address. |
Indeed I did, sorry! |
Hello @cwperks, I have used 2.3.0 version and executed the securityadmin.sh.. Still getting the errors The Legacy index error has disappeared.
However, still getting the following error message.
|
@sabil05 Let's move this conversation to the forum here: https://forum.opensearch.org/t/openid-connect-integration-with-opensearch/10876/9 It sounds like you encountered this bug when running security admin, but there is a separate configuration issue preventing the nodes from starting up that is unrelated to this bug. |
[CLOSED] Closed because original issue was addressed. Any further issues are encouraged to file a new issue ticket. |
What is the bug?
I am getting the below error when try to take a backup of the security yml files.
ERR: Seems audit from cluster is not in legacy format: java.io.IOException: A version of 1 can not have a _meta key for AUDIT
How can one reproduce the bug?
Steps to reproduce the behavior:
./securityadmin.sh -backup my-backup-directory
-icl
-nhnv
-cacert …/…/…/config/root-ca.pem
-cert …/…/…/config/node.pem
-key …/…/…/config/node.key
ERR: Seems audit from cluster is not in legacy format: java.io.IOException: A version of 1 can not have a _meta key for AUDIT
What is the expected behavior?
A clear and concise description of what you expected to happen.
What is your host/environment?
The text was updated successfully, but these errors were encountered: