Skip to content

Conversation

@mateustd-ciandt
Copy link
Contributor

This update introduces functionality for extracting the client IP address from the x-forwarded-for header.

It checks if the client IP falls within a blocked range (e.g. 10.0.0.0/24).

If the IP is blocked: the request will be denied, and the response will include a header x-client-ip-allowed set to false.
If the request is allowed: the response will include a header x-client-ip-allowed set to true.

This functionality is exemplified in two new files: block_ip.go and block_ip_test.go, which include the corresponding logic and tests.

Also adding a callout_server.go and callout_tools.go just like we have for extproc but for extauthz, we will also use this for other examples in the future.

Since this is the first commit for extauthz for GO I'm also adding a Dockerfile, docker-compose and the ssl_creds folder.

@mateustd-ciandt mateustd-ciandt requested a review from a team as a code owner October 6, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant