Skip to content

fix: remove phantom client_app tools#52

Merged
Subterrane merged 1 commit intomainfrom
fix/remove-phantom-client-app-tools
Apr 16, 2026
Merged

fix: remove phantom client_app tools#52
Subterrane merged 1 commit intomainfrom
fix/remove-phantom-client-app-tools

Conversation

@Subterrane
Copy link
Copy Markdown
Contributor

Summary

Removes five tools that have never worked: list_client_apps, get_client_app, create_client_app, update_client_app, delete_client_app.

They call /api/2/api_authorizations/clients[...], which is not a real route. Per config/api2_routes.rb:65, /clients is nested under a specific authorization (/api/2/api_authorizations/:api_authorization_id/clients). The literal "clients" in the broken URLs was matching the :api_authorization_id slot, so:

  • list_client_apps404 ("resource with the given id could not be found")
  • get/create/update/delete_client_app400 (Rails HTML error fallback, no matching route)

Reproduced end-to-end against Chicken-Shadow — matches the reporter's table exactly.

Why remove rather than repoint?

There is no public OneLogin API (v1 or v2) for managing standalone API credentials. The only api_credentials route in core-api is config/routes.rb:847, which is an admin-UI session endpoint, not an API. There's nothing to repoint these tools at.

The legitimate nested /clients endpoint already has working tools: list_authorized_clients, add_authorized_clients, remove_authorized_clients (fixed in PR #48).

Impact

  • Agents that had learned to call these tools will now get a clear "unknown tool" error instead of a misleading 404/400 from an endpoint that never existed.
  • Registry count drops from 152 → 147 tools.
  • No schema changes to any remaining tool.

Fixes #50

Test plan

  • Reproduced each failure against Chicken-Shadow (confirmed 404/400 codes match reporter)
  • Confirmed /api/2/api_authorizations/clients is not a route in config/api2_routes.rb
  • Confirmed no v1/v2 public API for standalone API credentials exists in core-api
  • Module loads; getToolDefinitions() returns 147 tools with zero remaining client_app references

Removes list_client_apps, get_client_app, create_client_app,
update_client_app, delete_client_app — these hit
/api/2/api_authorizations/clients, which is not a real route. The
/clients sub-resource is nested (config/api2_routes.rb:65), so the
string "clients" was matching the :api_authorization_id parameter;
list returned 404 ("resource not found") and the item operations
returned 400 from Rails' HTML error fallback.

There is no public OneLogin API (v1 or v2) for managing standalone
API credentials / client apps — only an admin-UI session route at
config/routes.rb:847. Nothing to repoint these tools at, so they
come out.

The nested /clients endpoint is already covered correctly by
list_authorized_clients / add_authorized_clients /
remove_authorized_clients.

Reproduction against Chicken-Shadow confirmed reporter's findings
exactly (404 on list, 400 on the rest).

Fixes #50
@Subterrane Subterrane merged commit d5cb9c1 into main Apr 16, 2026
2 checks passed
@Subterrane Subterrane deleted the fix/remove-phantom-client-app-tools branch April 16, 2026 14:47
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.

client_app tools bugs

1 participant