Skip to content

feat: require permissions to use debug with modifiable actuator#4820

Open
pablocarle wants to merge 25 commits into
v3.x.xfrom
reboot/fix/actuator-debug
Open

feat: require permissions to use debug with modifiable actuator#4820
pablocarle wants to merge 25 commits into
v3.x.xfrom
reboot/fix/actuator-debug

Conversation

@pablocarle

@pablocarle pablocarle commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

PR XX introduced the possibility of using the actuator /loggers and /gateway endpoints in debug mode. This PR adds restrictions to use it. Normal debug profile allows using them but in view-only mode.

A new debug profile is included to enable them in modifiy mode, but they will require an additional SAF resource on the user.

Also fix the acceptance tests in apiml and gateway-service modules to prioritize the production properties and only override what's needed for tests.

Type of change

  • feat: New feature (non-breaking change which adds functionality)

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

Pablo Carle added 3 commits July 14, 2026 14:57
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
@github-actions github-actions Bot added the Sensitive Sensitive change that requires peer review label Jul 16, 2026
Pablo Carle and others added 7 commits July 16, 2026 16:58
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
…-debug

Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Pablo Carle added 4 commits July 21, 2026 10:37
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Pablo Carle added 3 commits July 21, 2026 13:36
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
@pablocarle
pablocarle marked this pull request as ready for review July 21, 2026 12:19
Pablo Carle added 5 commits July 21, 2026 14:28
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Comment thread apiml/src/main/resources/application.yml Outdated
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
.authenticated()
)
.authorizeExchange(exchange -> exchange.matchers(pathMatchers("/application/**"))
.access(new SafAuthorizationManager<>(safResourceAccessVerifying, "ZOWE", "APIML.DEBUG", "CONTROL"))

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.

they can extracted as constants and used in both apiml and gw websecuirty config

))
.authenticated()
)
.authorizeExchange(exchange -> exchange.matchers(pathMatchers("/application/**"))

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.

is it intentional to require saf resource access for all the requests that are not HEAD and GET?

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.

yes, the other ones are all doing some sort of on-the-fly modification of the application

Signed-off-by: Pablo Carle <pablo.carle@broadcom.com>
}
}
)
.authorizeExchange(exchange -> exchange.matchers(

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.

could these rules be combined inside a single authorizeExchange block? something like:

.authorizeExchange(exchanges -> exchanges
    .pathMatchers(HttpMethod.GET, "/application/**").authenticated()
    .pathMatchers(HttpMethod.HEAD, "/application/**").authenticated()
    .anyExchange().access(new SafAuthorizationManager<>(
        safResourceAccessVerifying,
        "ZOWE",
        "APIML.DEBUG",
        "CONTROL"
    ))
)

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

Labels

Sensitive Sensitive change that requires peer review size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants