{"error":"Incorrect HTTP method for uri [/_searchguard/authinfo] and method [GET], allowed: [POST]","status":405}

I am using 7.17.3v of elk and search guard 53.1.0
https://localhost:9200/_searchguard/authinfo . while testing this step its showing error as follows
{“error”:“Incorrect HTTP method for uri [/_searchguard/authinfo] and method [GET], allowed: [POST]”,“status”:405}

step 1-Installed Search Guard on Elasticsearch
step 2-installed demo certificate inside Elasticsearch config
/config
step 3- Added the following minimal Search Guard configuration to elasticsearch.yml :

searchguard.ssl.transport.pemcert_filepath: esnode.pem
searchguard.ssl.transport.pemkey_filepath: esnode-key.pem
searchguard.ssl.transport.pemtrustedcas_filepath: root-ca.pem
searchguard.ssl.transport.enforce_hostname_verification: false
searchguard.ssl.http.enabled: true
searchguard.ssl.http.pemcert_filepath: esnode.pem
searchguard.ssl.http.pemkey_filepath: esnode-key.pem
searchguard.ssl.http.pemtrustedcas_filepath: root-ca.pem
searchguard.allow_unsafe_democertificates: true
searchguard.allow_default_init_sgindex: true
searchguard.authcz.admin_dn:

  • CN=kirk,OU=client,O=client,L=test,C=de
    searchguard.enable_snapshot_restore_privilege: true
    searchguard.check_snapshot_restore_write_privileges: true
    searchguard.restapi.roles_enabled: [“SGS_ALL_ACCESS”]

step-4 - the Restarted the node
step 5- https://localhost:9200/_searchguard/authinfo . while testing this step its showing error as follows
{“error”:“Incorrect HTTP method for uri [/_searchguard/authinfo] and method [GET], allowed: [POST]”,“status”:405}

please help to solve it

@jis Did you upload configuration to the cluster with sgadmin.sh script?

Also, I don’t see this line in your config.

xpack.security.enabled: false

I have included the sgadmin.sh scrip in one of the elasticsearch node configuration as below shown:
But after that , not able to start the node ,its showing error as below


image

@jis You’ve set searchguard.disabled to true. That disables SG plugin in Elasticsearch.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.