Skip to content

feat(auth): faable auth connections create|update|enable|disable|rm + MCP create_auth_connection / update_auth_connection (§552) - #23

Open
boyander wants to merge 1 commit into
mainfrom
feat/auth-connections-create
Open

boyander wants to merge 1 commit into
mainfrom
feat/auth-connections-create

Conversation

@boyander

Copy link
Copy Markdown
Member

A new Auth tenant has no connections, so its clients fail at /authorize with "Client … has no login method available". Until now faable auth connections only had list. Backlog §552 (the connections part).

CLI

  • faable auth connections create -n <name> -t <type>: works for passwordless_email, database, the social providers and oidc/custom. It takes --enabled/--no-enabled (on by default), --client-id, --client-secret-file <path|->, --issuer, --authorize-url, --token-url, --userinfo-url, --jwks-url, --scope (repeatable), --organization, --disable-signup, --apple-team-id, --apple-key-id and --json.
    • The secret is read only from a file or from stdin. It is never printed back: the client_secret field shows [hidden], also with --json.
    • Provider flags on passwordless_email or database are refused with usage before any request is made.
  • update <connection> [--enabled|--no-enabled] [--name], plus enable and disable as shortcuts. A connection can be given by id or by name, using the same resolver as clients update --disable-connection.
  • rm <connection> asks for confirmation; --yes skips it, and in non-interactive mode it fails with confirmation_required.

MCP

  • create_auth_connection: the secret goes on stdin and is never put in argv. The shape it returns has no secret.
  • update_auth_connection: turns a connection on or off.
  • Both need --writes and are local only, because the hosted token only has read:connections (api tenant_access.ts).
  • The instructions now cover the "no login method available" case.

Tests

  • body.test.ts: the request body, the secret redaction and the Apple fields.
  • tools.connections.test.ts: the gating, the argv/stdin contract and that no secret comes back.
  • machine_mode: usage errors happen before any request.
  • Full suite: 533 passed + the new ones. src/lib/stdin.test.ts failed once under load and passes when re-run on its own. lint and build are clean.
  • Checked live on tenant account_6afdd7dad7f2cd1058fbab21: created a disabled github connection with a fake id and a secret from stdin (the secret was not in the output), renamed it, disabled it, checked that rm without --yes was refused, then deleted it. The tenant is back to its single email connection.

After the merge

  • Bump @faable/faable in the mcp repo and republish to the MCP registry. The new tools are local-only, so the hosted catalog does not change.

… un tenant nuevo nace sin conexiones y sus clientes fallan en /authorize con «has no login method available» (§552). create admite passwordless_email, database, sociales y oidc (--client-id, --issuer, endpoints, --scope, --apple-team-id/--apple-key-id); el client secret solo por fichero o stdin (--client-secret-file -) y nunca se imprime, ni con --json. MCP: create_auth_connection (secreto por stdin) y update_auth_connection (on/off), con --writes y solo en local: el token del alojado solo lee conexiones

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant