Skip to content

Conversation

@pierrelalanne
Copy link
Collaborator

Summary

This MR teaches ggshield and HMSL how to support GitGuardian EU instance without special configurations.

Reminder: ggshield gets a JWT from a GitGuardian dashboard to later be authorized to call an HMSL instance.

Before this MR, the GitGuardian instance targeted to get a JWT was derived from the HMSL_URL defined in the config if any. This means that, unless you explicitly define it in your environment variable, you could never end up targeting the EU GitGuardian instance (there is no EU HMSL instance).

After this MR:

  • If a non-default HMSL_URL is defined with an env variable, we follow the user's logic, and we derive the GitGuardian dashboard URL from the HMSL URL.
  • If not, we just use the dashboard URL defined by the user.

Additional notes

The logic is a bit complex here. Note that anyway, the user can override any of the concerned config values with environment variables.

@codecov
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.57%. Comparing base (635ad8c) to head (3b2504f).
Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #990      +/-   ##
==========================================
- Coverage   91.58%   91.57%   -0.02%     
==========================================
  Files         180      180              
  Lines        7607     7607              
==========================================
- Hits         6967     6966       -1     
- Misses        640      641       +1     
Flag Coverage Δ
unittests 91.57% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pierrelalanne pierrelalanne force-pushed the plalanne/-/add-default-eu-support-for-hmsl branch from 69a1813 to 3b2504f Compare October 24, 2024 14:15
@pierrelalanne pierrelalanne self-assigned this Oct 24, 2024
@agateau-gg agateau-gg merged commit 26a2662 into main Oct 29, 2024
27 of 29 checks passed
@agateau-gg agateau-gg deleted the plalanne/-/add-default-eu-support-for-hmsl branch October 29, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants