Secure Session configured with a BaaS api-connector
requires the following:
conversational context
api-connector
that that can map conversational context
into a call to the hosted APIThe overall process can be summarized as:
conversational context
is configured on initialization with an item(s) that can identify the userapi-connector
invocation that triggers the Authorization API. If the call is successful, the message continues to ingress, if not, the message is blocked.ValidationInterval
expires. More details for this are given below.The first step is configuring the BaaS api-connector
that can communicate with the Authorization API, an example is shown below:
{
"Method": "POST",
"Endpoint": "https://my-authorization-api.com/VerifyToken",
"Headers": {
"Authorization": "srn:vault::acme:secret:my-authorization-api-key"
},
"Alias": "SecureSessionBaaS",
"RequestMapping": {
"tokenToVerify": {
"type": "requestBody",
"requestBodyPath": "$.token",
"inputPath": "$.secureTokenForUser"
}
},
"ResponseMapping": {},
"Type": "api-connector",
"Body": {}
}
This BaaS does the following:
Authorization
header. The Authentication on the API will depend on your specific implementation.secureTokenForUser
into the token
field in the body of the request. secureTokenForUser
is assumed to be at the root level of the conversational context
in this instance.The implementation of the Authorization API will vary across different use cases. To use the BaaS api-connector
above, the API must do the following:
token
and verify it is a valid200
for success, 4xx
for failureAn example bot configuration is shown below:
{
"State": "RUNNING",
"SecureSession": true,
"SecureSessionConfig": {
"Type": "baas",
"ValidationInterval": 60,
"ApiAlias": "SecureSessionBaaS"
},
"Workers": [
{
"Type": "nlp-worker",
"Id": "6cefded5-7c09-4e67-ad81-6dc0f96b6462"
}
],
"QuietTimeEnabled": false,
"NluManagementMode": "ServisBOT",
"Persona": "AIBot",
"Organization": "engjohn",
"DisplayName": "BurgerBot",
"Id": "sbIuyRQdU",
"Name": "securebot"
}
Taking a closer look at the Secure Session configuration:
"SecureSession": true,
"SecureSessionConfig": {
"Type": "baas",
"ValidationInterval": 60,
"ApiAlias": "SecureSessionBaaS"
},
true
to enable Secure Sessionbaas
to enable the check against the SecureSessionBaaS
api-connector
api-connector
to use