Commit 951992c
committed
feat(security): add OIDC provider DDL with catalog persistence
Introduces CREATE, ALTER, DROP, and SHOW OIDC PROVIDER statements
end-to-end:
- SQL parser: OidcClaimMappingClause AST node; new oidc_provider
parse module handles CREATE/ALTER/DROP/SHOW OIDC PROVIDER syntax
including CLAIM MAPPING WHEN clauses with DEFAULT_DATABASE, ADD
DATABASES, and ADD ROLES sub-clauses.
- Catalog: _system.oidc_providers redb table storing StoredOidcProvider
(issuer, jwks_uri, audience, ordered claim-mapping rules, lsn).
put/get/list/delete ops on SystemCatalog.
- CatalogEntry: PutOidcProvider and DeleteOidcProvider variants wired
through apply, descriptor_stamp, gateway_invalidation (no-op),
post-apply sync, async dispatcher, and cluster metadata audit.
- DDL handlers: pgwire/ddl/oidc/ (create, alter, drop, show) enforce
superuser/ClusterAdmin privilege gates, write the catalog entry, and
emit OidcProviderChanged audit events.
- DatabaseDescriptor gains idle_session_timeout_secs field (default 0)
used later by ALTER DATABASE SET IDLE_TIMEOUT.1 parent aba9ed5 commit 951992c
26 files changed
Lines changed: 1061 additions & 10 deletions
File tree
- nodedb-sql/src/ddl_ast
- parse
- nodedb/src/control
- catalog_entry
- apply
- post_apply
- async_dispatch
- cluster
- security/catalog
- server/pgwire/ddl
- oidc
- router/ast
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments