This is a proxy for getting an Exposure Key Export to esp-ena with ena-eke-proxy module.
- fetch daily and hourly keys
- return keys as binary for ESP-ENA ena-eke-proxy
- upload keys with pre-defined TANs to proxy
- check signature of Exposure Key Export
- upload keys to external server
- signature of binary keydata
payload format for a single key both for fetching and upload, concatenation for multiple keys.
Key Data | Rolling Start Interval Number | Rolling Period | Days Since Onset Of Symptoms |
---|---|---|---|
16 bytes | 4 bytes | 4 bytes | 4 bytes |
url for daily keys
/version/v1/diagnosis-keys/country/{countryCode}/date/{dateString}
url for hourly keys
/version/v1/diagnosis-keys/country/{countryCode}/date/{dateString}/hour/{hour}
page and size for pagination (default ?page=0&size=500 resulting in first 500 keys)
- 200 OK for successfull request with keys in payload
- 204 NO CONTENT for pagination out of bounds
- 404 NOT FOUND if keys are not available yet (not fetched)
- 406 NOT ACCEPTABLE for wrong/not supported country code
- 409 CONFLICT on error
upload url
/version/v1/diagnosis-keys
Authorization with submission token as value
- 200 OK for successfull upload
- 400 BAD REQUEST for errors in payload
- 401 UNAUTHORIZED for invalid/missing token in Authorization header
mvn clean package -P [database-profile]
available database-profiles, Spring Data JPA is used, see documentation for configuration
- db-inmemory in-memory, for testing
- db-mariadb MariaDB
- db-mysql MySql
- db-postgresql ProstgeSQL
Expample application.properties (place in path of ena-eke-proxy.jar)
# example with key urls from german App (Corona Warn App)
ena-eke-proxy.daily-url=https://svc90.main.px.t-online.de/version/v1/diagnosis-keys/country/%s/date/%s
ena-eke-proxy.hourly-url=${ena-eke-proxy.daily-url}/hour/%s
ena-eke-proxy.supported-countries=DE
ena-eke-proxy.source=CWA
ena-eke-proxy.debug.submission-keys=AAAAAAAAAA,BBBBBBBBBB,CCCCCCCCCC,ZZZZZZZZZZ,1234567890
# example with mariadb on localhost
spring.datasource.url=jdbc:mariadb://localhost:3306/databasename
spring.datasource.username=databaseuser
spring.datasource.password=databasepassword
spring.jpa.hibernate.ddl-auto=update
simple run java -jar ena-eke-proxy.jar
alternative systemd service example:
[Unit]
Description=ena eke proxy
After=syslog.target
Restart=on-failure
[Service]
User=enaekeproxy
ExecStart=/var/enaekeproxy/ena-eke-proxy.jar.jar
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=ena-eke-proxy
[Install]
WantedBy=multi-user.target