Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Tip |
---|
If none, it can be omitted |
Parameter | ||||
---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||
---|---|---|---|---|
|
Parameter | ||||
---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Code Block |
---|
"providers": [
{
"name": "saga-provider",
"type": "OpenSearch",
"nodeUrls": ["http://localhost:9200"],
"timestamp": "updatedAt",
"indexName": "saga",
"trustAllSSL": false,
"timeout": 90,
"delay": 5,
"retries": 3,
"include": [],
"exclude": [],
"track_total_hits": true,
"maxResults": 10000
}
] |
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" using authentication factor as "basic".
Saga_jsoncode |
---|
"providers": [ { "name": "saga-provider", "type": "OpenSearch", "nodeUrls": ["http://localhost:9200"], "timestamp": "updatedAt", "indexName": "saga", "encryptionKeyFile" : "./bin/saga.ek", "trustAllSSL": false, "authentication": "basic", "user": "<username>", "password": "<path_to_pwd_file>", "timeout": 90, "delay": 5, "retries": 3, "exclude": [ "updatedAt", "createdAt" ] } ] |
Note |
---|
Notice the values of "user" and "password" and "encryptionKeyFile". |
To connect to an Elasticsearch with AWS authentication you will need to set your Amazon Web Services credentials locally as environmental variables or get them from the ECS or EC2 credentials.
Follow the next steps:
Info | ||
---|---|---|
| ||
SagaElasticIndexer gets the credentials automatically by getting the credentials file. That is why you only need to specify region and service in the config file which is below this note. |
Update "providers" using authentication factor as "aws".
With Credential Chain Provider
Saga_jsoncode |
---|
"providers": [ { "name": "saga-provider", "type": "OpenSearch", "nodeUrls": ["http://localhost:9200"], "timestamp": "updatedAt", "indexName": "saga", "encryptionKeyFile" : "./bin/saga.ek", "trustAllSSL": false, "authentication": "aws", "awsRegion": "<region_where_the_aws_service_is_located>", "awsService": "<aws_service>", "useCredentialsProviderChain": true, "timeout": 90, "delay": 5, "retries": 3, "exclude": [ "updatedAt", "createdAt" ] } ] |
Note |
---|
Notice the values of "awsService", "awsRegion" and "useCredentialsProviderChain" |
With Access & Secret Keys
Saga_jsoncode |
---|
"providers": [ { "name": "saga-provider", "type": "OpenSearch", "nodeUrls": ["http://localhost:9200"], "timestamp": "updatedAt", "indexName": "saga", "encryptionKeyFile" : "./bin/saga.ek", "trustAllSSL": false, "authentication": "aws", "awsRegion": "<region_where_the_aws_service_is_located>", "awsService": "<aws_service>", "awsAccessKey": "<service_access_key>", "awsSecretKey": "<service_secret_key>", "useCredentialsProviderChain": false, "timeout": 90, "delay": 5, "retries": 3, "exclude": [ "updatedAt", "createdAt" ] } ] |
Note |
---|
Notice that now we also have the values of "awsAccessKey" and "awsSecretKey". You can ommit "useCredentialsProviderChain" if you want to |
If you are using Saga within Aspire, the configurations are the same for providers, but you will need to:
Copy Saga's encryption key file to <aspire>/bin/
Copy pwd.txt to <aspire>/bin/ as well.
Update the Saga's config file (the one within the Aspire configuration folder) to reflect the relative path of those files:
Saga_jsoncode |
---|
{
"config": {
"security": {
"encryptionKeyFile": "./bin/saga.ek"
},
"libraryJars": [
"./lib"
],
...
"providers": [
{
"name": "filesystem-provider",
"type": "FileSystem",
"baseDir": "./config"
},
{
"name": "saga-provider",
"type": "OpenSearch",
"nodeUrls": ["http://localhost:9200"],
"timestamp": "updatedAt",
"indexName": "saga",
"encryptionKeyFile" : "./bin/saga.ek",
"trustAllSSL": false,
"authentication": "basic",
"user": "<username>",
"password": "<path_to_pwd_file>",
"timeout": 90,
"delay": 5,
"retries": 3,
"maxResults": 2000000
"exclude": [
"updatedAt",
"createdAt"
]
}
]
} |
To connect SAGA to a OpenSearch provider with HTTPS enabled you need to follow these steps:
Go to the folder where you copied the cert file and run this command (you may need to use sudo if not running as ROOT user):
Code Block | ||
---|---|---|
| ||
sudo keytool -importcert -alias elastic_ca -cacerts -storepass changeit -file <CERT_FILE> -noprompt |
Code Block | ||
---|---|---|
| ||
{
"name": "saga-provider",
"type": "OpenSearch",
"nodeUrls": ["https://localhost:9200"], <============= NOTICE the HTTPS protocol
"timestamp": "updatedAt",
"indexName": "saga",
"encryptionKeyFile" : "./bin/saga.ek",
"authentication": "none",
"timeout": 90,
"delay": 5,
"retries": 3,
"exclude": [
"updatedAt",
"createdAt"
]
} |
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Page properties | ||
---|---|---|
| ||
|