+# Ports and certificates
+
+The MR normally opens the port 3905 for http. If a certificate and a key are provided the simulator will also open port 3906 for https.
+The certificate and key shall be placed in the same dir and the dir shall be mounted to /usr/src/app/cert in the container.
+
+| Port | Protocol |
+| -------- | ----- |
+| 3905 | http |
+| 3906 | https |
+
+The dir cert contains a self-signed cert. Use the script generate_cert_and_key.sh to generate a new certificate and key. The password of the certificate must be set 'test'.
+The same urls are availables on both the http port 3905 and the https port 3906. If using curl and https, the flag -k shall be given to make curl ignore checking the certificate.
+
+### Message Router interface ###
+
+Messages from the MR can be read using this url using http(s) GET:<br>
+```events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=<timeout>&limit=<limit>```<br>
+Both 'timeout' and 'limit' are optional.
+|Parameter|Description|
+|---------|--------------------|
+|limit|Optional parameter to limit the maximum number of messages to return. A value 0 < limit < 4096. If limit is not given, the limit is set to 4096.|
+|timeout|Optional parameter to control the max length of the poll. A value in milliseconds 0 < timeout < 60000. If timeout is not given, the timeout is 10 seconds. If not messages are available when the poll starts, the poll will end as soon as there is at least one message available|
+
+Messages to the MR can be written using this url http(s) POST/PUT:<br>
+```/events/A1-POLICY-AGENT-WRITE```<br>
+One or more messages can be written in the same operation.