Skip to content

Authentication for metrics and version endpoint #1607

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

naveenpaul1
Copy link
Contributor

Explain the changes

  1. Call CreateAuthAPI rpc with a role metrics-auth to get the JWT token in the configuration phase, And the response token will be saved as secret(metrics-auth-secret)
  2. JWT is signed using the existing signature key JWT_SECRET that used to sign other admin and operator credentials.
  3. Secret will be used for authorization for both noobaa management and s3 ServiceMonitor.

Issues: Fixed #xxx / Gap #xxx

  1. RHSTOR-7202
    DFBUGS-1802

Testing Instructions:

containerized deployment

  1. The customer should be able to access the bearer token from the secret metrics-auth-secret, secret can be used for accessing noobaa management and endpoint metrics/version.
JWT_TOKEN=$(oc get secret/{token-secret-name} -n {namespace} -o jsonpath={.data.metrics_token} | base64 -d)    
curl -k -H "Authorization: Bearer ${JWT_TOKEN "https://{endpoint-loadbalancer-ingress-ip}:{endpoint-port}
curl -k -H "Authorization: Bearer ${JWT_TOKEN}" https://$(oc -n {namespace} get route noobaa-mgmt -o jsonpath='{.status.ingress[*].host}/version or metrics endpoints')
  1. Verify all the noobaa specific targets are up and scraping metrics from those tragets in kubernates/ODF

Design doc : https://ibm.ent.box.com/notes/1853310270159

  • Doc added/updated
  • Tests added

@naveenpaul1 naveenpaul1 force-pushed the metrics-auth-token branch from 3523050 to 7c92b87 Compare May 21, 2025 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant