Skip to content

CRL regenerated on every replica in multi-instance setup #1351

@kudiyarov

Description

@kudiyarov

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Hello!
Setting crl.enabled: true in ca.json config file turns on generating CRL data every crl.cacheDuration interval.
Running step-ca in several replicas, e.g. as k8s deployment with >=2 pods, causes CRL generation on each replica at the same time.
For instance, some log messages from pod1:

2023/04/16 15:16:35 Regenerating CRL
2023/04/16 16:36:35 Regenerating CRL
2023/04/16 17:56:35 Regenerating CRL

and from pod2:

2023/04/16 15:16:26 Regenerating CRL
2023/04/16 16:36:26 Regenerating CRL
2023/04/16 17:56:26 Regenerating CRL

Why is this needed?

Looks like step-ca does double work here. Is it possible to implement "Lock Acquire" logic here, e.g. by pasting special data to existing DB?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions