tech5usa / TLSential

A server for providing short-lived TLS certificates to all services within a firewall restricted network.
GNU General Public License v3.0
15 stars 2 forks source link

Allow for downloading of the certs, keys #18

Closed d1str0 closed 4 years ago

d1str0 commented 4 years ago

All require auth

GET /api/certificate/{id}/cert Returns the certificate file

GET /api/certificate/{id}/issuer Returns the issuer's certificate as a file

GET /api/certificate/{id}/privkey Returns the certificate's private key as a file

todo[bot] commented 4 years ago

Refactor GetCert, GetIssuer, and GetPrivkey as they do almost the exact

https://github.com/ImageWare/TLSential/blob/4893de4555285e55d312d0b62aa4a2f7bbc9836f/api/certificate.go#L264-L269


This comment was generated by todo based on a TODO comment in 4893de4555285e55d312d0b62aa4a2f7bbc9836f in #18. cc @ImageWare.
todo[bot] commented 4 years ago

Add a PEM version of privkey and fullchain.

https://github.com/ImageWare/TLSential/blob/4893de4555285e55d312d0b62aa4a2f7bbc9836f/api/certificate.go#L384


This comment was generated by todo based on a TODO comment in 4893de4555285e55d312d0b62aa4a2f7bbc9836f in #18. cc @ImageWare.
d1str0 commented 4 years ago

Each of the above endpoints now requires Authorization: Secret {secret} instead of the usual Bearer and JWT. This means certs can be downloaded ONLY if you know the secret per certificate.

Certificate secrets generated randomly in the same manner as Super Admin passwords.