Skip to content

Commit

Permalink
Replaced base64 basic authz header with curl --user.
Browse files Browse the repository at this point in the history
  • Loading branch information
javabrett committed Dec 12, 2020
1 parent 42d461c commit eea6de8
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions scripts/helper/create-topics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,44 @@ KAFKA_CLUSTER_ID=$(curl -s --insecure --location --request GET 'https://localhos

echo "cluster_id: ${KAFKA_CLUSTER_ID}"

user="superUser:superUser"

curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \
--user $user \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \
--data-binary @<(jq -n --arg topic_name users --arg confluent_value_schema_validation "true" -f ${DIR}/topic.jq) | jq

curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \
--user $user \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \
--data-binary @<(jq -n --arg topic_name "wikipedia.parsed" --arg confluent_value_schema_validation "true" -f ${DIR}/topic.jq) | jq

curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \
--user $user \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \
--data-binary @<(jq -n --arg topic_name "wikipedia.parsed.count-by-domain" --arg confluent_value_schema_validation "false" -f ${DIR}/topic.jq) | jq

curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \
--user $user \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \
--data-binary @<(jq -n --arg topic_name "wikipedia.failed" --arg confluent_value_schema_validation "false" -f ${DIR}/topic.jq) | jq

curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \
--user $user \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \
--data-binary @<(jq -n --arg topic_name "WIKIPEDIABOT" --arg confluent_value_schema_validation "false" -f ${DIR}/topic.jq) | jq

curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \
--user $user \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \
--data-binary @<(jq -n --arg topic_name "WIKIPEDIANOBOT" --arg confluent_value_schema_validation "false" -f ${DIR}/topic.jq) | jq

curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \
--user $user \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \
--data-binary @<(jq -n --arg topic_name "EN_WIKIPEDIA_GT_1" --arg confluent_value_schema_validation "false" -f ${DIR}/topic.jq) | jq

curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \
--user $user \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \
--data-binary @<(jq -n --arg topic_name "EN_WIKIPEDIA_GT_1_COUNTS" --arg confluent_value_schema_validation "false" -f ${DIR}/topic.jq) | jq

0 comments on commit eea6de8

Please sign in to comment.