Because SESAR operates on a tenant basis, an organization could have several tenants. The configuration file is therefore built so that the service is installed only once, but can retrieve the information of all the tenants.
Each SESAR is an instance that must be configured under "instances" in the SESAR.exe.config configuration file.
Configuration file structure
In the SESAR.exe.config file, the "SESAR.configs" section contains an "instances" element, in which each instance is declared by an "add" element carrying the following attributes:
- Serial=""
- APIUser=" "
- APIKey=" "
- RefreshInterval="300000"
- ConfigName="YourConfigName"
- Mode="Receive"
- KeyExchangesMode="PKCS"
- PathReceivedFolder="C:\SESAR\Temp\Receive"
- PathStoreFolder="E:\SecureExchanges Backup\Messenging"
- MaximumConcurrentMessageDownload="10"
- PKCSComKey=""
- PrivateFilesKey=""
- WebHook=""
- WebHookKey=""
- WebHookIv=""
Parameter details
See below for details of each parameter. The order of this list follows the original documentation and does not necessarily match the order of the attributes in the file.
- Serial: the serial number assigned by Secure Exchanges to your SESAR service. This serial number must hold a SESAR licence.
- APIUser: the "user key" assigned by Secure Exchanges, associated with your SESAR key.
- APIKey: the API key assigned by Secure Exchanges, associated with your SESAR key.
- RefreshInterval: the message retrieval refresh interval. Once SESAR has finished retrieving all the messages addressed to it, it will perform a check after this period. This value is in seconds. The minimum interval is 300,000, or 5 minutes. If the value is set to 0, the service will ignore this setting. When you double-click SESAR.exe, all instances set to 0 will be executed only once.
- ConfigName: the configuration name. This name will be used in the trace.
- Mode: currently, only Receive mode is supported.
- KeyExchangesMode: SESAR is designed to work with several modes. Currently, only PKCS mode is supported. Eventually, you will be able to configure two SESAR instances between two servers so that they exchange files automatically.
- PathReceivedFolder: the temporary folder where the "chunks" of each message will be downloaded.
- PathStoreFolder: the folder where the messages retrieved by SESAR will be stored, per user.
- PKCSComKey: your private key in base64, which will be used to decrypt the communication.
- MaximumConcurrentMessageDownload: for one instance, the maximum number of concurrent messages that can be executed at the same time. This value can affect performance. The default value is 10.
- PrivateFilesKey: a 4096-bit RSA key in base64 generated with the SECT.exe tool. This key is used to decrypt the files stored in encrypted form when using SESAR restore.
Warning: you must share the public key of PrivateFilesKey with the Secure Exchanges team. The public key is used to encrypt your files on your server, and only your SESAR service and your key will be able to decrypt them. The files are then kept as {filename}.see.
WebHook
The webhook is a web endpoint that must receive a SesarHook object as a parameter. This object is available in the .NET SDK.
The object is built as follows:
/// <summary>
/// The object used for SESAR webHook
/// </summary>
public class SesarWebHook
{
/// <summary>
/// The crypted manifest
/// </summary>
public string CryptedObject { get; set; }
/// <summary>
/// The hashkey of the crypted key used
/// </summary>
public string HashKey { get; set; }
}
C# example for a service, using ASMX:
[WebMethod]
[ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json)]
public void SESARHook(SesarWebHook args)
C# example for a service, using MVC:
[HttpPost]
public string SESARHook([FromBody] HookArgs SEManifest)
public class HookArgs
{
public SesarWebHook args { get; set; }
}
The value of the webhook will then be: https://[localhost]/[webservice]/[method]
- [localhost] = the address of your service.
- [webservice] = your endpoint: ASMX, MVC, etc.
- [method] = in our example, this is SESARHook.
The final value in our example would therefore be: https://localhost/Test.asmx/SESARHook
The webhook is sent every 30 seconds and processes all the files received. The webhook must throw an exception if anything goes wrong. If the webhook returns an HttpStatus of 200, the hook is considered successful.
Important information:
- The hook has a timeout of 5 minutes.
- The content type sent is: "application/json".
- The parameter sent is: { args : { CryptedObject : '', HashKey : ''}}.
- The CryptedObject is the StoreManifest object encrypted in base64 with the shared key.
- The HashKey is the SHA512 result of the key in base64.
Here is a C# example to decrypt your StoreManifest using the Secure Exchanges SDK:
var jsonObject = CryptoHelper.DecryptStringFromBytes(Convert.FromBase64String(cryptedObject), Convert.FromBase64String(base64Key), Convert.FromBase64String(base64Iv));
StoreManifest sesarStoreManifest = SerializationHelper.DeserializeFromJson<StoreManifest>(jsonObject);
WebHookKey
A 256-bit AES key in base64. You can generate this key with the SECT tools. The StoreManifest will be encrypted with this key, so your webhook must know it. Protect the key on your webhook's end.
WebHookIv
A 128-bit IV in base64. You can generate this value with the SECT tools. The StoreManifest will be encrypted with this value, so your webhook must know it. Protect it on your webhook's end.
Warning: once the service has started, the values of WebHook, WebHookKey, WebHookIv, Serial, APIUser, APIKey, PrivateFilesKey and PKCSComKey will be encrypted in a .sesar file named after your configuration. This file cannot be moved.
Need help?
Our team is available to assist you. Write to us at support@secure-exchanges.com
Related Articles