You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 27 Current »

Saga Configuration

The Saga configuration can be use for the core library only or with the server, all the features available for the core library will work in the server, but the features for the server 

Server Access

Control the server's basic communication configuration

  • apiPort ( type=integer | default=8080 | optional ) - Port of the Saga server. Use -1 to disable HTTP
  • secureApiPort ( type=integer | default=443 | optional ) - The HTTPS port to use
  • host ( type=string | default=0.0.0.0 | optional ) - Ip address the server will be listening for request
  • serverTimeout ( type=double | default=30000 | optional ) - Server timeout for asynchronous requests.
  • disableHTTPSSLVerification ( type=boolean | default=false | optional ) - Disables HTTPS SSL certificate verification when doing HTTP requests to thirds (e.g. the Python-Bridge).
  • maxRequestPayloadSize ( type=double | default=1000000 | optional ) - Max payload size limit for requests. The value is in bytes, so the default is 1000000 bytes or 1MB.

CORS (added in 1.3.3)

Manages the security configuration regarding encrypted communication and authentication

  • cors ( type=json | optional ) - CORS configuration
    • allow_origins ( type=string array | default=* | optional ) - List or origins to allow, if you want to allow all just add ["*"]
    • allow_credentials ( type=string | default=true | optional ) - Allow credentials, values "true" or "false"
    • allow_methods ( type=string array | default=* | optional ) - List or methods to allow, if you want to allow all just add ["*"]
    • allow_headers ( type=string array | default=* | optional ) - List or headers to allow, if you want to allow all just add ["*"]
    • expose_headers ( type=string array | default=* | optional ) - List or headers to expose in the response, if you want to expose all just add ["*"]

Security 

Manages the security configuration regarding encrypted communication and authentication

  • security ( type=json | optional ) - Security configuration
    • enable ( type=boolean | default=false | optional ) - Enables or not the security
    • encryptionKey ( type=string | optional ) - Indicates the encryption key used in all encryption/decryption process
    • encryptionKeyFile ( type=string | optional ) - Path to the file holding the encryption key. Recommended over encryptionKey

    • inactiveInterval ( type=integer | default=600 | optional ) - Number of seconds of inactivity before expiring a session

We recommend the use of encryptionKeyFile over the encryptionKey directly in the configuration file. Never use both a the same time

For more details regarding Security on the Saga Server please see Security & Authentication


  • ssl ( type=json | optional ) - SSL configuration (server only)
    • enable ( type=boolean | default=false | optional ) - Enables and disables the use of the SSL (server only)
    • keyStore ( type=string | optional ) - key store holding the certificate (server only)
    • keyStorePassword ( type=string | optional ) - Password of the key store (server only)

Export & Import (Server Only)

Manages the export functionality

  • exportSettings ( type=json | optional ) - Configuration for the export functionality
    • maxSize ( type=integer | optional ) - Maximum size in megabytes for each zip generated by the export
    • batchSize ( type=integer | optional ) - Quantity of entries per file

External Libraries & Classes

Defines the location of external libraries and classes 

  • libraryJars ( type=string array | optional ) - Locations for external libraries, the locations can be either folder paths or paths directly to the jars files
  • restHandlers ( type=string array | optional ) - Indicates the class name of the external REST handler to use. If the class is in a non-standard package path, the whole path needs to be specified (server only)
  • uiHandlers ( type=string array | optional ) - Indicates the class name of the external UI handler to use. If the class is in a non-standard package path, the whole path needs to be specified (server only)
  • models ( type=string array | optional ) - Indicates the class name of the external Model to use. If the class is in a non-standard package path, the whole path needs to be specified (server only)

Server Proxys Configuration (Server Only)

  • gpt3 ( type=string | optional ) - Configuration for the GTP3 proxy
    • key ( type=string | optional ) - Secret key for the OpenAI API
    • openAIHost ( type=string | optional ) - Host for the OpenAI API
    • openAIAPIVersion ( type=string | optional ) - OpenAI API version to use.

Providers & Resources

  • providers ( type=json | optional ) - Provider configurations
    • name ( type=string | optional ) - Provider name
    • type ( type=string | optional ) - Type of provider, the type is the name segment of the class name (e.g. TheName is the type for TheNameProvider class)

      As explained in the Resources page, a resource provides access to a specific set of resources from a particular storage technology.  In order for the Saga to use these providers, we need to specify them in the config file under the providers field.  The declaration of each Resource Provider depends of the resource per se; the details of each one can be find here.

  • logging_provider ( type=json | optional ) - Logging Provider configurations
    Logging_provider Example Configuration
    "logging_provider": {
          "name": "saga-logging-provider",
          "type": "Elastic",
          "nodeUrls": ["http://localhost:9200"],
          "timestamp": "updatedAt",
          "indexName": "saga",
          "encryptionKeyFile" : "./bin/saga.ek",
          "authentication": "none",
          "caFilePath": "",
          "trustAllSSL": false,
          "timeout": 90,
          "delay": 5,
          "retries": 3,
          "exclude": [ ]
        }


  • tagManager ( type=json | optional ) - Tag manager configuration
    • resource ( type=string | default=saga-provider:saga_tags | optional ) - Name of the resource to use for the tags. The value should be form by "<provider_name>:<source_name>"
  • pipelineManager ( type=json | optional ) - Pipeline manager configuration
    • resource ( type=string | default=saga-provider:saga_pipelines | optional ) - Name of the resource to use for the pipelines. The value should be form by "<provider_name>:<source_name>"


Connecting Saga to an Elasticsearch on HTTPS

In addition to change the schema in the 'nodeUrls' parameter in the solutions and providers sections in the config file from 'http' to 'https',  you also need to add the Elasticsearch CA certificate to the java keystore using the keytool command.

Something like this:

keytool -importcert -alias elastic_ca -cacerts -storepass changeit -file /tmp/es_ca.crt -noprompt

Saga Core & Server Configuration

Here you can see a sample configuration (not functional) 

{
  "config": {
    "apiPort": 8080,
    "secureApiPort": 443,
    "host": "0.0.0.0",
    "allow-domains": "localhost",
	"serverTimeout": 30000,
	"disableHTTPSSLVerification": false,
    "maxRequestPayloadSize": 1000000,
    "cors": {
      "allow_origins": [
        "http://localhost:8080",
        "https://localhost",
        "https://login.microsoftonline.com"
      ],
      "allow_credentials": "true",
      "allow_methods": ["*"],
      "allow_headers": ["*"],
      "expose_headers": ["*"]
    },
    "security": {
      "enable": false,
      "encryptionKeyFile" : "./bin/saga.ek",
      "inactiveInterval": 600,
      "defaultRole": "admin",
      "users": [{
        "username": "admin",
        "password": "notpassword",
        "roles": "admin"
      }],
      "type": "none",

      "openid": {
        "serverURL": "http://localhost:8080",
        "clientId": "clientId",
        "discoveryURI": "discoveryURI"
      }
    },
    "ssl": {
      "enable": false,
      "keyStore": "./bin/saga.jks",
      "keyStorePassword": "encrypted:KCe8RrPQ8MV3po8NqHo0G7q7sa6T6yzf1JrTQ5VD0uty0elmrqRuybaAmrEHJ37d"
    },
    "libraryJars": [
      "./lib"
    ],
    "exportSettings" : {
      "maxSize" : 40,
      "batchSize" : 5000
    },
    "restHandlers": [],
    "models": [],
    "uiHandlers": [],
    "providers": [
      {
        "name": "filesystem-provider",
        "type": "FileSystem",
        "baseDir": "./config"
      },
      {
        "name": "saga-provider",
        "type": "Elastic",
        "nodeUrls": ["http://localhost:9200"],
        "timestamp": "updatedAt",
        "indexName": "saga",
        "encryptionKeyFile" : "./bin/saga.ek",
        "authentication": "none",
        "caFilePath": "",
		"trustAllSSL": false,
        "timeout": 90,
        "delay": 5,
        "retries": 3,
        "exclude": [ ]
      }
    ],
 	"logging_provider": {
      "name": "saga-logging-provider",
      "type": "Elastic",
      "nodeUrls": ["http://localhost:9200"],
      "timestamp": "updatedAt",
      "indexName": "saga",
      "encryptionKeyFile" : "./bin/saga.ek",
      "authentication": "none",
      "caFilePath": "",
      "trustAllSSL": false,
      "timeout": 90,
      "delay": 5,
      "retries": 3,
      "exclude": [ ]
    }
    "gpt3": {
      "key": "",
      "openAIHost": "https://api.openai.com",
      "openAIAPIVersion": "v1"
    }
  }
}
  • No labels