Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add options to host rules to enable mTLS calls to host #24155

Merged

Conversation

lyonlai
Copy link
Contributor

@lyonlai lyonlai commented Aug 30, 2023

Changes

Make the certificateAuthority, privateKey and certificate options available in hostRules option and pass them into got options so that Renovate will be able to communicate to target server that use mTLS as a way of authentication.

Context

We need to be able to call an internal data source that require mTLS as authentication method. Hence the change. Ideally the keys, certs and CA certificate will be loaded in our self-hosting Renovate and feed through secrets option.

The loaded credentials will be passed to got's https options

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@lyonlai lyonlai force-pushed the ylai/add-https-option-for-mtls-communication branch 2 times, most recently from 5ac05d9 to 930bfd3 Compare August 30, 2023 06:29
lib/util/http/host-rules.ts Outdated Show resolved Hide resolved
lib/util/http/host-rules.ts Outdated Show resolved Hide resolved
@lyonlai lyonlai force-pushed the ylai/add-https-option-for-mtls-communication branch from 930bfd3 to 612b0dc Compare August 30, 2023 06:44
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
lib/config/options/index.ts Outdated Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
@lyonlai lyonlai requested a review from rarkins August 31, 2023 04:25
lib/util/http/host-rules.ts Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
@Churro
Copy link
Collaborator

Churro commented Aug 31, 2023

We need to be able to call an internal data source that require mTLS as authentication method. Hence the change. Ideally the keys, certs and CA certificate will be loaded in our self-hosting Renovate and feed through secrets option.

IMHO, together with the new option, it would be crucial to highlight that a private key must not be specified directly there. The consequence would be a complete loss of confidentiality and RSA / EC keys floating around in renovate configs.

@lyonlai lyonlai force-pushed the ylai/add-https-option-for-mtls-communication branch from 81a1219 to aa06f5a Compare August 31, 2023 23:35
@lyonlai lyonlai requested a review from rarkins August 31, 2023 23:54
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
lib/util/http/host-rules.ts Show resolved Hide resolved
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
@lyonlai lyonlai requested a review from rarkins September 3, 2023 23:59
lib/config/options/index.ts Outdated Show resolved Hide resolved
lib/config/options/index.ts Outdated Show resolved Hide resolved
lib/config/options/index.ts Outdated Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
@lyonlai
Copy link
Contributor Author

lyonlai commented Sep 6, 2023

are we still waiting for anything else that needs to be resolved in this PR?

@rarkins rarkins added this pull request to the merge queue Sep 6, 2023
Merged via the queue into renovatebot:main with commit 667f137 Sep 6, 2023
36 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 36.87.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants