Harden CIMD client resolution and caching

Tighten redirect URI validation for metadata documents, honor
Cache-Control no-store when caching fetched documents, and resolve
clients on the same transaction as authorization. Load
external_client_id from the database and parse unbounded max-stale
directives in cachecontrol.

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-06-19 16:51:30 +02:00
parent 5b0d3e5052
commit d7e23fd890
7 changed files with 257 additions and 54 deletions

View File

@@ -1433,7 +1433,7 @@ func (s *Service) Authorize(
if err := s.pg.WithTx(
ctx,
func(ctx context.Context, tx pg.Tx) error {
client, err := s.ResolveClient(ctx, req.ClientIDRaw, req.RedirectURI)
client, err := s.resolveClient(ctx, tx, req.ClientIDRaw, req.RedirectURI)
if err != nil {
return err
}