-
Notifications
You must be signed in to change notification settings - Fork 30
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
[WIP] Protect query frontend using oauth proxy #997
[WIP] Protect query frontend using oauth proxy #997
Conversation
Signed-off-by: Ruben Vargas <[email protected]>
Signed-off-by: Ruben Vargas <[email protected]>
Signed-off-by: Ruben Vargas <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #997 +/- ##
==========================================
- Coverage 73.16% 73.06% -0.10%
==========================================
Files 106 109 +3
Lines 6606 6735 +129
==========================================
+ Hits 4833 4921 +88
- Misses 1480 1516 +36
- Partials 293 298 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Ruben Vargas <[email protected]>
@rubenvp8510 it would be great to provide some high level overview with notable changes in the PR description. E.g. two oauth-proxies are used in the query-frontend etc. Are they enabled by defalt? |
@rubenvp8510 there seems to be inconsistent behaviour for oauth-proxy for jaeger and tempo. The proxy is enabled for Tempo always, however for jaeger only when the route is enabled: kubectl apply -f - <<EOF
apiVersion: tempo.grafana.com/v1alpha1
kind: TempoStack
metadata:
name: simplest
spec:
storage:
secret:
name: minio-test
type: s3
storageSize: 1Gi
template:
queryFrontend:
jaegerQuery:
enabled: true
ingress:
type:
EOF Deploys oauth-proxy for Tempo, but not for Jaeger. I think we should be consistent and deploy the proxy for Jaeger and Tempo when the same configuration is applied. e.g. if we defaulting to enable proxy automatically we should do it for both components. |
@rubenvp8510 did you try configuring multiple upstreams https://github.com/openshift/oauth-proxy?tab=readme-ov-file#upstream-configuration? This way we can deploy a single proxy for both jaeger and tempo. Maybe we can be explicit for Jaeger and set the upstream to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check if the query frontend listens to localhost only (I think the tempo config must be updated)? Otherwise it'll be still accessible.
You can check the open ports of a pod with
# On the host, find the PID of the application running inside the container
ps ax | grep my-application
# List open TCP ports
sudo nsenter -t <pid> -n ss -lntp
if you use KinD or Minikube.
Ohh you're right! is still listening on all the interfaces! Thanks, I'll check this part. |
Yeah this was the behaviour previously, so I think some code of that is still there. I will fix this. |
Signed-off-by: Ruben Vargas <[email protected]>
3c7a6ad
to
1eea353
Compare
Signed-off-by: Ruben Vargas <[email protected]>
Signed-off-by: Ruben Vargas <[email protected]>
Signed-off-by: Ruben Vargas <[email protected]>
Signed-off-by: Ruben Vargas <[email protected]>
Signed-off-by: Ruben Vargas <[email protected]>
No description provided.