mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-06 08:42:18 +00:00
feat: http provider signing key addition (#10641)
# 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)
This commit is contained in:
committed by
Livio Spring
parent
d2d94ea088
commit
1a7cd6e1af
63
internal/api/grpc/object/converter_test.go
Normal file
63
internal/api/grpc/object/converter_test.go
Normal file
@@ -0,0 +1,63 @@
|
||||
package object
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
object_pb "github.com/zitadel/zitadel/pkg/grpc/object"
|
||||
)
|
||||
|
||||
func Test_ListQueryToModel(t *testing.T) {
|
||||
type args struct {
|
||||
req *object_pb.ListQuery
|
||||
}
|
||||
type res struct {
|
||||
offset, limit uint64
|
||||
asc bool
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
res res
|
||||
}{
|
||||
{
|
||||
name: "all fields filled",
|
||||
args: args{
|
||||
req: &object_pb.ListQuery{
|
||||
Offset: 100,
|
||||
Limit: 100,
|
||||
Asc: true,
|
||||
},
|
||||
},
|
||||
res: res{
|
||||
offset: 100,
|
||||
limit: 100,
|
||||
asc: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "all fields empty",
|
||||
args: args{
|
||||
req: &object_pb.ListQuery{
|
||||
Offset: 0,
|
||||
Limit: 0,
|
||||
Asc: false,
|
||||
},
|
||||
},
|
||||
res: res{
|
||||
offset: 0,
|
||||
limit: 0,
|
||||
asc: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
offset, limit, asc := ListQueryToModel(tt.args.req)
|
||||
assert.Equal(t, tt.res.offset, offset)
|
||||
assert.Equal(t, tt.res.limit, limit)
|
||||
assert.Equal(t, tt.res.asc, asc)
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user