-
Notifications
You must be signed in to change notification settings - Fork 0
fix: setting originatingIpAddress for requestContext #222
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
Conversation
|
Is this grabbing the requester's IP address (ie originatingIpAddress) or is this grabbing our service's IP address? |
just our service's IP address in cases where the requester(grunt in this case) does not send their Ip address like on-demand jobs. |
|
Is there a way to fetch our IP internally without having to hit an external API like this? |
gateway/src/main/java/com/mx/path/gateway/context/GatewayRequestContext.java
Outdated
Show resolved
Hide resolved
Not that I know of. @mattnichols do you think we can do that ? |
|
Can you clean up your commit history? |
I don't think so. |
|
I am closing this MR to move this to a behavior instead. |
Summary of Changes
Today, the default behavior is an empty string if no value comes along in the aggregation or mobile requests for
x-forwarded-for, which is being considered for originatingIpAddress in core. We rather pass the connector the public IpAddress as the originatingIpaddress in the RequestContext model.MR that handles it in FHB accessor(as per client requirement): SAML single sign-on for MX Technologies · GitLab
We want to keep it generic so that it can be reusable for any such requirement in the future as well.
Fixes # (issue)
k8's https://gitlab.mx.com/mx/platform/k8s/-/merge_requests/4657/diffs
Public API Additions/Changes
Not related to a specific API
Downstream Consumer Impact
This is not a breaking change. No downstream consumer impact.
How Has This Been Tested?
Tested this change via path-accessor-q2-uux, which uses
RequestContext.current().getOriginatingIP()in theauthenticateWithUserKeyscenario and made sure an ipaddress is always sent and is never null.Checklist: