Skip to content

Conversation

@liranbg
Copy link
Member

@liranbg liranbg commented Jan 14, 2026

📝 Description

📝 Description

Change user token secret naming convention to use auth_info.user_id instead of auth_info.username. This change ensures that user token secrets are stored using a stable identifier (user_id which is a UUID) rather than usernames which may contain characters invalid for Kubernetes resource names.


🛠️ Changes Made

  • Changed store_user_token_secret to accept auth_info directly instead of username
  • Added auth_userid label from auth_info.user_id for secret identification
  • Updated resolve_auth_token_secret_name to use user_id parameter
  • Added InternalAnnotations class in constants for annotation keys

✅ Checklist

  • I updated the documentation (if applicable)
  • I have tested the changes in this PR
  • I confirmed whether my changes are covered by system tests
    • If yes, I ran all relevant system tests and ensured they passed before submitting this PR
    • I updated existing system tests and/or added new ones if needed to cover my changes
  • If I introduced a deprecation:

🧪 Testing

  • Unit tests + ig4 running KFP / Kubejob

🔗 References


🚨 Breaking Changes?

  • Yes (explain below)
  • No

🔍️ Additional Notes

Copy link
Member

@quaark quaark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I'm missing from the PR is the option to still supply a username (on list / revoke) and have mlrun use iguazio sdk to resolve the user id. If all that is waiting for ML-10775, then ignore this comment

Copy link
Contributor

@elbamit elbamit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Minor question - don't you want to sanitize everything that is saved as a label? user_id and token_name?

@liranbg liranbg changed the title [Authentication] Change user secret tokenfrom username to userid [Authentication] Change user secret token from username to userid Jan 14, 2026
@liranbg liranbg merged commit 5087dcf into mlrun:development Jan 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants