mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-30 02:52:16 +00:00
Merge commit from fork
* Add DenyLists parsing * Remove unneeded returned error * Plug global denylist into Command * app creation: apply denylist to backchannel logout URI * Inject denylist to backchannel logout worker * webhook config: validate against blocked URLs * Add notificationsWebhook denylist target * command: Add SMTP endpoint validation against blocklist * command: Add SMS endpoint validation against blocklist * Validate webhook endpoint against denylist on channel notification * Remove unused tests * handle deprecated denylists * remove unintended denylist entry in deprecated list * use single http client * fix tests * update comments * fixes * cleanup * address comments * fix merge --------- Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
@@ -64,9 +64,7 @@ func newMockContextInfoResponse(fullMethod, request, response string) *ContextIn
|
||||
}
|
||||
|
||||
func Test_executeTargetsForGRPCFullMethod_request(t *testing.T) {
|
||||
deniedLocalhost, err := denylist.NewHostChecker("127.0.0.1")
|
||||
require.NoError(t, err)
|
||||
deniedIPs := []denylist.AddressChecker{deniedLocalhost}
|
||||
deniedIPs := []denylist.AddressChecker{denylist.NewHostChecker("127.0.0.1")}
|
||||
|
||||
type target struct {
|
||||
reqBody execution.ContextInfo
|
||||
@@ -656,7 +654,7 @@ func Test_executeTargetsForGRPCFullMethod_request(t *testing.T) {
|
||||
tt.args.req,
|
||||
nil,
|
||||
tt.args.getActiveSigningWebKey,
|
||||
tt.args.deniedIPs,
|
||||
&http.Client{Transport: denylist.NewHTTPTransport(tt.args.deniedIPs)},
|
||||
)
|
||||
|
||||
if tt.res.wantErr {
|
||||
@@ -762,9 +760,7 @@ func validateJWEPayload(t *testing.T) func(expected, sent []byte) bool {
|
||||
}
|
||||
|
||||
func Test_executeTargetsForGRPCFullMethod_response(t *testing.T) {
|
||||
deniedLocalhost, err := denylist.NewHostChecker("127.0.0.1")
|
||||
require.NoError(t, err)
|
||||
deniedIPs := []denylist.AddressChecker{deniedLocalhost}
|
||||
deniedIPs := []denylist.AddressChecker{denylist.NewHostChecker("127.0.0.1")}
|
||||
|
||||
type target struct {
|
||||
reqBody execution.ContextInfo
|
||||
@@ -930,7 +926,7 @@ func Test_executeTargetsForGRPCFullMethod_response(t *testing.T) {
|
||||
tt.args.resp,
|
||||
nil,
|
||||
mockGetActiveSigningWebKey(),
|
||||
tt.args.deniedIPs,
|
||||
&http.Client{Transport: denylist.NewHTTPTransport(tt.args.deniedIPs)},
|
||||
)
|
||||
|
||||
if tt.res.wantErr {
|
||||
|
||||
Reference in New Issue
Block a user