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

:_mod-docs-content-type: PROCEDURE
[id="external-secrets-bit-warden-config_{context}"]
= Configuring the bitwardenSecretManagerProvider plugin

[role="_abstract"]
You must configure the `bitwardenSecretManagerProvider` plugin to enable communication with the Bitwarden API. This configuration enables the Operator to authenticate and fetch secrets for synchronization.

.Prerequisites

* You have access to the cluster with `cluster-admin` privileges.
* You have created the `ExternalSecretsConfig` custom resource.

.Procedure

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

. Edit the `spec.plugins.bitwardenSecretManagerProvider` section as follows to enable the Bitwarden Secrets Manager:
+
[source,yaml]
----
apiVersion: operator.openshift.io/v1alpha1
kind: ExternalSecretsConfig
...
spec:
  plugins:
    bitwardenSecretManagerProvider:
      mode: Enabled
      secretRef:
        name: <secret_object_name>
----
+
where:

name:: The name of the secret containing the certificate key pair for the plugin. The key name in the secret for the certificate must be `tls.crt`. The key name for the private key must be `tls.key`. The key name for the Certificate Authority (CA) certificate key name must be `ca.crt`. Configuring the secret is optional when the cert-manager certificate provider is configured.

. Save your changes and exit the editor.

. If you disable the plugin the following resources must be deleted manually by running the following commands:
+
[source,terminal]
----
$ oc delete deployments.apps bitwarden-sdk-server -n external-secrets
----
+
[source,terminal]
----
$ oc delete certificates.cert-manager.io bitwarden-tls-certs -n external-secrets
----
+
[source,terminal]
----
$ oc delete service bitwarden-sdk-server -n external-secrets
----
+
[source,terminal]
----
$ oc delete serviceaccounts bitwarden-sdk-server -n external-secrets
----

