feat(subsonic): getUser + envelope-shaped 404 for /rest/* #11

Merged
bvandeusen merged 262 commits from dev into main 2026-04-19 23:13:40 -04:00
bvandeusen commented 2026-04-19 21:57:06 -04:00 (Migrated from git.fabledsword.com)

Summary

Feishin's first-login probe hits /rest/getUser.view to discover the authenticated identity's roles. We never registered the route, so chi returned a plain-text 404 — Feishin's parser treats anything non-Subsonic as a generic auth failure ("Failed to log in"), masking the real cause.

  • getUser: full role bag. Admins get every role; non-admins get the play-music subset. Single-user M1 means cross-user lookups by admins return the caller's roles for now; revisit when user management lands.
  • /rest/* 404 → envelope: any future client probing an unimplemented endpoint now sees a parseable failure (code=0, "Method not implemented") instead of plain text.

Test plan

  • docker compose up --build (no down -v needed — schema unchanged)
  • Feishin: OpenSubsonic provider, admin + bootstrap password, Legacy off → login succeeds
  • curl /rest/notARealMethod.view?u=...&t=...&s=... returns Subsonic envelope with status=failed

🤖 Generated with Claude Code

## Summary Feishin's first-login probe hits `/rest/getUser.view` to discover the authenticated identity's roles. We never registered the route, so chi returned a plain-text 404 — Feishin's parser treats anything non-Subsonic as a generic auth failure ("Failed to log in"), masking the real cause. - **`getUser`**: full role bag. Admins get every role; non-admins get the play-music subset. Single-user M1 means cross-user lookups by admins return the caller's roles for now; revisit when user management lands. - **`/rest/*` 404 → envelope**: any future client probing an unimplemented endpoint now sees a parseable failure (`code=0`, "Method not implemented") instead of plain text. ## Test plan - [ ] `docker compose up --build` (no `down -v` needed — schema unchanged) - [ ] Feishin: OpenSubsonic provider, admin + bootstrap password, Legacy off → login succeeds - [ ] `curl /rest/notARealMethod.view?u=...&t=...&s=...` returns Subsonic envelope with status=failed 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/minstrel#11