Skip to content

feat: expose token_endpoint_auth_method in gateway admin UI#3994

Open
ecthelion77 wants to merge 1 commit intoIBM:mainfrom
forterro:feat/token-endpoint-auth-method-upstream
Open

feat: expose token_endpoint_auth_method in gateway admin UI#3994
ecthelion77 wants to merge 1 commit intoIBM:mainfrom
forterro:feat/token-endpoint-auth-method-upstream

Conversation

@ecthelion77
Copy link
Copy Markdown
Contributor

✨ Feature PR

📌 Summary

Expose the OAuth2 token_endpoint_auth_method parameter in the gateway add/edit forms, allowing administrators to select between client_secret_post (default) and client_secret_basic.

Some OAuth2 providers (e.g., Freshworks/Freshservice) require client_secret_basic (HTTP Basic Auth header) instead of the default client_secret_post (credentials in POST body). Without UI support, reconfiguring a gateway through the admin panel silently drops the token_endpoint_auth_method setting, causing token exchange failures.

Fixes #3991

🧭 Type of Feature

  • Enhancement to existing functionality

💡 Implementation

admin.py: Read oauth_token_endpoint_auth_method from form data in both admin_add_gateway() and admin_edit_gateway(), and include it in oauth_config when present.

admin.html: Add a <select> dropdown in both the "Add Gateway" and "Edit Gateway" OAuth form sections, with options:

  • client_secret_post — credentials in POST body (default)
  • client_secret_basic — HTTP Basic Auth header

admin.js: In the editGateway() function, retrieve and populate the dropdown with the existing token_endpoint_auth_method value from the gateway's OAuth config.

The backend already supports token_endpoint_auth_method in oauth_config — this change only adds the UI surface.

🧪 Verification

Check Command Status
Lint suite make lint ⚠️ Not run (no local dev env)
Unit tests make test ⚠️ Not run (no local dev env)
Coverage ≥ 80 % make coverage ⚠️ Not run (no local dev env)
Manual verification Tested in production (Kubernetes) for 3+ weeks — Freshservice gateway configured via UI with client_secret_basic, token exchange succeeds. Editing the gateway preserves the setting.

📐 MCP Compliance

  • Matches current MCP spec
  • No breaking change to MCP clients
  • token_endpoint_auth_method is defined in RFC 6749 Section 2.3 and RFC 7591 Section 2

✅ Checklist

  • Code formatted
  • No secrets/credentials committed
  • DCO Signed-off-by included
  • UI changes follow existing Tailwind CSS patterns

@ecthelion77 ecthelion77 force-pushed the feat/token-endpoint-auth-method-upstream branch from f8d478c to 76e5fb2 Compare April 13, 2026 10:28
@ecthelion77
Copy link
Copy Markdown
Contributor Author

Suggested labels: enhancement, COULD, python, javascript, ui

@ecthelion77 ecthelion77 force-pushed the feat/token-endpoint-auth-method-upstream branch from 76e5fb2 to a4986de Compare April 14, 2026 12:46
@ecthelion77 ecthelion77 force-pushed the feat/token-endpoint-auth-method-upstream branch 3 times, most recently from 7930688 to ada83d8 Compare April 14, 2026 15:45
…RFC 6749)

Signed-off-by: Olivier Gintrand <olivier.gintrand@forterro.com>
@ecthelion77 ecthelion77 force-pushed the feat/token-endpoint-auth-method-upstream branch from ada83d8 to 658df2f Compare April 14, 2026 18:15
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.

[FEATURE]: Expose token_endpoint_auth_method in gateway admin UI

2 participants