本文主要介绍下 kafka 0.10.0 版如何实现sasl/plain认证机制及权限控制
kakfa 的安全机制主要分为两部分:
- 身份认证(Authentication): 对客户端的身份进行认证
- 权限控制(Authorization): 对topic级别的权限进行控制
kafka 目前支持 SSL,SASL(Kerberos),SASL(PLAIN) 三种认证机制。
{ | |
"chainId": "atlantic-1", | |
"chainName": "sei-testnet", | |
"rpc": "https://sei-api.theamsolutions.info", | |
"rest": ["http://161.97.82.203:26457","http://158.101.209.61:12657"], | |
"bip44": { | |
"coinType": "505" | |
}, | |
"coinType": "505", | |
"bech32Config": { |
object "Contract" { | |
code { | |
datacopy(0, dataoffset("runtime"), datasize("runtime")) | |
return(0, datasize("runtime")) | |
} | |
object "runtime" { | |
code { | |
if iszero(calledByOwner()) { revert(0, 0) } | |
switch selector() | |
case 0x00 { |
# Path to your oh-my-zsh configuration. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
#export ZSH_THEME="robbyrussell" | |
export ZSH_THEME="gnzh" |
1) install dependencies: | |
yarn add @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-airbnb-typescript eslint-config-prettier eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier --dev | |
2) create .eslintrc.js file: | |
``` | |
module.exports = { | |
parser: "@typescript-eslint/parser", // Specifies the ESLint parser | |
extends: [ |
SELECT table, | |
formatReadableSize(sum(bytes)) as size, | |
min(min_date) as min_date, | |
max(max_date) as max_date | |
FROM system.parts | |
WHERE active | |
GROUP BY table |
# The MySQL database server configuration file. | |
# | |
# You can copy this to one of: | |
# - "/etc/mysql/my.cnf" to set global options, | |
# - "~/.my.cnf" to set user-specific options. | |
# | |
# One can use all long options that the program supports. | |
# Run program with --help to get a list of available options and with | |
# --print-defaults to see which it would actually understand and use. | |
# |
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) { | |
// path/to/whatever does not exist | |
} | |
if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) { | |
// path/to/whatever exists | |
} |