mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-06 10:13:16 +00:00
# Which Problems Are Solved
HTTP Request to HTTP providers for Email or SMS are not signed.
# How the Problems Are Solved
Add a Signing Key to the HTTP Provider resources, which is then used to
generate a header to sign the payload.
# Additional Changes
Additional tests for query side of the SMTP provider.
# Additional Context
Closes #10067
---------
Co-authored-by: Marco A. <marco@zitadel.com>
(cherry picked from commit 8909b9a2a6)
28 lines
555 B
Go
28 lines
555 B
Go
package setup
|
|
|
|
import (
|
|
"context"
|
|
_ "embed"
|
|
|
|
"github.com/zitadel/zitadel/internal/database"
|
|
"github.com/zitadel/zitadel/internal/eventstore"
|
|
)
|
|
|
|
var (
|
|
//go:embed 62.sql
|
|
addHTTPProviderSigningKey string
|
|
)
|
|
|
|
type HTTPProviderAddSigningKey struct {
|
|
dbClient *database.DB
|
|
}
|
|
|
|
func (mig *HTTPProviderAddSigningKey) Execute(ctx context.Context, _ eventstore.Event) error {
|
|
_, err := mig.dbClient.ExecContext(ctx, addHTTPProviderSigningKey)
|
|
return err
|
|
}
|
|
|
|
func (mig *HTTPProviderAddSigningKey) String() string {
|
|
return "62_http_provider_add_signing_key"
|
|
}
|