Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch license.expired.feature security status 403

I am using below code

var settings = new ConnectionSettings(new Uri("https://10.8.173.179:9200"));
                    settings.BasicAuthentication("elastic", "password"); 
                    settings.ServerCertificateValidationCallback(CertificateValidations.AllowAll);
                    var lowlevelClient = new ElasticLowLevelClient(settings);
                    var health = lowlevelClient.Cluster.Health<StringResponse>().DebugInformation;

Getting : "security","suppressed":[{"type":"security_exception","reason":"current license is non-compliant for [security]","license.expired.feature":"security"}]},"status":403}

like image 307
sumeet Avatar asked Oct 26 '25 08:10

sumeet


1 Answers

It sounds like you may have been using a trial license. You can check which license you are running with by using the Get License API

var client = new ElasticLowLevelClient();

var getLicenseResponse = client.License.Get<StringResponse>();

which will issue the request

GET http://localhost:9200/_license

If the "type" is "trial" in the returned response, you are using a trial license.

You can revert to using a free basic license. If you're running

  • a 6.x version greater or equal to 6.8.0
  • a 7.x version greater or equal to 7.1.0

Core security features such as TLS, basic and native realm and role-based access control can be used with the basic license..

To start the basic license, you can use the Start Basic License API

var startBasicResponse = client.License.StartBasic<StringResponse>();

which sends a request to

POST http://localhost:9200/_license/start_basic

NOTE As per the API documentation, you must submit the API request with the acknowledge parameter set to "true" for the changes to take effect; you can submit the API call first without setting this parameter, to understand what changes it makes it terms of access to features.

like image 114
Russ Cam Avatar answered Oct 28 '25 22:10

Russ Cam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!