Admin panel

General description

Admin panel is an application for:

  1. creating, managing, and publishing bots
  2. analysis of existing bots
  3. configuring Knowledge Base
  4. creating and running tests for bots
  5. managing users and permissions (via roles)

API

Default port: 5750

Application has got public HTTP API which is secured by OTP mechanism. It also has an UI portal that is secured by an internal users mechanism (login page).

There are default endpoints for monitoring purposes. They are described in Components monitoring section.

Databases

SQL

The component has its own SQL Database for storing data. Main tables:

  • users - table with all users (related tables: companies, roles - for permissions management)
  • projects - table for all bots (related tables: flows, contexts, nlu_models, integrations)
  • knowledgebase* - tables for storing and managing Knowledge Base
  • conversationtest* - tables for managing and running tests for bots

RabbitMQ

The component writes to queues:

  • automate.tests.conversation.execute - used for scheduling conversation tests
  • automate.knowledge.update - used for informing that Knowledge Base has changed

The component reads data from the queues:

  • automate.tests.conversation.execute - used for executing conversation tests
  • automate.train.completed - used for getting NLU training status

Redis

Application is using Reddis for PubSub solutions used for WebSockets synchronization between all nodes (channel name: chatbots-admin-websockets)

Communication

This service communicates with the following services:

ApplicationConfig to URLAuth
bot-integrationchatbots.senti-one-api.urlOTP
nlu-facadechatbots.nlu-facade-api.urlnone
gateway-apichatbots.gateway-api.urlnone
dialogschatbots.dialog-manager-api.urlnone
analyticschatbots.analytics-api.urlnone
voice-gatewaychatbots.voice-gateway-api.urlAPI key

Config

Application's config:

chatbots.admin {  
  host: "chatbots.sentione.com" # publicly visible admin's URL for generating links  
  is-https\: true # is admin available under SSL  
  nlu-client-timeout: 60m # NLU client request timeout (excluding training time)  
  password-confirmation-duration: 5m # how long password confirmation is valid (default 5m)  
  initial-sqls-path: /init.db # path for initial SQL script (adding user/company)  
  login-tries-per-hour: 10 # number of login tries per IP before blocking IP  
  language {  
    # available languages for bots (need to match NLU services)  
    available-bot-languages: ["pl", "de", "en", "multi"]  
  }  
  connectors {  
    # ath for Knowledge Base connectors to look for new import files  
    root-file-path: /var/kb  
  }  
  web-chat-demo-url: #(optional) URL to WebChat demo  
  mobile-chat {  
    # Reject JWKS URLs whose host resolves to a private or internal address when
    # validating a Mobile SDK channel. Keep `false` on public deployments; set it
    # to `true` only where the identity provider is reachable inside the network.  
    allow-private-jwks-hosts: false  
  }  
}


# SQL connection details
chatbots.admin.db {  
  url: "jdbc:postgresql://db:5432/chatbots-admin",  
  user: "postgres",  
  password: "root"  
  max-connections: 20  
}          

# Public API OTP Base32 keys - see the note below the snippet for the format
chatbots.admin.one-time-password {
  # OTP Base32 key for public API (aka ProjectsAPI, KnowledgeBaseAPI)  
  key: "PUT_BASE32_SECRET_HERE"  
  # OTP Base32 key for public ADMIN APi (for creating companies)  
  admin-key: "PUT_A_DIFFERENT_BASE32_SECRET_HERE"  
}          

# configuration section for Conversation Analytics module
# more information should be provided with module documentation
chatbots.admin.conversation-analytics {  
  custom-label-types: \[]  
  metadata-filters: \[]  
}          

# NLU training configuration
chatbots.admin.nlu {  
	# time for RabbitMQ to accept the train message  
  train-request-message-timeout: 30s
  # time for sync-training to finish (used only in Cross Validation)
  # for "normal" training timeout check _MarkNluTimeout_ Cron Job  
  train-response-message-timeout: 2h
  # Limit number of Complex NLU models on env (highly recommended)
  # https://automate.help.sentione.com/docs/comparison-of-available-intentizer-types
  complex-models-limit: 10
  # it is possible to disable classic simple and complex models if they are not enabled on environment
  classic-intentizer-enabled: true
}

# SSO configuration (optional)
chatbots.admin.sso-server {  
	# SSO Server's external URL (visible to the end-user)  
  public-url: "<http://host:port>"  
  # SSO Server's internal URL (visible to the admin application)  
  url: "<http://host:port>"  
  # client id and secret have to be added to SSO Server's config (chatbots.sso-server.clients)  
  client-id: "123"  
  client-secret: "234"  
  # default company, to which new users will be added  
  company-id: 1  
}          

# White-label configuration (optional)
chatbots.admin.white-label {  
	# Remember to add `play.filters.csp.directives.style-src` with proper domain
  # URL to custom CSS (optional)  
  custom-css: ""  
  # White label name supported by the platform (optional)  
  name: ""  
}

OTP key format

Both values under chatbots.admin.one-time-password are TOTP shared secrets (RFC 6238), given in Base32. The same applies to every otp-secret and OTP secret elsewhere in the platform's configuration.

AlphabetBase32 only: uppercase AZ and digits 27. No 0, 1, 8, 9, no padding, no other characters.
Length32 characters (160 bits) is recommended, and is what Automate itself generates for user two-factor secrets — 20 random bytes, Base32-encoded. Shorter keys work; the platform's own defaults are 16 characters (80 bits). Do not go below that.
UniquenessUse a different value for key and admin-key, and different values per environment. Never reuse a key across environments.
MatchingWhichever service authenticates against an endpoint must hold the identical string. A shared secret is symmetric — both sides derive the same one-time code from it.

Generate one with:

head -c 20 /dev/urandom | base32
🚧

A bad OTP key is not reported at startup

The value is used exactly as configured — nothing validates its alphabet or length when the application boots. A malformed key, or one that does not match the other side, therefore produces no startup error at all: every OTP-authenticated request simply fails to authorise. If a service suddenly cannot call an OTP-protected endpoint, compare the two configured values before looking anywhere else.

Codes themselves are 6 digits on a 30-second step, with a small tolerance for clock drift, and are passed in the X-Otp-Password header. Badly skewed server clocks will therefore also break OTP authentication.

Other required configurations:

# Redis configuration  
chatbots.concurrency {  
  redis {  
    host: "redis"  
    port: 6379  
  }  
} 

# RabbitMQ configuration  
chatbots.messaging {  
  rabbit {  
    hosts: ["HOST:PORT"]  
    username: "USER"  
    password: "PASSWORD"  
  }  
}          

# Other APIs URLs
chatbots.nlu-facade-api.url: "<http://host:port>"  
chatbots.gateway-api.url: "<http://host:port>"  
chatbots.dialog-manager-api.url: "<http://host:port>"  
chatbots.analytics-api.url: "<http://host:port>"          

# Bot Integration configuration
chatbots.senti-one-api {  
  url: "http://bot-integration:9010", # actual address for bot-integration service  
  secret: "KNSWG4TFORIGC43T" # same secret as defined in bot-integration service  
  }
  
# Voice Gateway. Required for the Voice Gateway and Mobile SDK channels: admin
# reads the available phone numbers and the available TTS/ASR providers with
# their configuration tags from here, and validates a channel's provider
# settings against it before saving.
chatbots.voice-gateway-api {
  url: "<http://host:port>"
  # (optional) appended to every request as the `apiKey` query parameter
  api-key: "PUT_KEY_HERE"
}

# Optional configuration of HTTP proxy for Integrations module
chatbots.integrations {
  proxy {
    host: "192.168.200.1"
    port: 8080
  }
}

Play Framework config

More information about Play Framework could be found in Play Framework configuration section

Job execution

RunKnowledgeBaseConnectors

This cron job checks if any from created connectors (table knowledge_base_connectors) need to run right now (the next execution date is in the past) and executes it.

Default schedule: every 5 minutes

RefreshLicense

This cron job validates and extends (if necessary) all online licenses (table licenses)

Default schedule: every hour

MarkNluTimeout

This cron job marks long-running (60min+) NLU training as failed.

Default schedule: every hour

Troubleshooting

NLU Training or Classify request (check phrase) failed

Check nlu-pipeline logs and look for "ERROR", probably intentizer failed ("Error when getting response from intentizer"). Investigate if intentizer container restarted and pass the issue to Research team

No analytics data in analytics module

See Analytics troubleshooting

No transcriptions

See Bot integration troubleshooting

Can't log in using SSO

See SSO troubleshooting

Error when using the application

Get logs and pass issues to the DEV team


Did this page help you?