Andy Doan b176faa28e Make cert duration configurable with 3 year default
1 year was too short for what most people want in large fleets

Signed-off-by: Andy Doan <andy@foundries.io>
2023-12-07 13:24:21 -06:00
2022-10-10 21:26:09 -05:00
2022-10-11 21:37:00 -05:00
2022-10-10 16:36:57 -05:00
2022-10-10 16:36:57 -05:00
2022-10-10 13:13:57 -05:00

EST Server

The project is an open source implementation of the Enrollment over Secure Transport (EST) protocol as defined in RFC 7030 with added notes from RFC 8951 and RFC 8996. The primary use for this server is to allow Linux microPlatform devices to renew their certificates after they've been deployed to production.

Key Features from RFC 7030

  • 4.1 Distribution of CA Certificates /cacerts
  • 4.2.1 Client certificate enrollement /simpleenroll
  • 4.2.2 Client certificate renewal /simplereenroll

Deviations from RFC 7030

As this project's primary aim is handling device certificate renewal, optional features of the RFC have been omitted including:

  • 4.3 - CMC
  • 4.4 - Server side key generation
  • 4.5 - CSR attributes

Contributing

Pull requests are welcome. Run make check to verify changes will pass CI.

Building

The simple "standalone" server can be built with:

make bin/estserver

Using

TLS certificates for the server can be generate by using the helper script contrib/mk-tls-keypair.sh. Your factory's PKI directory was generated with a create_ca script. Once a CA is created, you can upload/authorize it with:

fioctl keys ca show --just-device-cas > /tmp/cas.pem
cat <new-ca.pem> >> /tmp/cas.pem
fioctl keys ca update /tmp/cas.pem
fioctl keys ca show --just-device-cas > client-cas.pem

Then run the server with:

$ ./bin/estserver \
    -root-cert <pkidir>/factory_ca.pem \
    -tls-cert <pkidir>/local-tls.pem \
    -tls-key <pkidir>/local-tls.key \
    -ca-cert <pkidir>/local-ca.pem  \
    -ca-key <pkidir>/local-ca.key \
    -client-cas  client-cas.pem

fioconfig can then be pointed at this service to rotate certificates with:

$ fioconfig renew-cert https://<SERVER_NAME>/.well-known/est
Description
No description provided
Readme BSD-3-Clause 95 KiB
Languages
Go 94.3%
Shell 4.3%
Makefile 1.4%