Skip to content

Conversation

@volosied
Copy link
Member

@volosied volosied commented Oct 23, 2025

fixes #32407

This does change an SPI class, so further review is needed.

@volosied volosied marked this pull request as draft October 23, 2025 18:20
@volosied
Copy link
Member Author

volosied commented Oct 24, 2025

!build (view Open Liberty Personal Build - ❌ completed with errors/failures.)

Note: Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link
Member

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 7 product code files were changed.
  • Please describe in a separate comment how you tested your changes.

@volosied volosied force-pushed the 32407-useForwardedHeaders-rename branch from 629d17b to 7d35080 Compare October 24, 2025 15:13
if (Objects.nonNull(serviceContext)) {

hostAddress = serviceContext.useForwardedHeadersInAccessLog() ? serviceContext.getForwardedRemoteHost() : null;
hostAddress = serviceContext.useRemoteIpOptionsInAccessLog() ? serviceContext.getForwardedRemoteHost() : null;
Copy link
Member

@mrsaldana mrsaldana Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure that this is more descriptive since the object that will be used is getForwardedRemoteHost() . While it is true that the remote host is calculated based on remote IP options, it itself is a forwarded (or x-forwarded) type header. So as it stands it would read : "use forwarded header or host address for the access log remote host" . We don't configure a remoteIP option that gives us a host, rather those options help determine if we consider the forwarded headers. There is one singular option for the access log to consider these headers, which is what this maps to, so I'd lean towards leaving at least this one as is or perhaps something like hasRemoteIpAccessLogEnabled/ isRemoteIpAccessLogEnabled / hasRemoteIpAccessLogOption

Copy link
Member

@mrsaldana mrsaldana Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or we could simply use the same name as the actual remote IP option for it: useRemoteIpInAccessLog . The more I think about it, the more I'd lean towards just using the same name as the property itself for this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, it's better for the public config to match. I've fixed it.

@volosied
Copy link
Member Author

volosied commented Oct 24, 2025

!build (view Open Liberty Personal Build - ❌ completed with errors/failures.)

Note: Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link
Member

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 9 product code files were changed.
  • Please describe in a separate comment how you tested your changes.

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.

Netty: Inconsistent Naming: useRemoteIpOptions and useForwardingHeaders

3 participants