There are 3 different ways to connect with authentication: with username/password, Azure AD or Amazon Web Services (AWS).
Or, if you don't want any authentication, you can set that as well.
...
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 "default".
Saga_json |
---|
"providers": [
{
"name": "filesystem-provider",
"type": "FileSystem",
"baseDir": "./config"
},
{
"name": "saga-provider",
"type": "Elastic",
"indexName": "saga",
"nodeUrls": ["http://localhost:9200"],
"authentication": "default"
"user": "<username>",
"password": "<path_to_pwd_file>",
"timestamp": "updatedAt",
"exclude": [
"updatedAt",
"createdAt"
]
} |
Update "solutions" using authentication factor as "default".
Saga_json |
---|
"solutions": [ { "display": "Saga", "elasticSearch": { "nodeUrls": ["http://localhost:9200"], "indexName": "saga", "authentication": "default" "user": "<username>", "password": "<path_to_pwd_file>", "timeout": 30, "delay": 5, "retries": 3 } } ] |
...
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", "indexName": "saga", "nodeUrls": [ "http://localhost:9200" ], "user": "<user>", "password": "./bin/pwd.txt", "timestamp": "updatedAt", "exclude": [ "updatedAt", "createdAt" ], "maxResults": 2000000 } ] } |
To connect to an Elasticsearch with Azure AD authentication you will need to set your Azure AD tenant and then you register your app in the Azure portal so the Microsoft identity platform can provide authentication and authorization services.
Follow the next steps:
Update "providers" using authentication factor as "azure".
Saga_json |
---|
"providers": [ { "name": "filesystem-provider", "type": "FileSystem", "baseDir": "./config" }, { "name": "saga-provider", "type": "Elastic", "indexName": "saga", "nodeUrls": ["http://localhost:9200"], "authentication":"azure", "resourceId": "<resourceID>", "tenantId": "<tenantID>" "clientId": "<clientID>", "clientSecret": "<clientSecretKey>", "timestamp": "updatedAt", "exclude": [ "updatedAt", "createdAt" ] } |
Update "solutions" using authentication factor as "azure".
Saga_json |
---|
"solutions": [
{
"display": "Saga",
"elasticSearch": {
"nodeUrls": ["http://localhost:9200"],
"indexName": "saga",
"authentication":"azure",
"resourceId": "<resourceID>",
"tenantId": "<tenantID>"
"clientId": "<clientID>",
"clientSecret": "<clientSecretKey>",
"timeout": 30,
"delay": 5,
"retries": 3
}
}
] |
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.
...