Skip to content

App Gateway can't probe authenticated health check endpoint and get 200 Ok status #813

@Xeelee33

Description

@Xeelee33

def register_route_external_health(app):
@app.route('/external/healthcheck', methods=['GET'])
@swagger_route(security=get_auth_security())
@swagger_route()

The /external/healthcheck endpoint requires authentication, which is fine for the app service's health check but not compatible with Azure App Gateway probes, which require an unauthenticated endpoint. Without an unauthenticated endpoint available the probe has to be configured to consider a 401 or 403 error as "Healthy".

Is there a reason why the external health check was configured to be authenticated vs. non-authenticated? If you prefer keeping /external/healthcheck authenticated, would the team be open to adding a very basic and optional second health check route & function that is not authenticated (/external/healthcheckz) to support services like Azure App Gateway like the example below?

def register_route_app_gateway_health(app):
    @enabled_required("enable_external_healthcheck")
    @app.route(/external/healthcheckz', methods=['GET'])
    def app_gateway_health():
        return {
            "status": "ok"
        }, 200

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

Status

In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions