Seed command fails with ConnectRPC server - needs proper authentication
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 344
- Forks
- 47
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 26
Description
Problem
The frontier seed command fails with unauthenticated: not authenticated when targeting the ConnectRPC server (port 8002).
Current behavior
The seed command relied on the identity proxy header (X-Frontier-Email) for authentication. This header is essentially a backdoor — the legacy gRPC server had an interceptor (EnrichCtxWithPassthroughEmail) that trusted it, but the ConnectRPC server does not (and should not).
Even passing a valid session cookie fails:
$ frontier seed -H "Cookie:sid=<valid-session>"
failed to create custom permissions: failed to create custom permission: unauthenticated: not authenticated
Meanwhile, other CLI commands like frontier preferences get work fine with the same cookie on the ConnectRPC server.
Root cause
- Identity proxy header not supported on ConnectRPC server (by design — it's a security backdoor marked as deprecated in the codebase)
- AdminService endpoints (
CreatePermission,CreateRole) used by seed may have a different authentication path that doesn't work with session cookies on ConnectRPC - The seed command auto-constructs the header as
<key>:<sampleSeedEmail>instead of accepting properkey:valueauth headers
Expected behavior
The seed command should authenticate using proper mechanisms (session cookie, service user credentials, or API token) — not the identity proxy header.
Suggested fix
- Remove the identity proxy header dependency from the seed command
- Change
-Hflag to acceptkey:valueformat (like other CLI commands) for proper auth headers (e.g.,Cookie:sid=...) - Investigate why AdminService endpoints reject valid session cookies on ConnectRPC
- Remove the
-cconfig file flag dependency (no longer needed if not readingidentity_proxy_header)
Related
- Discovered while testing PR #1388 (CLI migration to ConnectRPC)
- The identity proxy header interceptor (
EnrichCtxWithPassthroughEmail) exists only in the legacy gRPC server and is marked deprecated
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the frontier seed command and compare its authentication handling with frontier preferences get, including the -H and -c flags. Read the AdminService CreatePermission and CreateRole paths and the EnrichCtxWithPassthroughEmail interceptor. Done means seed works against ConnectRPC with a supported session cookie, service credential, or API token without relying on the identity proxy header.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, authentication, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100