fix(api-keys): harden scoped key auth after code review

Revoke existing keys on reset, unify scope enforcement, default empty
scopes to read-only, map API key scopes to tenant roles, and remove dead
key-generation helpers left over from the tenant api_key column removal.
This commit is contained in:
wizardchen
2026-07-05 10:40:49 +08:00
committed by lyingbug
parent 505bc7ddec
commit 3f516d7f31
17 changed files with 231 additions and 203 deletions
-3
View File
@@ -104,9 +104,6 @@ func (f *flowTenantSvc) DeleteTenant(context.Context, uint64) error { return nil
func (f *flowTenantSvc) ListTenants(context.Context) ([]*types.Tenant, error) {
return nil, nil
}
func (f *flowTenantSvc) UpdateAPIKey(context.Context, uint64) (string, error) {
return "", nil
}
func (f *flowTenantSvc) ExtractTenantIDFromAPIKey(string) (uint64, error) { return 0, nil }
func (f *flowTenantSvc) ListAllTenants(context.Context) ([]*types.Tenant, error) {
return nil, nil