POST /v1/database/{db_name}/sql
This bypasses onConnect and doesn't require a token. The docs indicate that it should require authorization
POST /v1/database/{db_name}/call/{reducer}
Yet this requires a JWT and runs through onConnect where owners can validate the JWT any way they wish.
Proposal
The sql endpoint should have auth validation and run through onConnect. As it is now it's a potential security vulnerability, especially since the docs indicate otherwise.
With a growing number of developers coming to SpacetimeDB, who knows what unexpected use cases people may find for this amazing tool. Someone may unwittingly expose user data they thought they protected via auth and onConnect validation.
If this is truly intended behavior, then the docs should really be updated to call this out. I would error on the side of caution and just protect it all.