Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Support passing the token directly as the password for Schema Registry #1784

Conversation

BewareMyPower
Copy link
Collaborator

Motivation

Currently, when authentication is enabled, we have to pass token:<token> as the password in the basic.auth.user.info config. However, some clients don't allow a colon appearing in the password.

See
https://github.com/confluentinc/confluent-kafka-python/blob/f3055be4d2aa18ffc833cc88f7b08b173d4da433/src/confluent_kafka/schema_registry/schema_registry_client.py#L108-L111

Modifications

  • Support passing the token directly, i.e. without the "token:" prefix, as the password
  • Add the document to describe how to configure the authentication for Schema Registry

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

### Motivation

Currently, when authentication is enabled, we have to pass
`token:<token>` as the password in the `basic.auth.user.info` config.
However, some clients don't allow a colon appearing in the password.

See
https://github.com/confluentinc/confluent-kafka-python/blob/f3055be4d2aa18ffc833cc88f7b08b173d4da433/src/confluent_kafka/schema_registry/schema_registry_client.py#L108-L111

### Modifications
- Support passing the token directly, i.e. without the "token:" prefix,
  as the password
- Add the document to describe how to configure the authentication for
  Schema Registry
@BewareMyPower BewareMyPower added the type/enhancement Indicates an improvement to an existing feature label Mar 31, 2023
@BewareMyPower BewareMyPower self-assigned this Mar 31, 2023
@github-actions github-actions bot added the doc This pr contains a document label Mar 31, 2023
@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Merging #1784 (64ab46f) into master (92285f1) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1784      +/-   ##
============================================
- Coverage     16.02%   15.99%   -0.03%     
+ Complexity      626      625       -1     
============================================
  Files           165      165              
  Lines         12336    12333       -3     
  Branches       1128     1128              
============================================
- Hits           1977     1973       -4     
  Misses        10196    10196              
- Partials        163      164       +1     
Impacted Files Coverage Δ
...ive/pulsar/handlers/kop/SchemaRegistryManager.java 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

Copy link
Contributor

@wenbingshen wenbingshen left a comment

Choose a reason for hiding this comment

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

LGTM

@BewareMyPower BewareMyPower merged commit a210d7b into streamnative:master Apr 2, 2023
7 of 9 checks passed
@BewareMyPower BewareMyPower deleted the bewaremypower/schema-auth-token branch April 2, 2023 15:02
BewareMyPower added a commit that referenced this pull request Apr 2, 2023
#1784)

### Motivation

Currently, when authentication is enabled, we have to pass
`token:<token>` as the password in the `basic.auth.user.info` config.
However, some clients don't allow a colon appearing in the password.

See

https://github.com/confluentinc/confluent-kafka-python/blob/f3055be4d2aa18ffc833cc88f7b08b173d4da433/src/confluent_kafka/schema_registry/schema_registry_client.py#L108-L111

### Modifications
- Support passing the token directly, i.e. without the "token:" prefix,
as the password
- Add the document to describe how to configure the authentication for
Schema Registry

(cherry picked from commit a210d7b)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cherry-picked/branch-2.11 doc This pr contains a document release/2.11 type/enhancement Indicates an improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants