Skip to content

fix(rbac): spell the group user type db_env_user, as the server does - #624

Open
dudanogueira wants to merge 2 commits into
mainfrom
fix/groups-usertype-typo
Open

dudanogueira wants to merge 2 commits into
mainfrom
fix/groups-usertype-typo

Conversation

@dudanogueira

@dudanogueira dudanogueira commented Sep 9, 2026 •

Copy link
Copy Markdown

Problem

rbac/groups/UserType.DB_ENV_USER maps to the wire value db_end_user, but the server's value is db_env_user. Reading it gives null, and writing it sends a value the server rejects.

Fix

  • Change the @SerializedName to db_env_user. The enum is kept.
  • Add a JSONTest round-trip row.

Breaking changes

None. The constant name is unchanged.

Closes #623

groups/UserType declared its middle value as "db_end_user" -- end, not
env. The server's enumeration is ["db_user","db_env_user"]
(entities/models/d_b_user_info.go:142), so the constant could never be
produced by a read and writing it would emit a value the server rejects.
The constant is named DB_ENV_USER, so only the string was wrong.

The typo survived because nothing uses this enum: grep across src/main,
src/test and src/it finds every reference resolving to rbac/users/UserType,
and none to this one. GroupType, in the same package, is used -- the
package is not dead, this enum is.

That raises whether the right change is deletion rather than correction,
since this is an unreferenced duplicate of a type that already handles the
value correctly. Left as a correction here because removing a public type
is the more invasive call; see #623 for the argument either way.

Closes #623

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HNeKV7TAYZGDyT9agqJwUf

@orca-security-eu orca-security-eu Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@bevzzz

bevzzz commented Sep 10, 2026 •

Copy link
Copy Markdown
Collaborator

Please remove all comments from this PR and trim the PR description to what is strictly relevant.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the RBAC wire-value correction.

No open issues 🎉

What changed in this PR

Corrects the RBAC groups UserType.DB_ENV_USER wire value to match the server’s db_env_user, addressing #623 while preserving the public enum constant.

Changes:

  • Fixes the serialized value from db_end_user to db_env_user.
  • Adds a JSON round-trip test case for DB_ENV_USER.
File Description
src/​test/​java/​io/​weaviate/​client6/​v1/​internal/​json/​JSONTest.java Adds round-trip coverage for the corrected wire value.
src/​main/​java/​io/​weaviate/​client6/​v1/​api/​rbac/​groups/​UserType.java Corrects the DB_ENV_USER serialization annotation.

Review effort: Balanced

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.

v6: groups/UserType spells db_env_user as db_end_user, and is an unreferenced duplicate

3 participants