Skip to content

fix: Add validation IP address of registered service against allowed list#4837

Open
pavel-jares-bcm wants to merge 28 commits into
v3.x.xfrom
reboot/v3-allowed-list-ip-address
Open

fix: Add validation IP address of registered service against allowed list#4837
pavel-jares-bcm wants to merge 28 commits into
v3.x.xfrom
reboot/v3-allowed-list-ip-address

Conversation

@pavel-jares-bcm

@pavel-jares-bcm pavel-jares-bcm commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

Similirly as #4833 verifies the host name this PR checks IP addresses of onboarded services if they are in allowed list (including conversion from domain name to IP address).

Linked to # (issue)
Part of the # (epic)

Type of change

  • fix: Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • PR title conforms to commit message guideline ## Commit Message Structure Guideline
  • I have commented my code, particularly in hard-to-understand areas. In JS I did provide JSDoc
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The java tests in the area I was working on leverage @nested annotations
  • Any dependent changes have been merged and published in downstream modules

Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
pavel-jares-bcm and others added 10 commits July 23, 2026 15:47
Signed-off-by: Pavel Jareš <58428711+pavel-jares-bcm@users.noreply.github.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pavel Jareš <58428711+pavel-jares-bcm@users.noreply.github.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>

private static final String ORG_ZOWE_APIML_COMMON_URL_NOT_ALLOWED = "org.zowe.apiml.common.urlNotAllowed";

private final Cache<String, InetAddress[]> DOMAIN_TO_IP_ADDRESSES = Caffeine.newBuilder()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
private final Cache<String, InetAddress[]> DOMAIN_TO_IP_ADDRESSES = Caffeine.newBuilder()
private static final Cache<String, InetAddress[]> DOMAIN_TO_IP_ADDRESSES = Caffeine.newBuilder()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

A removed static because the class is singleton and it is necessary to clean during the testing. But I can revert it if you really thing it matters.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it's just about the sonar finding, if it's not "constant" then just rename the variable to camel


Register:
runs-on: ubuntu-latest
container:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this stage may need to have some tools installed

pavel-jares-bcm and others added 15 commits July 24, 2026 10:57
…r there)

Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pavel Jareš <58428711+pavel-jares-bcm@users.noreply.github.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
pavel-jares-bcm and others added 2 commits July 24, 2026 16:39
Signed-off-by: Pavel Jareš <Pavel.Jares@broadcom.com>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants