feat(m2m): NoSQL provider implementations for ServiceAccount + TrustedIssuer [Phase 1 — PR 2/5]#642
Merged
lakhansamani merged 3 commits intoJul 6, 2026
Conversation
959ac2d to
b6f3e3c
Compare
…providers
Replace the placeholder stubs in mongodb, arangodb, cassandradb, dynamodb,
and couchbase with real implementations matching the SQL reference semantics.
- UUID id generation and Key=ID parity on create; unix CreatedAt/UpdatedAt
- Update rejects a partial struct (CreatedAt==0 guard) per provider
- DeleteServiceAccount cascades to its TrustedIssuer rows
- ListTrustedIssuers optionally filters by serviceAccountID; pagination
returns {Limit, Page, Offset, Total}
- GetTrustedIssuerByIssuerURL is an indexed/keyed lookup (client_assertion
hot path): mongo/arango/cassandra/couchbase secondary index, dynamo GSI
- Per-provider collection/table setup added where the provider requires it
(mongo CreateCollection+indexes, arango CollectionExists+EnsureHashIndex,
cassandra CREATE TABLE + secondary indexes, dynamo ensureTables entries);
couchbase collections+primary indexes auto-create via reflection, only
secondary indexes added
github.com/openfga/openfga@v1.17.1 skips OIDC audience validation when --authn-oidc-audience is unset. We embed the FGA server in-process via server.WithDatastore and never wire its OIDC authn middleware, so the vulnerable path isn't reachable at runtime, but govulncheck flags it via static call-graph reachability and fails CI on every branch.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the
"not implemented"stubs from PR 1 with full CRUD implementations across all 5 NoSQL storage providers.Chains on: #641 (must merge first)
Providers to implement
Each provider gets two files following the pattern of the existing
webhook.goin that provider directory:storage/db/mongodb/)service_account.go,trusted_issuer.gostorage/db/arangodb/)service_account.go,trusted_issuer.gostorage/db/cassandradb/)service_account.go,trusted_issuer.go+ DDL inprovider.gostorage/db/dynamodb/)service_account.go,trusted_issuer.go+ table creation inprovider.gostorage/db/couchbase/)service_account.go,trusted_issuer.goCassandraDB DDL (must be added to
cassandradb/provider.go— no AutoMigrate):PR chain
Test plan
make test-all-dbgreen across all 7 backendsmake lintclean