Skip to content

[Bug] Removing certificates fails if multiple expired certificates is on the namespace #406

@marklonquist

Description

@marklonquist

What are you really trying to do?

Remov expired certificates on namespaces in a CI setting using;
tcld --auto_confirm namespace ca remove -n $ns --fp $c -r $c

Describe the bug

Error when trying to remove a certificate because of multiple expired ones;

removing ca certificates can cause connectivity disruption if there are any clients using certificates that cannot be verified. confirm remove? [y/n] y
rpc error: code = InvalidArgument desc = invalid ca certificate: 6 errors occurred:
	* certificate with subject 'O=BRANDTECH-1722845205' received is expired as of '2024-12-03 08:06:45 +0000 UTC'
	* certificate with subject 'O=BRANDTECH-1722845609' received is expired as of '2024-12-03 08:13:29 +0000 UTC'
	* certificate with subject 'O=BRANDTECH-1725246455' received is expired as of '2024-12-31 03:07:35 +0000 UTC'
	* unable to construct full certificate chain for cert with subject 'O=BRANDTECH-1722845205'. Error: x509: certificate has expired or is not yet valid: current time 2025-01-03T09:28:11Z is after 2024-12-03T08:06:45Z
	* unable to construct full certificate chain for cert with subject 'O=BRANDTECH-1[72](https://github.com/BESTSELLER/bt-olympus-temporal-cert-manager/actions/runs/12595575647/job/35105062391#step:5:73)2845609'. Error: x509: certificate has expired or is not yet valid: current time 2025-01-03T09:28:11Z is after 2024-12-03T08:13:29Z
	* unable to construct full certificate chain for cert with subject 'O=BRANDTECH-1725246455'. Error: x509: certificate has expired or is not yet valid: current time 2025-01-03T09:28:11Z is after 2024-12-31T03:07:35Z

Minimal Reproduction

Setup a namespace, add some certificates, let multiple expire, try to remove one

Environment/Versions

Ubuntu, 22.04
tcld version v0.35.0

  • OS and processor: Github hosted runner

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions