mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:47:32 +00:00
fix(webkeys): remove include private key from projection index (#8436)
# Which Problems Are Solved When Web keys with a large RSA Bitsize were generated, the new web key did not get projected. Zitadel logs printed the following errors: ``` time="2024-08-15T09:18:47Z" level=debug msg="execution of statements failed" caller="/home/tim/Repositories/zitadel/zitadel/internal/eventstore/handler/v2/handler.go:518" error="statement failed: ID=CRDB-pKtsr Message=exec failed Parent=(ERROR: index row size 3400 exceeds btree version 4 maximum 2704 for index \"web_keys_web_key_state_idx\" (SQLSTATE 54000))" lastProcessedIndex=-1 projection=projections.web_keys ``` # How the Problems Are Solved Remove the the `WithInclude` option with the Private key from the `web_keys` projection index and bump the projection version. # Additional Changes - Correct RPC summaries for documentation - Fix docs slug in sidebar.js # Additional Context - Found during release review.
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
WebKeyTable = "projections.web_keys"
|
||||
WebKeyTable = "projections.web_keys1"
|
||||
|
||||
WebKeyInstanceIDCol = "instance_id"
|
||||
WebKeyKeyIDCol = "key_id"
|
||||
@@ -58,9 +58,6 @@ func (*webKeyProjection) Init() *old_handler.Check {
|
||||
handler.WithIndex(handler.NewIndex(
|
||||
"web_key_state",
|
||||
[]string{WebKeyInstanceIDCol, WebKeyStateCol},
|
||||
handler.WithInclude(
|
||||
WebKeyPrivateKeyCol,
|
||||
),
|
||||
)),
|
||||
),
|
||||
)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
select private_key
|
||||
from projections.web_keys
|
||||
from projections.web_keys1
|
||||
where instance_id = $1
|
||||
and state = $2
|
||||
limit 1;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
select key_id, creation_date, change_date, sequence, state, config, config_type
|
||||
from projections.web_keys
|
||||
from projections.web_keys1
|
||||
where instance_id = $1
|
||||
order by creation_date asc;
|
||||
|
@@ -1,3 +1,3 @@
|
||||
select public_key
|
||||
from projections.web_keys
|
||||
from projections.web_keys1
|
||||
where instance_id = $1;
|
||||
|
Reference in New Issue
Block a user