What problem does it solve?
Users often struggle with securely managing OAuth tokens for multiple OpenShift clusters, leading to token exposure, code duplication, and complex authentication logic. This skill centralizes token retrieval and injection, eliminating these issues and simplifying authenticated API requests.
Core Features & Use Cases
- Automated Token Handling: Automatically retrieves and injects OAuth tokens into
curl requests.
- Multi-Cluster Support: Seamlessly works with multiple OpenShift cluster contexts configured in
kubeconfig.
- Enhanced Security: Prevents accidental token exposure in command history or logs.
- Use Case: Instead of manually fetching tokens and adding
Authorization headers, simply prefix your curl command with curl_with_token.sh <cluster_api_url> to make secure API calls to any OpenShift cluster.
Quick Start
Example: Authenticated API call to app.ci cluster
curl_with_token.sh https://api.ci.l2s4.p1.openshiftapps.com:6443 -X POST
-d '{"job_name": "my-job"}'
https://gangway-ci.apps.ci.l2s4.p1.openshiftapps.com/v1/executions