mirror of
https://github.com/floci-io/floci.git
synced 2026-11-29 16:35:29 -05:00
* refactor(acm): one issuer-signing primitive in CertificateGenerator
buildCertificate always signed with the subject's own key. signCertificate now
takes the issuer DN and key explicitly; generateCaCertificate and
generateIssuedCertificate sit on top of it, with serverAuth or clientAuth EKU on
leaves. Existing public methods keep their signatures and output; metadata now
follows ACM: colon-separated hex serial and the certificate's real signature
algorithm in upper case.
* refactor(cloudhsmv2): sign emulated hardware certificates through CertificateGenerator
Deletes the private generateCert copy; the shared primitive also marks the two
CA levels of the chain as CAs, which the old code did not.
* refactor(acm): normalize imported certificate metadata and check issued key relationships
ImportCertificate now stores the serial as colon-separated hex and the
signature algorithm in upper case, the same shape generated certificates
report. generateIssuedCertificate verifies the leaf against the issuer's
certificate and refuses a supplied key pair whose halves do not match.
* refactor(acm): refuse a supplied key pair that is not of the requested algorithm
* refactor(acm): match a supplied EC key pair by named curve, not field size
* feat(tls): FlociCertificateAuthority, a persistent local root CA
Loads or creates {persistent-path}/tls/floci-root-ca.{crt,key} with an
owner-only key, signs serverAuth and clientAuth leaves through
CertificateGenerator, and regenerates with a WARN when the pair is corrupt,
expired, not a CA, or the key does not match the certificate. A CDI producer
exposes the same pair to beans, using the directory the config bootstrap used.
* feat(tls): issue the HTTPS server certificate from the local CA
The leaf is floci-server.{crt,key}, signed by floci-root-ca; a pre-CA
self-signed leaf, a leaf from a regenerated CA and an expired leaf are replaced
on boot. Published through quarkus.tls.key-store.pem.0.* so the TLS registry
owns it and can reload it. The server key is written owner-only.
* feat: serve the local CA at GET /_floci/ca.pem
TlsLocalCaIntegrationTest boots the HTTP server on the TLS registry keys and
completes a handshake trusting only the PEM this endpoint serves.
* fix(lambda): inject the local root CA into containers instead of the server leaf
The leaf will be reissued as SANs grow; pinning it would break after the first
reissue. The CA is stable.
* docs(tls): trust the local CA once instead of disabling verification
* feat(tls): create private key files owner-only and log why a CA was regenerated
* feat(tls): serve the user certificate from ca.pem in custom-cert mode, log the CA fingerprint
With floci.tls.cert-path set, GET /_floci/ca.pem returns that file, the same
file the Lambda launcher mounts, and creates no local CA. The CA's SHA-256
fingerprint is logged at startup so an out-of-band copy can be checked, and a
file system without POSIX permissions gets a WARN instead of a silent default.
* feat(tls): ca.pem is a bundle in custom-cert mode; clear the bootstrap directory on every boot
With a user-provided certificate the endpoint returns that file followed by
the local CA, so both the HTTPS endpoint and anything Floci issues validate
from one file. TlsConfigSource resets its resolved directory on construction
so a later boot in the same JVM with TLS off or a user certificate never
reuses a stale value.
* docs(lambda): drop two em-dashes from the CA trust javadoc
* test(tls): cover an expired leaf, an expired CA, a missing CA key and the producer's directory choice
* docs(tls): describe IoT device certificates as a follow-up of the local CA