Skip to content

[common] Add standard principal type constants - #3891

Open
litiliu wants to merge 1 commit into
apache:mainfrom
litiliu:codex/fluss-principal-type-constants
Open

[common] Add standard principal type constants#3891
litiliu wants to merge 1 commit into
apache:mainfrom
litiliu:codex/fluss-principal-type-constants

Conversation

@litiliu

@litiliu litiliu commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Purpose

Related to #3829.

Provide canonical names for the standard User, Group, and Role principal types while preserving the string-based extensibility of FlussPrincipal.

Brief change log

  • Add USER_TYPE, GROUP_TYPE, and ROLE_TYPE constants to FlussPrincipal.
  • Use USER_TYPE when creating the anonymous principal and authenticated SASL user principals.
  • Keep the existing String constructor so custom principal types remain supported.

Tests

  • ./mvnw -pl fluss-common -DskipITs verify
    • 1,732 unit tests passed.
    • 186 integration tests passed.
    • Checkstyle and Spotless passed.

API and Format

This adds public constants to FlussPrincipal. It does not change existing constructors, ACL matching semantics, configuration, RPC wire format, or storage format.

Documentation

No documentation changes are required.

@litiliu

litiliu commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@loserwang1024 please help to review this

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.

1 participant