Does basic license of elastic stack support basic authentication?

Hello,

I am using a basic license of elastic stack and would like to confirm whether the basic license of elastic stack supports basic authentication like a prompt for basic username and password to be entered before accessing elastic stack on the web gui.

{
"name" : "tfjOGBA",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "Z7VUBxinSNKh9AArMnM19Q",
"version" : {
"number" : "6.8.7",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "c63e621",
"build_date" : "2020-02-26T14:38:01.193138Z",
"build_snapshot" : false,
"lucene_version" : "7.7.2",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}

Yes it supports Basic Authentication. You can refer this link for more details.

Not sure why i am encountering this message when i try to run elasticsearch-certutil

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with </> icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

root@ip-x-x-x-x:/usr/share/elasticsearch/bin# ls

elasticsearch               elasticsearch-cli           elasticsearch-migrate            elasticsearch-setup-passwords      elasticsearch-sql-cli.bat    elasticsearch-users.bat  x-pack-security-env.bat
elasticsearch-certgen       elasticsearch-croneval      elasticsearch-migrate.bat        elasticsearch-setup-passwords.bat  elasticsearch-syskeygen      x-pack                   x-pack-watcher-env
elasticsearch-certgen.bat   elasticsearch-croneval.bat  elasticsearch-plugin             elasticsearch-shard                elasticsearch-syskeygen.bat  x-pack-env               x-pack-watcher-env.bat
elasticsearch-certutil      elasticsearch-env           elasticsearch-saml-metadata      elasticsearch-sql-cli              elasticsearch-translog       x-pack-env.bat
elasticsearch-certutil.bat  elasticsearch-keystore      elasticsearch-saml-metadata.bat  elasticsearch-sql-cli-6.8.7.jar    elasticsearch-users          x-pack-security-env

root@ip-x-x-x-x:/usr/share/elasticsearch/bin# bin/elasticsearch-certutil cert -out config/elastic-certificates.p12 -pass ""
bash: bin/elasticsearch-certutil: No such file or directory
root@ip-x-x-x-x:/usr/share/elasticsearch/bin#

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

I updated your post but please do it next time.

You are already in bin directory. So you can't type bin/elasticsearch-certutil

I am getting this message when i try to run bin/elasticsearch  

  root@ip-x-x-x-x:/usr/share/elasticsearch# bin/elasticsearch
    OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
    Exception in thread "main" 2020-03-23 01:34:35,347 main ERROR No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2
    SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: JsonParseException[Duplicate field 'xpack.security.enabled'
     at [Source: sun.nio.ch.ChannelInputStream@23941fb4; line: 94, column: 23]];
        at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1139)
        at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1112)
        at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:100)
        at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:95)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
        at org.elasticsearch.cli.Command.main(Command.java:90)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93)
    Caused by: com.fasterxml.jackson.core.JsonParseException: Duplicate field 'xpack.security.enabled'
     at [Source: sun.nio.ch.ChannelInputStream@23941fb4; line: 94, column: 23]
        at com.fasterxml.jackson.core.json.JsonReadContext._checkDup(JsonReadContext.java:204)
        at com.fasterxml.jackson.core.json.JsonReadContext.setCurrentName(JsonReadContext.java:198)
        at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:372)
        at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:52)
        at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:675)
        at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:650)
        at org.elasticsearch.common.settings.Settings.access$500(Settings.java:82)
        at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1135)
        ... 8 more
Duplicate field 'xpack.security.enabled'

Apparently you have twice the same setting defined.

i am encountering the similar issue as https://discuss.elastic.co/t/error-java-lang-runtimeexception-can-not-run-elasticsearch-as-root/191818 and i am still getting the same error message even though my key store is not owned by root.

root@ip-x-x-x-x:/usr/share/elasticsearch# ./bin/elasticsearch
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[2020-03-23T05:42:06,935][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [unknown] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-6.8.7.jar:6.8.7]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-6.8.7.jar:6.8.7]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.8.7.jar:6.8.7]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.8.7.jar:6.8.7]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.8.7.jar:6.8.7]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) ~[elasticsearch-6.8.7.jar:6.8.7]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.8.7.jar:6.8.7]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
        at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:103) ~[elasticsearch-6.8.7.jar:6.8.7]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170) ~[elasticsearch-6.8.7.jar:6.8.7]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.8.7.jar:6.8.7]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.8.7.jar:6.8.7]

root@ip-x-x-x-x:/usr/share/elasticsearch/bin# ls -l
total 17908
-rwxr-xr-x 1 elasticsearch elasticsearch     1777 Feb 26 14:47 elasticsearch
-rwxr-xr-x 1 elasticsearch elasticsearch      491 Feb 26 14:47 elasticsearch-certgen
-rwxr-xr-x 1 elasticsearch elasticsearch      613 Feb 26 14:47 elasticsearch-certgen.bat
-rwxr-xr-x 1 elasticsearch elasticsearch      483 Feb 26 14:47 elasticsearch-certutil
-rwxr-xr-x 1 elasticsearch elasticsearch      605 Feb 26 14:47 elasticsearch-certutil.bat
-rwxr-xr-x 1 elasticsearch elasticsearch      984 Feb 26 14:47 elasticsearch-cli
-rwxr-xr-x 1 elasticsearch elasticsearch      433 Feb 26 14:47 elasticsearch-croneval
-rwxr-xr-x 1 elasticsearch elasticsearch      555 Feb 26 14:47 elasticsearch-croneval.bat
-rwxr-xr-x 1 elasticsearch elasticsearch     2189 Feb 26 14:47 elasticsearch-env
-rwxr-xr-x 1 elasticsearch elasticsearch      121 Feb 26 14:47 elasticsearch-keystore
-rwxr-xr-x 1 elasticsearch elasticsearch      440 Feb 26 14:47 elasticsearch-migrate
-rwxr-xr-x 1 elasticsearch elasticsearch      562 Feb 26 14:47 elasticsearch-migrate.bat
-rwxr-xr-x 1 elasticsearch elasticsearch      172 Feb 26 14:47 elasticsearch-plugin
-rwxr-xr-x 1 elasticsearch elasticsearch      431 Feb 26 14:47 elasticsearch-saml-metadata
-rwxr-xr-x 1 elasticsearch elasticsearch      553 Feb 26 14:47 elasticsearch-saml-metadata.bat
-rwxr-xr-x 1 elasticsearch elasticsearch      438 Feb 26 14:47 elasticsearch-setup-passwords
-rwxr-xr-x 1 elasticsearch elasticsearch      560 Feb 26 14:47 elasticsearch-setup-passwords.bat
-rwxr-xr-x 1 elasticsearch elasticsearch      118 Feb 26 14:47 elasticsearch-shard
-rwxr-xr-x 1 elasticsearch elasticsearch      427 Feb 26 14:47 elasticsearch-sql-cli
-rwxr-xr-x 1 elasticsearch elasticsearch 18205025 Feb 26 14:47 elasticsearch-sql-cli-6.8.7.jar
-rwxr-xr-x 1 elasticsearch elasticsearch      649 Feb 26 14:47 elasticsearch-sql-cli.bat
-rwxr-xr-x 1 elasticsearch elasticsearch      426 Feb 26 14:47 elasticsearch-syskeygen
-rwxr-xr-x 1 elasticsearch elasticsearch      548 Feb 26 14:47 elasticsearch-syskeygen.bat
-rwxr-xr-x 1 elasticsearch elasticsearch      124 Feb 26 14:47 elasticsearch-translog
-rwxr-xr-x 1 elasticsearch elasticsearch      426 Feb 26 14:47 elasticsearch-users
-rwxr-xr-x 1 elasticsearch elasticsearch      548 Feb 26 14:47 elasticsearch-users.bat
drwxr-xr-x 2 elasticsearch elasticsearch     4096 Mar 13 05:26 x-pack
-rwxr-xr-x 1 elasticsearch elasticsearch      306 Feb 26 14:47 x-pack-env
-rwxr-xr-x 1 elasticsearch elasticsearch      303 Feb 26 14:47 x-pack-env.bat
-rwxr-xr-x 1 elasticsearch elasticsearch      354 Feb 26 14:47 x-pack-security-env
-rwxr-xr-x 1 elasticsearch elasticsearch      307 Feb 26 14:47 x-pack-security-env.bat
-rwxr-xr-x 1 elasticsearch elasticsearch      353 Feb 26 14:47 x-pack-watcher-env
-rwxr-xr-x 1 elasticsearch elasticsearch      306 Feb 26 14:47 x-pack-watcher-env.bat

I think the error message gives you a hint.

Mentioned below are some of the steps which i have done and i am still getting the same message can not run elasticsearch as root when i try to run bin/elasticsearch

i've changed ownership of all ES from root to elasticsearch using the command below

sudo chown elasticsearch:elasticsearch -R /usr/share/elasticsearch
sudo chown elasticsearch:elasticsearch -R /var/log/elasticsearch
sudo chown elasticsearch:elasticsearch -R /var/lib/elasticsearch
sudo chown elasticsearch:elasticsearch -R /etc/default/elasticsearch
sudo chown elasticsearch:elasticsearch -R /etc/elasticsearch

i've edited /etc/default/elasticsearch file and did the following things
  
a)JAVA_HOME=your/java/home/path

b)add the following entries at the end

      i)   START_DAEMON=true
      ii)  ES_USER=elasticsearch
      iii) ES_GROUP=elasticsearch

How did you install the software? Did you follow exactly the instructions provided in the installation guide?

I've re installed the software and it is working now.. thank you! :smile: