You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TESK API stores the ID of the user who created a task (the OIDC sub) in the Kubernetes label creator-user-id of the task's objects, after replacing @ with _ (User#getUsername). This encoding loses information and doesn't cover all valid IDs:
Different IDs can end up with the same label value (e.g. a@b and a_b), so the label doesn't identify the creator exactly.
OIDC allows arbitrary strings as sub, while Kubernetes label values allow at most 63 characters from [A-Za-z0-9._-], starting and ending with an alphanumeric character. A sub with other characters, or a longer one, can't be stored, so creating a task fails.
logs[0].metadata.USER_ID shows the encoded value instead of the ID.
Proposal
Store a fixed-length hash of the full ID (truncated SHA-256, hex) in a new label, e.g. creator-user-hash, which turns any ID into a valid label value, and the full ID in an annotation (creator-user-id), on the taskmaster's job, its ConfigMap and the executors' jobs.
Select a user's tasks by the hash label, then compare the annotation with the user's ID, so that only exact matches count.
Show the full ID in logs[0].metadata.USER_ID.
Tasks created before the change only have the old label. Provide a transition: a setting that makes TESK API also match the old label for tasks without the new one (off by default), and upgrade notes on what operators need to do.
Behaviour for admins and group managers stays the same.
Document the labels, the setting and the upgrade.
Whether the taskmaster (tesk-core) reads these labels is checked as part of the work.
This issue was written by Claude Code Opus 5.5 on behalf of @uniqueg.
Activity
refactor: hash creator IDs with Guava
test: list jobs without labels
fix: old label only without the annotation
docs: tasks with only one creator mark