To connect to an Elasticsearch with basic authentication you will need to encrypt your password and add the right values to the configuration.
Follow the next steps:
In a terminal run, in Saga's root folder.
Code Block | ||||
---|---|---|---|---|
| ||||
java -jar bin/saga-secure-<version>.jar -ep=<password> -config="config/config.json" |
Update "providers"
Saga_json |
---|
"providers": [ { "name": "filesystem-provider", "type": "FileSystem", "baseDir": "./config" }, { "name": "saga-provider", "type": "Elastic", "scheme": "http", "hostnamesAndPorts": ["localhost:9200"], "user": "<username>", "password": "<path_to_pwd_file>", "timestamp": "updatedAt", "exclude": [ "updatedAt", "createdAt" ] } |
Update "solutions"
Saga_json |
---|
"solutions": [ { "display": "Saga", "elasticSearch": { "scheme": "http", "hostnamesAndPorts": ["localhost:9200"], "indexName": "saga", "user": "<username>", "password": "<path_to_pwd_file>", "timeout": 30, "delay": 5, "retries": 3 } } ] |
If you are using Saga within Aspire you will need to:
Update the Saga's config file (the one within the Aspire configuration folder) to reflect the relative path of those files:
Saga_json |
---|
{ "config": { "security": { "encryptionKeyFile": "./bin/saga.ek" }, "libraryJars": [ "./lib" ], ... "providers": [ { "name": "filesystem-provider", "type": "FileSystem", "baseDir": "./config" }, { "name": "saga-provider", "type": "Elastic", "scheme": "http", "hostnamesAndPorts": [ "localhost:9200" ], "user": "<user>", "password": "./bin/pwd.txt", "timestamp": "updatedAt", "exclude": [ "updatedAt", "createdAt" ], "maxResults": 2000000 } ] } |
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...