spiffe / spiffe/spire-controller-manager

TTL validation bug

Open
#282 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
77
Forks
69
Avg merge
11d 11h
Merged PRs (30d)
6

Description

I accidentally created a cluster spiffe id with ttl set to 5d.

It doesn't work as 'd' is not supported. This is fine. The whole controller manager is kind of broken with syncing at this point... this even is kind of fine, as its not supported and my mistake.

I then did a kubectl edit on it and tried to remove the ttl, or change it to something valid. It fails:

error: clusterspiffeids.spire.spiffe.io "spire-root-server-spire-step" could not be patched: admission webhook "vclusterspiffeid.kb.io" denied the request: time: unknown unit "d" in duration "5d"

It seems to be validating the previous version before validating the current version?

But there's now not a way to fix it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure by creating a ClusterSPIFFEID with an unsupported 5d TTL, then try editing it with kubectl to remove or replace the value. Trace the admission webhook validation path that rejects the stored invalid version before accepting the edited resource. Done means the malformed object can be repaired through kubectl while valid TTL values continue to be rejected or accepted appropriately.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
backend, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.