-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Problem statement
A short lived certificates and Cloud HSM providers are used in the more and more broader range of modern applications and services. This means that such certificates needs to be loaded from non-file storage or load them much often. Using file storage to update application certificates add additional overhead and complexity, and reduces security especially in shared environments (like public cloud computing or containerized environments).
Proposed solution
Loading certificates from any TStream descendant allows application to load certificates not only from the file storage, but from any custom storage including in-memory storage.
Proposal: To add public properties like CertStream, KeyStream, RootCertStream to the TTaurusTLSSSLOptions class which are mutually exclusive published properties CertFile, KeyFile, RootCertFile and add additional certificates and keys loading logic.
Use-case 1
Application needs uses cloud HSM provider to load server certificates.
Currently possible high-level workflow:
- Use
cloud HSM provider APIto load certificate and key to theTMemortStreams - Store content of streams to the files
- Update
CertFileand theKeyFileproperties in theTaurusTLSServerIOHandler(<your_instance>).SSLOptionsto the saved filenames. - Start or restart the
listener.
High-level workflow with streams:
- Use
cloud HSM provider APIto load certificate and key to theTMemortStreams ot it's descendant variables. - Assign these variables to the
CertStreamandKeyStreamproperies - Start or restart the
listener.
Use-case 2
Application API to renew or re-issue short-lived certificates from a Certificate Authority using ACME protocol or provided API.
Currently possible high-level workflow:
- Use
ACMEprotocol or anAPIprovided byCAto request and receive acertificate/keypair. - Parse obtained artifact to the
certificateandkeyand save them into files - Update
CertFileand theKeyFileproperties in theTaurusTLSServerIOHandler(<your_instance>).SSLOptionsto the saved filenames. - Start or restart the
listener.
High-level workflow with streams:
- Use
ACMEprotocol or anAPIprovided byCAto request and receive acertificate/keypair. - Parse obtained artifact to the
certificateandkeyand save them to theTMemortStreams ot it's descendant variables. - Assign these variables to the
CertStreamandKeyStreamproperies - Start or restart the
listener.
Possible issues
certificate/keypair can be returned in multiple formats (text or binary) needs ability to identify an format or declare certificate format from the stream content, but not a file extension.
P.S.
The similar request was declined by the IndySocket team more than 2 years ago.