aerogear / keycloak-metrics-spi

Adds a Metrics Endpoint to Keycloak
Apache License 2.0
526 stars 151 forks source link

remove public access to metrics and updated uri metrics output #114

Closed CathalOConnorRH closed 2 years ago

CathalOConnorRH commented 2 years ago

Motivation

Metrics are accessible outside of an openshift cluster, I've added a parameter to disable external access once the 'x-forwarded-host' header has data into as added by ha proxy on cluster.

Updated metrics to replace client id with '{id}' when uri metrics are enabled and not detailed.

Rajagopalan-Ranganathan commented 2 years ago

@CathalOConnorRH have we tested with keycloak on kubernetes? if it doesnt work there, we need to explicitly mention that this would only for openshift deployments.

CathalOConnorRH commented 2 years ago

@CathalOConnorRH have we tested with keycloak on kubernetes? if it doesnt work there, we need to explicitly mention that this would only for openshift deployments.

@Rajagopalan-Ranganathan We have tested but this doesn't work on kubernetes out of the box, it may if there is a proxy in front of the pod that sets the 'x-forwarded-host' header

Rajagopalan-Ranganathan commented 2 years ago

@pb82 can we have this reviewed and merged? we are waiting for this change to be rolled out , so that we can promote our changes to prod.

pb82 commented 2 years ago

@Rajagopalan-Ranganathan on it, sorry for the delay

Rajagopalan-Ranganathan commented 2 years ago

@Rajagopalan-Ranganathan on it, sorry for the delay

thanks!