---
###############################################################################
#                                                                             #
#                     Optimize Environment Configuration                      #
#                                                                             #
###############################################################################

# Note: for all possible configuration options please have a look
#       at the Optimize documentation:
#       https://docs.camunda.org/optimize/${docs.version}/technical-guide/setup/configuration/

security:
  auth:
    token:
      secret: Masked
    # List of user ids that are granted full permission to all collections, reports & dashboards
    # Note: For reports these users are still required to be granted access to the corresponding process/decision
    # definitions in Camunda BPM Admin
    superUserIds: ['retAdmin']

container:
  # A host name or IP address, to identify a specific network interface on
  # which to listen.
  host: 0.0.0.0
  ports:
    # A port number that will be used by Optimize to process HTTP connections.
    # If set to null, ~ or left empty, http connections won't be accepted.
    http: 8102
    # A port number that will be used by Optimize to process
    # secure HTTPS connections.
    https: 8103
  # Optional url to access Optimize (used for links to Optimize in e.g. alert emails)
  # If no value specified the container host and port are used instead.
  accessUrl: null

# Configuration for engines used to import data. Please note that you have to have at
# least one engine configured at all times.
engines:
  # An alias of the engine, which will be used for internal purposes like
  # logging and displaying which data belong to which engine.
  'camunda-bpm':
    # The process engines name on the platform, this is the unique engine identifier on the platforms REST API.
    name: default
    # A default tenant to the be injected on data from this engine where no tenant is configured in the engine itself.
    # This property is only relevant in the context of a `One Process Engine Per Tenant`.
    # For details consult the Multi-Tenancy documentation.
    defaultTenant:
      # the id used for this default tenant on persisted entities
      id: null
      # the name used for this tenant when displayed in the UI
      name: null
    # A base URL that will be used for connections to the Camunda Engine REST API.
    rest: 'http://workflow-service:8083/workflow/engine-rest'
    # Determines whether this instance of Optimize should import definition & historical data from this engine.
    importEnabled: true
    # Determines whether this instance of Optimize should convert historical data to event data
    # usable for event based processes.
    eventImportEnabled: false
    authentication:
      # Toggles basic authentication on or off. When enabling basic
      # authentication, please be aware that you also need to adjust the values
      # of the user and password.
      # Also note, when enabled, it is required that the user has
      # * READ & READ_HISTORY permission on the Process and Decision Definition resources
      # * READ permission on the Authorization, Group, User & Tenant resources
      # to enable users to log in and Optimize to import the engine data.
      enabled: false
      #When basic authentication is enabled, this password is used to
      #authenticate against the engine.
      password: ''
      #When basic authentication is enabled, this user is used to authenticate
      #against the engine.
      user: ''
    # The webapps configuration allows Optimize to directly link
    # to the other Camunda Web Applications, e.g. to jump from
    # Optimize directly to a dedicated process instance in Cockpit
    webapps:
      # Defines the endpoint where to find the camunda webapps
      endpoint: 'http://workflow-service:8083/workflow/camunda'
      # Enables/disables linking to other Camunda Web Applications
      enabled: true

# everything that is related with configuring Elasticsearch or creating
# a connection to it.
es:
  connection:
    # a list of Elasticsearch nodes Optimize can connect to. If you  have built
    # an Elasticsearch cluster with several nodes it is recommended to define
    # several connection points in case one node fails.
    nodes:
    # the address/hostname under which the Elasticsearch node is available.
    - host: 'vpc-ret-perf-es-52ppdijfwqa4225osozdx4civy.us-east-1.es.amazonaws.com'
      # A port number used by Elasticsearch to accept HTTP connections.
      httpPort: 443
    # HTTP forward proxy configuration
    proxy:
      # whether an HTTP proxy should be used for requests to elasticsearch
      enabled: false
      # the host of the proxy to use
      host: null
      # the port of the proxy to use
      port: null
      # whether this proxy is using a secured connection
      sslEnabled: false

  # Elasticsearch security settings
  security:
    # the basic auth (x-pack) username
    username: null
    # the basic auth (x-pack) password
    password: null
    # SSL/HTTPS secured connection settings
    ssl:
      # path to a PEM encoded file containing the certificate (or certificate chain)
      # that will be presented to clients when they connect.
      certificate: null
      # A list of paths to PEM encoded CA certificate files that should be trusted, e.g. ['/path/to/ca.crt'].
      # Note: if you are using a public CA that is already trusted by the Java runtime,
      # you do not need to set the certificate_authorities.
      certificate_authorities: []
      # used to enable or disable TLS/SSL for the HTTP connection
      enabled: true

  settings:
    index:
      # the prefix prepended to all Optimize index and alias names
      # NOTE: Changing this after Optimize was already run before, will create new empty indexes
      prefix: 'optimize'
      # How often should the data replicated in case of node failure.
      number_of_replicas: 2
      # How many shards should be used in the cluster for process instance and decision instance indices.
      # All other indices will be made up of a single shard
      # NOTE: this property only applies the first time Optimize is started and
      # the schema/mapping is deployed on Elasticsearch. If you want to take
      # this property to take effect again, you need to delete all indexes (with it all data)
      # and restart Optimize.
      number_of_shards: 5

import:
  data:
    dmn:
      # Determines if the DMN/decision data, such as decision definitions and instances
      # should be imported.
      enabled: true
    user-task-worker:
      # Determines if the user task worker data, such as assignee or candidate group of
      # a user task, should be imported.
      enabled: true
  # The identity sync enables Optimize to build up a in memory cache containing Optimize authorized users & groups.
  # This data is used in the collection permissions to allow convenient search capabilities
  # and to display member meta-data such as first name, last name or email.
  identitySync:
    # Whether to include metaData (firstName, lastName, email) when synchronizing users
    includeUserMetaData: true
    # Cron expression for when the identity sync should run, defaults to every second hour.
    cronTrigger: '0 */2 * * *'

serialization:
  # Define a custom date format that should be used for
  # fetching date data from the engine(should be the same as in the engine)
  engineDateFormat: yyyy-MM-dd'T'HH:mm:ss.SSSZ

plugin:
  variableImport:
    #Look in the given base package list for variable import adaption plugins.
    #If empty, the import is not influenced.
    basePackages: []
  engineRestFilter:
    #Look in the given base package list for engine rest filter plugins.
    #If empty, the REST calls are not influenced.
    basePackages: []
  authenticationExtractor:
    # Looks in the given base package list for authentication extractor plugins.
    # If empty, the standard Optimize authentication mechanism is used.
    basePackages: ["com.mgic.ret.camunda.optimize.auth"]

email:
  # A switch to control email sending process.
  enabled: false
  # Email address that can be used to send alerts
  address: ''
  # The smtp server name
  hostname: ''
  # The smtp server port. This one is also used as SSL port for the security connection.
  port: 587
  # Define configuration properties for the authentication of the email server
  authentication:
    # A switch to control whether the email server requires authentication
    enabled: true
    # Username of your smtp server
    username: ''
    # Corresponding password to the given user of your smtp server
    password: ''
    # States how the connection to the server should be secured.
    # Possible values are 'NONE', 'STARTTLS' or 'SSL/TLS'
    securityProtocol: 'NONE'

sharing:
  # decides if the sharing feature of Optimize can be used in the UI.
  enabled: true

historyCleanup:
  # cron expression for when the cleanup should run
  cronTrigger: '0 1 * * *'
  # default time to live (ttl) for data, when reached the corresponding process/decision/event instances will get cleaned up
  # Format is ISO_8601 duration  https://en.wikipedia.org/wiki/ISO_8601#Durations
  ttl: 'P2Y'
  processDataCleanup:
    # switch for the Camunda process data cleanup, defaults to false
    enabled: false
    # type of process data cleanup to perform, possible values:
    # 'all' - delete everything related to the process instance
    # 'variables' - only delete associated variables of a process instance
    cleanupMode: 'all'
    # process definition specific configuration parameters that will overwrite the general parameters (ttl, processDataCleanupMode)
    # for the specific processDefinition key
    perProcessDefinitionConfig:
    # 'myProcessDefinitionKey':
    #   ttl: 'P2M'
    #   cleanupMode: 'variables'
  decisionDataCleanup:
    # switch for the Camunda decision data cleanup, defaults to false
    enabled: false
    # decision definition specific configuration parameters that will overwrite the general parameters (ttl)
    # for the specific decisionDefinition key
    perDecisionDefinitionConfig:
    # 'myDecisionDefinitionKey':
    #   ttl: 'P2M'
  ingestedEventCleanup:
    # switch for the ingested event data cleanup, defaults to false
    enabled: false

locales:
  # all locales available
  # Note: for others than the default there must be a <localeCode>.json file available under ./environment/localization.
  availableLocales: ['en', 'de']
  # the fallback locale is used if there is a locale requested that is not available in availableLocales
  fallbackLocale: 'en'

ui:
  header:
    # determines the color theme of the text in the header. Currently 'dark' and 'light' are supported.
    textColor: 'dark'
    # Path to the logo that is displayed in the header of Optimize.
    # Path can be:
    # * relative: starting from the environment folder you can provide a relative path.
    # * absolute: full path in the file system.
    #
    # Supported image formats can be found here:
    # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Supported_image_formats
    pathToLogoIcon: 'logo/camunda_icon.svg'
    # a hex encoded color that should be used as background color for the header. Default color is white.
    backgroundColor: '#FFFFFF'

eventBasedProcess:
  authorizedUserIds: []
  eventImport:
    # Determines whether this Optimize instance performs event based process instance import.
    enabled: false
  eventIngestion:
    # Secret token to be provided on the Ingestion REST API when ingesting data.
    # If set `null` a random token will be generated with each startup of Optimize and logged.
    accessToken: null
    
export:
  csv:
    limit: 10000


