Skip to content

vmuser: fixed object key generation#1745

Merged
vrutkovs merged 2 commits intomasterfrom
vmuser-fixed-object-key
Jan 23, 2026
Merged

vmuser: fixed object key generation#1745
vrutkovs merged 2 commits intomasterfrom
vmuser-fixed-object-key

Conversation

@AndrewChubatiuk
Copy link
Contributor

@AndrewChubatiuk AndrewChubatiuk commented Jan 23, 2026

follow up for #1686


Summary by cubic

Fixed VMUser key generation to include the namespace and handle bearer token/basic auth consistently. Prevents key collisions and correctly masks sensitive values.

  • Bug Fixes
    • Prefix keys with namespace to ensure uniqueness.
    • Prefer bearerToken; otherwise use username or fallback to resource name for basicAuth.
    • Append password for basicAuth when present and apply masking via a single helper when hide is true.

Written for commit d5a7a63. Summary will update on new commits.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="api/operator/v1beta1/vmuser_types.go">

<violation number="1" location="api/operator/v1beta1/vmuser_types.go:291">
P2: `cr.Name` is Kubernetes object metadata (not a secret) and should not be passed to `hideFn`. When `hide=true` is used for error messages (e.g., duplicate detection), hiding the object name makes debugging harder since users can't identify which objects are conflicting.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Signed-off-by: Vadim Rutkovsky <roignac@gmail.com>
@vrutkovs vrutkovs merged commit 15d6461 into master Jan 23, 2026
7 checks passed
@vrutkovs vrutkovs deleted the vmuser-fixed-object-key branch January 23, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants