feat: implement UpdateZitadelProvider in ManagementService (#12384)

# Which Problems Are Solved

This PR adds support for updating ZITADEL identity provider (IDP)
templates.

# How the Problems Are Solved

- Implements `UpdateZitadelProvider` in the Management gRPC server plus
converter
- Introduces an org-scoped `ZitadelIDPChanged` event and registers its
event mapper.
- Adds command-side support to update org Zitadel providers and appends
the new event to the org write model.
- Extends the IDP template projection reducer to accept org change
events.

# Additional Changes
N/A

# Additional Context
Closes https://github.com/zitadel/zitadel/issues/11922
Follow up for PRs:

- https://github.com/zitadel/zitadel/pull/12018
- https://github.com/zitadel/zitadel/pull/12020
- https://github.com/zitadel/zitadel/pull/12055
- https://github.com/zitadel/zitadel/pull/12056
- https://github.com/zitadel/zitadel/pull/12371
- https://github.com/zitadel/zitadel/pull/12378

---------

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
Gayathri Vijayan
2026-07-07 04:32:18 +00:00
committed by GitHub
co-authored by Copilot Autofix powered by AI Livio Spring
parent bc9333aef9
commit 942607e0e9
11 changed files with 1128 additions and 19 deletions
+7 -1
View File
@@ -704,6 +704,10 @@ func (p *idpTemplateProjection) Reducers() []handler.AggregateReducer {
Event: org.ZitadelIDPAddedEventType,
Reduce: p.reduceZitadelIDPAdded,
},
{
Event: org.ZitadelIDPChangedEventType,
Reduce: p.reduceZitadelIDPChanged,
},
{
Event: org.IDPConfigRemovedEventType,
Reduce: p.reduceIDPConfigRemoved,
@@ -2640,8 +2644,10 @@ func (p *idpTemplateProjection) reduceZitadelIDPChanged(event eventstore.Event)
switch e := event.(type) {
case *instance.ZitadelIDPChangedEvent:
idpEvent = e.ZitadelIDPChangedEvent
case *org.ZitadelIDPChangedEvent:
idpEvent = e.ZitadelIDPChangedEvent
default:
return nil, zerrors.ThrowInvalidArgumentf(nil, "HANDL-qjMUfi", "reduce.wrong.event.type %v", []eventstore.EventType{instance.ZitadelIDPChangedEventType})
return nil, zerrors.ThrowInvalidArgumentf(nil, "HANDL-qjMUfi", "reduce.wrong.event.type %v", []eventstore.EventType{instance.ZitadelIDPChangedEventType, org.ZitadelIDPChangedEventType})
}
ops := make([]func(eventstore.Event) handler.Exec, 0, 2)