Initial implementation of IPv4 allow list in the webhook endpoint #4205
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(OK... this is embarrassing... as I'm about to open the PR and write the description - most code already written - I found this one here 🤦 damn! I still think there is some value in the PR tho)
There have been requests before of having some sort of IP allowlist.
This PR implements something like that. It creates a lambda that will be used as an
api gateway authorizer
to validate if the client ID is part the configured allowed CIDR ranges. (it is, pretty much exactly what was suggested here)Initially this will mostly be valid for self-hosted Github, but it can eventually be extended to load the IPs for Github cloud from wherever Github publishes them.
I'm creating as a draft PR as there's a couple of things missing (var descriptions), but I was keen on early feedback before taking the time to do those things 😅
So, for the maintainers: should I spend more time in making this PR "mergeable" so it can be available for more people? No hard feelings if not 😅 I can add the relevant capability just in our case like explained in the other PR.