-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix support for basic auth with the schema registry (#94)
* Fix support for basic auth with the schema registry This fixes an issue with supporting basic auth when using the schema registry The plugin currently expects 'schema_registry_secret` and `schema_registry_key` to be set to authenticate with the schema registry. However, while this works during the 'register' phase, the authentication type `basic.auth.credentials.source` is not set when creating the kafka consumer, leading to authentication failures when attempting to deserialize the kafka payload. This commit correctly sets the `basic.auth.credentials.source` to `USER_INFO` when `schema_registry_key` and `schema_registry_secret` are set, and also enables the use of a basic auth embedded in the `schema_registry_url` via `username:password@url` This commit also adds integration tests for auth'ed schema registry integration
- Loading branch information
Showing
12 changed files
with
158 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SchemaRegistry-Props { | ||
org.eclipse.jetty.jaas.spi.PropertyFileLoginModule required | ||
file="build/confluent_platform/etc/schema-registry/pwd" | ||
debug="true"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fred: OBF:1w8t1tvf1w261w8v1w1c1tvn1w8x,user,admin | ||
barney: changeme,user,developer | ||
admin:admin,admin | ||
betty: MD5:164c88b302622e17050af52c89945d44,user | ||
wilma: CRYPT:adpexzg3FUZAk,admin,sr-user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
# Setup Kafka and create test topics | ||
set -ex | ||
|
||
echo "Starting authed SchemaRegistry" | ||
SCHEMA_REGISTRY_OPTS=-Djava.security.auth.login.config=build/confluent_platform/etc/schema-registry/jaas.config build/confluent_platform/bin/schema-registry-start build/confluent_platform/etc/schema-registry/authed-schema-registry.properties > /dev/null 2>&1 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
# Setup Kafka and create test topics | ||
set -ex | ||
|
||
echo "Starting SchemaRegistry" | ||
build/confluent_platform/bin/schema-registry-start build/confluent_platform/etc/schema-registry/schema-registry.properties > /dev/null 2>&1 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
# Setup Kafka and create test topics | ||
set -ex | ||
|
||
echo "Stoppping SchemaRegistry" | ||
build/confluent_platform/bin/schema-registry-stop | ||
sleep 5 |