Skip to content

test(smoke): support deployments where actuator endpoints are not exposed by the public ingress #627

Description

@XiaoSeS

This was generated by AI during triage.

Problem

scripts/smoke-test.sh uses one BASE_URL for both public application APIs and internal actuator checks. This produces a misleading failure when a deployment exposes /api/* through the public web ingress but keeps actuator endpoints on the backend service.

Observed in the test environment:

  • Direct backend http://127.0.0.1:8080/actuator/prometheus returns 401, matching RouteSecurityPolicyRegistry, PrometheusSecurityTest, and the smoke expectation.
  • Public https://skill.xf-yun.com.cn/actuator/prometheus returns 200 text/html, because web/nginx.conf.template does not proxy /actuator/* and the SPA fallback serves index.html.
  • The same public fallback also returns HTML for /actuator/health.

This is not evidence that Prometheus metrics are anonymously exposed, but the current smoke output makes it look like a security regression.

Expected behavior

Smoke testing should model the public application URL and the internal actuator URL separately, and must not treat an SPA fallback as an actuator response.

Suggested direction

  • Add a separate actuator/backend base URL (or an explicit actuator-skip mode) while preserving the 401 assertion against the real backend endpoint.
  • Validate response content type/body for health and Prometheus checks so 200 text/html cannot be accepted as actuator health.
  • Document the intended command for Compose, staging, and ingress deployments.
  • Keep /actuator/prometheus protected for anonymous backend requests.

Acceptance criteria

  • Public API smoke checks can run against a web ingress that does not expose actuator routes.
  • Actuator checks can target the backend service independently.
  • Anonymous access to the actual Prometheus endpoint is still asserted as 401.
  • SPA fallback responses are reported as routing/target errors, not successful actuator responses.
  • Script-level tests cover split public/backend URLs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeffort/s小改动或边界明确 / Small or well-bounded change.priority/p2中优先级 / Medium priority triage bucket.triage/needs-info需要补充更多信息后才能分流 / Issue needs more detail before it can be routed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions