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

Expose /env and /config for Configuration reporting #6652

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

letzya
Copy link
Contributor

@letzya letzya commented Oct 18, 2024

Description

Related Issue

Motivation and Context

How This Has Been Tested

These endpoints are a control port and a dedicated API key

// /env
~ » curl  -H "X-Tyk-Authorization: topsecret" 'http://localhost:8181/env' | jq '.[]' |grep -i cache

// /env?env=<env name>
~ » curl -s  -H "X-Tyk-Authorization: topsecret" 'http://localhost:8181/env?env=TYK_GW_CACHESTORAGE_PORT' | jq .
{
  "config_field": "cache_storage.port",
  "env": "TYK_GW_CACHESTORAGE_PORT",
  "value": "0",
  "obfuscated": false
}

// /config
~ » curl -s -H "X-Tyk-Authorization: topsecret" 'http://localhost:8181/config' | jq .cache_storage
{
  "type": "",
  "host": "",
  "port": 0,
  "hosts": {},
  "addrs": null,
  "master_name": "",
  "sentinel_password": "",
  "username": "",
  "password": "",
  "database": 0,
  "optimisation_max_idle": 0,
  "optimisation_max_active": 0,
  "timeout": 0,
  "enable_cluster": false,
  "use_ssl": false,
  "ssl_insecure_skip_verify": false,
  "ca_file": "",
  "cert_file": "",
  "key_file": "",
  "tls_max_version": "",
  "tls_min_version": ""
}

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring or add test (improvements in base code or adding test coverage to functionality)

Checklist

  • I ensured that the documentation is up to date
  • I explained why this PR updates go.mod in detail with reasoning why it's required
  • I would like a code coverage CI quality gate exception and have explained why

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.

1 participant