As SESAR works by “tenant”, an organization could have several “tenants”. So the configuration file is built so that the service is installed only once, but can retrieve information from all tenants
So each SESAR is an instance that must be configured under "instances" in the configuration file, in the SESAR.exe.config file
Serial
The serial number assigned by Secure Exchanges to your SESAR service. This serial number must have a SESAR license
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 intended for it, it will check after this time. This value is in seconds. The minimum wait interval is 300000, or 5 minutes. If the value is 0, the service will ignore this configuration. When you double click on the SESAR.exe all, the instances at 0 will be executed only once.
ConfigName
The name of the configuration. 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 can configure 2 SESARs 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 that SESAR will have retrieved by user will be stored
PKCSComKey
Your private key in base64 which will be used to decrypt the communication
MaximumConcurentMessageDownload
For an instance, the maximum number of concurrent messages that can be executed at the same time. This value can impact performance. Default value is 10.
PrivateFilesKey
A 4096-bit base64 RSA key generated with the SECT.exe tool. This key will be used to decrypt the files stored encrypted when using the SESAR restore. ATTENTION, you must share the public key of this key with the Secure Exchanges team. The public key will be used to encrypt your files on your server, and only your SESAR and your key will be able to decrypt the files. The files will then be kept under {filename}.see
WebHook
The webhook is a web endpoint that must receive a SesarHook object as a parameter. (Available in SDK.net)
The object is constructed 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 crytped key used
/// </summary>
public string HashKey { get; set; }
}
Example in C# for a service
ASMX
[WebMethod ]
[ScriptMethod(UseHttpGet =false, ResponseFormat = ResponseFormat.Json)]
public void SESARHook(SesarWebHook args)
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]/[methode][localhost] = the address of your service
[webservice] = your end point. ASMX, MVC etc ..
[methode] = In our example it is SESARHook
Final value in our example would be :
https://localhost/Test.asmx/SESARHookThe webhook is sent every 30 seconds, and processes all the files received. The webhook will have to throw an exception if something goes wrong. If the webhook returns an HttpStatus of 200, the hook will be considered successful.
Informations importantes :
The hook has a timeout of 5 minutes The content type sent is: "application/json" The parameter sent is: { args: { CryptedObject: '', HashKey: ''}} The crypted object is the Storemanifest object encrypted in base64 with the shared key The HashKey is the SHA512 result of the base64 key
Here is an example in c# 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 base64 AES key. You can generate this key with SECT tools. The SoteManifest will be encrypted with this key, so your webhook must know it. Protect the key on the side of your webhook.
WebHookIv
A 128-bit base64 IV. You can generate this key with SECT tools. The SoteManifest will be encrypted with this key, so your webhook must know it. Protect the key on the side of your webhook.
** Please note, once the service has started, the values of WebHook, WebHookKey, WebHookIv, Serial, APIUser, APIKey PrivateFilesKey and PKCSComKey will be encrypted in a .sesar file in the name of your configuration. This file is not movable.