// Module included in the following assemblies:
//
// * security/external_secrets_operator/external-secrets-operator-install.adoc

:_mod-docs-content-type: PROCEDURE
[id="external-secrets-operator-egress-allow-all-traffic_{context}"]
= Adding a custom network policy to allow egress to all external providers

[role="_abstract"]
You must configure custom policies through the `ExternalSecretsConfig` custom resource to allow all egress to all external providers.

.Prerequisites

* An `ExternalSecretsConfig` must be predefined.

* You must be able to define specific egress rules, including destination ports and protocols.

.Procedure

. Edit the `ExternalSecretsConfig` CR by running the following command:
+
[source,terminal]
----
$ oc edit externalsecretsconfigs.operator.openshift.io cluster
----

. Set the policy by editing the `networkPolicies` section:
+
[source,yaml]
----
apiVersion: operator.openshift.io/v1alpha1
kind: ExternalSecretsConfig
metadata:
  name: cluster
spec:
  controllerConfig:
    networkPolicies:
      - name: allow-external-secrets-egress
        componentName: CoreController
        egress: # Allow all egress traffic
----


