~bigbes/core-go: 46a4ad6a

auth: add Grants.IsSubset

This is a little bit hacky. Previously DecodeGrants would only store the
list of grants associated with the current service. This minimizes API
breakage by storing all grants as $service/$grant in the map key and
stores the local service name in the grant object, and updates
Grants.Has() to accept "$grant" and infer that it refers to a local
service or accept the fully qualified "$service/$grant" to test against
grants for any service -- which IsSubset makes use of to test that one
Grant object is a subset of another with respect to all services it has
grants for.

Drew DeVault <sir@cmpwn.com> — 2024-10-11 08:58:54 UTC

Commit 46a4ad6a4ded21294e5561d8094833674a21ec7dview raw patch

Parent(s): 0d6031be

1 changed file(s)

FileStatus+
auth/bearer.go M +35 -3