instructlab / instructlab-bot

GitHub bot to assist with the taxonomy contribution workflow
Apache License 2.0
14 stars 16 forks source link

Add tls to gin apiserver #363

Open Gregory-Pereira opened 4 months ago

Gregory-Pereira commented 4 months ago

Addresses: #361 Looking for feedback:

  1. In a subsection of the buildHTTPClient function which previously lived in the sendPostRequest method for the API server, I load in the server CA certificate, which I am not sure I need.
  2. The way I have implemented buildHTTPClient function, it will first try to generate an HTTPS client, and if it fails reading the keys it will instead generate an HTTP client with an error describing as much, and those errors will get picked out of the sendPostRequest function and ignored with appropriate logging. Is this an acceptable implementation? Or if the user specifies they want an HTTPS sessions, and it fails, should the API server just fail to spin?

Changes:

PTAL @vishnoianil @nerdalert