Prerequisites
Before you begin, you will need:- A Kubernetes cluster.
- External Secrets Enterprise installed.
This tutorial will guide you through creating a scheduled workflow that generates a password and distributes it to multiple secret stores. We will use the preset
generate-and-distribute
workflow template.
Step 1: Create Secret Stores
First, we need to create twoSecretStore
resources where the generated password will be stored.- Navigate to the Secret Stores section in the External Secrets Enterprise UI.
- Click on Add Secret Store.
- Create the first
SecretStore
with the following details:- Name:
fake
- Provider:
Fake
(This is useful for testing purposes) - Add two data blocks: one with key
key-1
and valueduplicate
; the other one with namekey-2
and valueduplicate
as well.
- Name:
- Repeat the process to create a second
SecretStore
:- Name:
fake2
- Provider:
Fake
- Name:
Step 2: Create a Password Generator
Next, we’ll create aPassword
generator that will produce the secure passwords.- Go to the Generators section in the UI.
- Click on Create Generator.
- Select Passwords as the generator type.
- Configure the generator:
- Name:
my-password-generator
- Digits:
4
- Length:
32
- Symbols:
4
- Name:
- Save the generator.
Step 3: Create a Scheduled Workflow
Now, let’s create aWorkflowRunTemplate
to schedule the password generation and distribution.- Navigate to the Workflows Templates section. A list of Preset Workflow Templates will appear.
- Find the
generate-and-distribute-workflow
template. Click the Add Run Templates button. - Fill in the parameters:
- Name:
my-scheduled-password
- Generator: Select
my-password-generator
. - Stores to Distribute: Add
fake
andfake2
to the list. - Key to Distribute: Type
generated-password
. This is the key that will be used to store the generated password in the stores. - Run Policy select Scheduled Interval
- Schedule: Select
Every time period
- Every time period type
1m
.
- Name:
- External Secrets will Run this workflow every 1 minute, generating a new Password and
adding it to
fake
andfake2
stores, under thegenerated-password
key. - Click Create to save the
WorkflowRunTemplate
.