当前位置:网站首页>SeaweedFS安全配置(Security Configuration)
SeaweedFS安全配置(Security Configuration)
2022-06-29 09:23:00 【Hoking】
详细配置参考:
Security - Security Configuration - 《SeaweedFS Wiki》 - 书栈网 · BookStack
生产配置文件:security.toml
weed scaffold -config=security > security.toml1、获取certstrap
1.1 方式一:
go get github.com/square/certstrapgo 安装命令
yum install golang -y1.2 方式二:
git clone https://github.com/square/certstrapgit 安装命令
yum install git -y构建操作
cd certstrap/
go build设置代理,可以访问到国内资源。
go env -w GOPROXY=https://goproxy.cn,direct密码配置为:#eY79Db
2、生成秘钥
/certstrap/certstrap init --common-name "SeaweedFS CA"
/certstrap/certstrap request-cert --common-name master
/certstrap/certstrap request-cert --common-name volume
/certstrap/certstrap sign --CA "SeaweedFS CA" master
/certstrap/certstrap sign --CA "SeaweedFS CA" volume
修改配置文件:security.toml
# Put this file to one of the location, with descending priority
# ./security.toml
# $HOME/.seaweedfs/security.toml
# /etc/seaweedfs/security.toml
# this file is read by master, volume server, and filer# this jwt signing key is read by master and volume server, and it is used for write operations:
# - the Master server generates the JWT, which can be used to write a certain file on a volume server
# - the Volume server validates the JWT on writing
# the jwt defaults to expire after 10 seconds.
[jwt.signing]
key = "m#09Yn"
expires_after_seconds = 300 # seconds# by default, if the signing key above is set, the Volume UI over HTTP is disabled.
# by setting ui.access to true, you can re-enable the Volume UI. Despite
# some information leakage (as the UI is not authenticated), this should not
# pose a security risk.
[access]
ui = false# this jwt signing key is read by master and volume server, and it is used for read operations:
# - the Master server generates the JWT, which can be used to read a certain file on a volume server
# - the Volume server validates the JWT on reading
# NOTE: jwt for read is only supported with master+volume setup. Filer does not support this mode.
[jwt.signing.read]
key = "m#09Yn"
expires_after_seconds = 300 # seconds
# If this JWT key is configured, Filer only accepts writes over HTTP if they are signed with this JWT:
# - f.e. the S3 API Shim generates the JWT
# - the Filer server validates the JWT on writing
# the jwt defaults to expire after 10 seconds.
[jwt.filer_signing]
key = ""
expires_after_seconds = 10 # seconds# If this JWT key is configured, Filer only accepts reads over HTTP if they are signed with this JWT:
# - f.e. the S3 API Shim generates the JWT
# - the Filer server validates the JWT on writing
# the jwt defaults to expire after 10 seconds.
[jwt.filer_signing.read]
key = ""
expires_after_seconds = 10 # seconds# all grpc tls authentications are mutual
# the values for the following ca, cert, and key are paths to the PERM files.
# the host name is not checked, so the PERM files can be shared.
[grpc]
ca = "/opt/seaweedfs/out/SeaweedFS_CA.crt"
# Set wildcard domain for enable TLS authentication by common names
allowed_wildcard_domain = "" # .mycompany.com[grpc.volume]
cert = "/opt/seaweedfs/out/volume.crt"
key = "/opt/seaweedfs/out/volume.key"
allowed_commonNames = "" # comma-separated SSL certificate common names[grpc.master]
cert = "/opt/seaweedfs/out/master.crt"
key = "/opt/seaweedfs/out/master.key"
allowed_commonNames = "" # comma-separated SSL certificate common names[grpc.filer]
cert = "/opt/seaweedfs/out/filer.crt"
key = "/opt/seaweedfs/out/filer.key"
allowed_commonNames = "" # comma-separated SSL certificate common names[grpc.msg_broker]
cert = ""
key = ""
allowed_commonNames = "" # comma-separated SSL certificate common names# use this for any place needs a grpc client
# i.e., "weed backup|benchmark|filer.copy|filer.replicate|mount|s3|upload"
[grpc.client]
cert = "/opt/seaweedfs/out/client.crt"
key = "/opt/seaweedfs/out/client.key"# volume server https options
# Note: work in progress!
# this does not work with other clients, e.g., "weed filer|mount" etc, yet.
[https.client]
enabled = true[https.volume]
cert = ""
key = ""
ca = ""[https.master]
cert = ""
key = ""
ca = ""
边栏推荐
- 指针函数和函数指针
- 2020-09-18 referer认证 url转义
- 聊聊你理解的线程与并发
- Force deduction 85 question maximum rectangle
- Monitoring data source connection pool usage
- Listview of the basic component of the shutter
- In XML layout, the button is always displayed on the top layer
- Database common interview questions (with answers)
- zabbix4.4配置监控服务器指标,以及图形页乱码解决
- 装饰器模式的应用,包装ServletRequest,增加addParameter方法
猜你喜欢

The collapsing "2.3 * 10 = 22" produced by multiplying float and int

Middle order traversal of Li Kou 94 binary tree

Custom MVC framework implementation

EDA与VHDL题库

自定义控件之下载控件1(DownloadView1)

A 3D Dual Path U-Net of Cancer Segmentation Based on MRI

Alternative implementation of Scrollview pull-down header amplification

Student addition / deletion gaih

Cisco ASA、FTD和HyperFlex HX的漏洞分析复现

点在多边形内外的判断
随机推荐
时变和非时变
Set up lamp environment under cenos7
PHP内存马技术研究与查杀方法总结
Force deduction 85 question maximum rectangle
2019.10.6训练总结
Causes and solutions of error reporting by using startactivity() method outside the activity
manacher
XML布局中Button总是在最上层显示
The collapsing "2.3 * 10 = 22" produced by multiplying float and int
gSoap例子——calc
Setinterval, setTimeout and requestanimationframe
Perfect binary tree, complete binary tree, perfect binary tree
After installing anaconda, you need to enter a password to start jupyterlab
2019.11.20训练总结
Constructing SQL statements by sprintf() function in C language
JVM之方法返回地址
Flutter 基础组件之 Image
数据源连接池未关闭的问题 Could not open JDBC Connection for transaction
Alternative implementation of Scrollview pull-down header amplification
2019-11-10训练总结