-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api(ticdc): parse the kafka config #9432
api(ticdc): parse the kafka config #9432
Conversation
Signed-off-by: hi-rustin <[email protected]>
/test all |
KOP test:
version: '3.5'
services:
standalone:
container_name: standalone
hostname: localhost
image: streamnative/sn-pulsar:2.10.3.7
command: >
bash /waitForOAuth.sh
environment:
allowAutoTopicCreationType: partitioned
brokerDeleteInactiveTopicsEnabled: "false"
PULSAR_PREFIX_saslAllowedMechanisms: OAUTHBEARER
PULSAR_PREFIX_kopOauth2AuthenticateCallbackHandler: io.streamnative.pulsar.handlers.kop.security.oauth.OauthValidatorCallbackHandler
PULSAR_PREFIX_kopOauth2ConfigFile: /conf/kop-handler.properties
PULSAR_PREFIX_messagingProtocols: kafka
PULSAR_PREFIX_kafkaListeners: SASL_PLAINTEXT://0.0.0.0:9092
PULSAR_PREFIX_kafkaAdvertisedListeners: SASL_PLAINTEXT://xxxx:19092
PULSAR_PREFIX_brokerEntryMetadataInterceptors: org.apache.pulsar.common.intercept.AppendIndexMetadataInterceptor
PULSAR_PREFIX_authenticationEnabled: true
PULSAR_PREFIX_authenticationProviders: org.apache.pulsar.broker.authentication.AuthenticationProviderToken
PULSAR_PREFIX_brokerClientAuthenticationPlugin: org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2
PULSAR_PREFIX_brokerClientAuthenticationParameters: "{\"type\":\"client_credentials\",\"privateKey\":\"/conf/client_credentials.json\",\"issuerUrl\":\"https://dev-xxx.us.auth0.com\", \"audience\": \"pulsar\"}"
PULSAR_PREFIX_tokenSecretKey: "data:;base64,xxxxxx="
LOGGING_LEVEL: debug
ports:
- 6650:6650
- 8080:8080
- 19092:9092
volumes:
- ./client_credentials.json:/conf/client_credentials.json
- ./kop-handler.properties:/conf/kop-handler.properties
- ./waitForOAuth.sh:/waitForOAuth.sh client_credentials.json: {
"type": "client_credentials",
"client_id": "h2IA1jxxjxFZBgpX6z",
"client_secret": "-BHtxxxxGW6bJwfihRO9YN2ADUl",
"issuer_url": "https://dxxx44.us.auth0.com",
"audience": "pulsar"
} kop-handler.properties: oauth.validate.method=token waitForOAuth.sh: bin/apply-config-from-env.py conf/standalone.conf && exec bin/pulsar standalone
[sink]
kafka-config.sasl-mechanism = "OAUTHBEARER"
kafka-config.sasl-oauth-client-id = "xxx"
kafka-config.sasl-oauth-client-secret = "xxxx=="
kafka-config.sasl-oauth-token-url = "https://dxxxh/token"
kafka-config.sasl-oauth-grant-type = "client_credentials"
kafka-config.sasl-oauth-audience = "pulsar"
mysql> use test;
Database changed
mysql> CREATE TABLE example1 ( id INT PRIMARY KEY, b INT );
Query OK, 0 rows affected (0.12 sec)
mysql> INSERT INTO example1 (id, b) VALUES (2, 2);
Query OK, 1 row affected (0.01 sec)
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 3AceShowHand, CharlesCheung96 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
Signed-off-by: hi-rustin <[email protected]>
/test all |
Signed-off-by: hi-rustin <[email protected]>
/test all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self check
This is an automated cherry-pick of #8938
What problem does this PR solve?
Issue Number: close #8865
What is changed and how it works?
add oauth support for sarama Kafka sink.
Added:
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
No
Do you need to update user documentation, design documentation or monitoring documentation?
No
Release note