Skip to content

Instantly share code, notes, and snippets.

View jiazhai's full-sized avatar
😃
AscentStream is hiring

Jia Zhai jiazhai

😃
AscentStream is hiring
  • AscentStream
  • Beijing
View GitHub Profile
@jiazhai
jiazhai / pulsar-docker-compose-no-global-zookeeper.yml
Created June 24, 2019 07:45
pulsar-docker-compose-no-global-zookeeper.yml
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@jiazhai
jiazhai / KoP-SASL-Tutorial.md
Last active December 25, 2019 04:09
Steps for KoP authentication and authorization Based on JWT.

Steps for KoP authentication and authorization Based on JWT.

Please reference to Pulsar Security Overview to understand the Pulsar authen and author. Currently KoP support Pulsar Token auth

Before start, preparing a KoP tar ball and a Pulsar tar ball(mainly use puslar-admin tools in this tar ball).

Some background before tutorial

In KoP, we currently support SASL_PLAINTEXT, in which a username/password pair needs provide. We reused the Token provider in Pulsar to implement a KoP SASL authentication, the authorization still use Pulsar authorization.

@jiazhai
jiazhai / KoP-SSL.md
Last active December 30, 2019 03:31

KOP support Kafka listeners config of type "PLAINTEXT" and "SSL". You could set config like listeners=PLAINTEXT://localhost:9092,SSL://localhost:9093. Please reference Kafka SSL document for how to config SSL keys. Here is some steps that you need to be able to connect KOP through SSL.

  1. create SSL related Keys.

Here is an example of a bash script to create related CA and jks files.

@jiazhai
jiazhai / Dockerfile
Created May 25, 2020 15:13
Dockerfile to build pulsar cpp client based on centos6
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0