Open AlejandroGarcia95 opened 3 weeks ago
I think it would be better if you install a certificate for your terrakube installation because there are several parts of terrakube that wont work without "https".
For example if you are using the terraform/tofu cli with the registry it will require "HTTPS" and if you want to use the CLI drive workflow will also require "HTTPS"
@alfespa17 we have indeed installed Terrakube with HTTPS and confirmed the integration works. However, I think it should be useful to add a note on the integration docs stating the integration will not work without HTTPS. I believe there is no reason for that particular integration to fail with HTTP, so we might like to make the requirement more explicit.
Bug description 🐞
We have noticed this while trying to integrate Terrakube with our own Gitlab CE instance. The
GitlabToken
classes that implement the VCS integration with Gitlab assume Terrakube is deployed with HTTPS enabled, and they have thehttps
URL scheme hardcoded (for example, here). Of course, this might not be the case, as Terrakube can be deployed without enabling HTTPS. Additionally, this is inconsistent with theredirect_uri
shown in the Terrakube UI, as the UI itself can correctly detect thehttp
scheme.The result is that the integration itself fails with the following page on the Terrakube UI:![image](https://github.com/AzBuilder/terrakube/assets/13912744/3bd13044-a18e-4ca4-b512-aed86d24d31d)
Inspecting the logs on Gitlab, you can see the problem is that the
redirect_uri
used is usinghttps
:If I understood well, this does not happen when using Gitlab cloud, as the
redirect_uri
is not used for that integration.Also, I can confirm that if Terrakube is deployed with HTTPS enabled, the integration works.
Steps to reproduce
Install Gitlab CE (we are using their upstream Helm chart).
Install latest Terrakube without HTTPS support.
Follow the integration docs for Gitlab CE to try and integrate Terrakube with Gitlab.
Expected behavior
Integration should work without HTTPS enabled on Terrakube.
Example repository
No response
Anything else?
No response