robur-coop / albatross

Albatross: orchestrate and manage MirageOS unikernels with Solo5
ISC License
141 stars 17 forks source link

tls-endpoint: Listen on systemd socket #119

Closed Julow closed 1 year ago

Julow commented 1 year ago

Add support to albatross-tls-endpoint for listening on a systemd socket. This is useful to let systemd open priviledge ports safely.

The '--port' option is kept for compatibility and could also be added to the other commands thanks to a reusable cmdliner term.

hannesm commented 1 year ago

I think this is fine, but would like to hear from @reynir before merging.

Julow commented 1 year ago

The systemd service for the TLS endpoint needs to pass the public/private keys as argument. I'm not sure how to package that? The nixos module is an example :)

reynir commented 1 year ago

I added systemd examples for albatross-tls-endpoint. If you could take a look and see if it looks reasonable I'll merge this. Sorry for the long process.

Julow commented 1 year ago

Thanks! No need to make an example that runs immediately indeed.