Skip to content

Enhancement: Introduce SASLMechanism Type to Avoid Case Sensitivity Issues #1744

Open
@seeun0210

Description

@seeun0210

Is your feature request related to a problem? Please describe.
There is currently no dedicated type provided for the mechanism, which leads to confusion regarding case sensitivity. For example, when using the SHA-SCRAM-512 mechanism, specifying it in uppercase resulted in an authorization error.

Describe the solution you'd like
I propose to introduce a dedicated type (e.g., SASLMechanism) for the mechanism field in KafkaJS. This change would enforce valid mechanism values and prevent case sensitivity issues. Alternatively, updating the documentation to specify that the mechanism must be provided in lowercase could also resolve the issue. Links to similar solutions in other Kafka clients or relevant KIPs would be valuable references.

Additional context
I encountered an authorization error when the mechanism was specified in uppercase, but switching to lowercase resolved the issue. This enhancement would help prevent similar errors in the future and improve overall type safety.
use type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions