Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable health check request logs (admin) #3496

Merged
merged 1 commit into from
May 24, 2023

Conversation

project0
Copy link
Contributor

@project0 project0 commented Apr 19, 2023

The excluded path is wrong

Related issue(s)

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

The excluded path is wrong
@project0 project0 requested a review from aeneasr as a code owner April 19, 2023 07:51
@CLAassistant
Copy link

CLAassistant commented Apr 19, 2023

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Merging #3496 (86eb7b2) into master (cf20054) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

❗ Current head 86eb7b2 differs from pull request most recent head b831ff5. Consider uploading reports for the commit b831ff5 to get more accurate results

@@            Coverage Diff             @@
##           master    #3496      +/-   ##
==========================================
- Coverage   76.87%   76.85%   -0.03%     
==========================================
  Files         124      124              
  Lines        9175     9175              
==========================================
- Hits         7053     7051       -2     
- Misses       1673     1674       +1     
- Partials      449      450       +1     
Impacted Files Coverage Δ
cmd/server/handler.go 1.36% <0.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@project0 project0 changed the title fix: disable health check request logs fix: disable health check request logs (admin) Apr 19, 2023
@@ -201,7 +201,7 @@ func setup(ctx context.Context, d driver.Registry, cmd *cobra.Command) (admin *h
NewMiddlewareFromLogger(d.Logger(),
fmt.Sprintf("hydra/admin: %s", d.Config().IssuerURL(ctx).String()))
if d.Config().DisableHealthAccessLog(config.AdminInterface) {
adminLogger = adminLogger.ExcludePaths("/admin"+healthx.AliveCheckPath, "/admin"+healthx.ReadyCheckPath)
adminLogger = adminLogger.ExcludePaths(healthx.AliveCheckPath, healthx.ReadyCheckPath)
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure about this? The path is - if I recall correctly - /admin/health/status

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am pretty sure the path is actually /health/alive

when testing the endpoints manually i get a proper response:

curl localhost:4445/health/alive   
{"status":"ok"}

while localhost:4445/admin/health/status returns a 404.

this path is also used by the helm chart:
https://github.com/ory/k8s/blob/master/helm/charts/hydra/templates/deployment.yaml#L92-L95

@aeneasr aeneasr merged commit eddf7f3 into ory:master May 24, 2023
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.

4 participants