Skip to content

Instantly share code, notes, and snippets.

View fuyuntt's full-sized avatar

fuyun fuyuntt

  • China
View GitHub Profile
@fuyuntt
fuyuntt / NumberMixer.java
Created May 22, 2020 09:27
根据序列产生不重复的难以找到规律的数字
package com.best.buc.base.manager.serialnum.generator.seq;
import org.apache.commons.lang.ArrayUtils;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
/**
@fuyuntt
fuyuntt / ImproveS2.scala
Created August 2, 2017 09:38
google-s2 improve
import com.google.common.geometry.{MutableInteger, S2CellId}
/**
* Created by fuyun on 2017/7/25.
*/
object ImproveS2 {
val level = 17
// at level 17
def cellIj(cell: S2CellId): (Int, Int) = {
val i = new MutableInteger(0)
@fuyuntt
fuyuntt / NioTest.java
Created April 16, 2017 18:12
java nio test
package com.fuyun.scala;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;

kafka 集群安全认证配置

本文主要介绍下 kafka 0.10.0 版如何实现sasl/plain认证机制及权限控制

kafka安全机制

kakfa 的安全机制主要分为两部分:

  • 身份认证(Authentication): 对客户端的身份进行认证
  • 权限控制(Authorization): 对topic级别的权限进行控制

kafka 身份认证

kafka 目前支持 SSL,SASL(Kerberos),SASL(PLAIN) 三种认证机制。