This article summarizes how ABRA Flexi handles the most common security threats on the server and REST API side, and what you can configure yourself.
Man in the middle attack
One possible attack on ABRA Flexi is the Man in the middle attack, in which the attacker impersonates the ABRA Flexi servers, the user provides their credentials, and the attacker can then use them to authenticate against the real servers and analyze the communication.
By default, ABRA Flexi generates a so-called self-signed certificate; you can replace the SSL certificate with your own. ABRA Flexi has two safeguards against this type of attack:
On startup, ABRA Flexi downloads the certificate and verifies it during further communication with the server. For this reason, the certificate cannot be replaced while the server is running.
DANE — storing the certificate fingerprint in DNS.
Storing the Certificate in DNS (DANE)
The data for the DNS record can be generated with the SWEDE tool:
$ ./swede --insecure create --port 5434 --certificate certifikat.pem --selector 1 --output rfc demo.flexibee.eu
_5434._tcp.demo.flexibee.eu. IN TLSA 1 0 1 85b928d1cab396d8e632d15d57b3a97ebbc2769ab74a292040dc4fc340153973
Instead of using SWEDE, you can also obtain the configuration directly from a running ABRA Flexi server:
GET https://server:5434/certificate/tlsa
The endpoint returns the TLSA record parameters and the certificate fingerprint — that is, the values usage, selector, matching type, and the fingerprint itself:
1 1 2 3419e6e0631325af64da1f064e7779f9…
You then add the following record to DNS:
_5434._tcp.demo.flexibee.eu. IN TXT TLSA 1 0 1 85b928d1cab396d8e632d15d57b3a97ebbc2769ab74a292040dc4fc340153973
The entire TLSA 1 0 1 85b928d1… is therefore stored as the value.
The lookup is performed in the following order:
_5434._tcp.demo.flexibee.eu.
_tcp.demo.flexibee.eu.
_5434._tcp.flexibee.eu.
_tcp.flexibee.eu.
🚨 If you are not also using DNSSEC, the security of the DNS server's response is not guaranteed — and neither is the benefit of DANE.
⚠️ The ABRA Flexi client does not yet support full DANE, only the parameters --selector 1, --mtype 1, and --usage 0.
If the client reports an error when evaluating the TLSA record, see the article Error: TLSAException – Timeout while resolving TLSA.
CSRF
ABRA Flexi has built-in protection against Cross Site Request Forgery, so no configuration is required in this regard.
SQL Injection and XSS
We put a great deal of effort into the design to prevent SQL Injection and Cross Site Scripting (XSS). These types of vulnerabilities therefore do not occur.
Password Storage
ABRA Flexi previously used the MD5 function to store passwords. It now uses salted SHA-256. Old passwords are re-encoded only when they are changed.
ℹ️ The password hash is calculated from the string salt + ":" + heslo. For details and a list of supported functions, see the article Contact Authentication.
