18

使用TLS安全的访问MinIO服务

 4 years ago
source link: https://docs.min.io/cn/how-to-secure-access-to-minio-server-with-tls.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

使用TLS安全的访问Minio服务

本文,我们讲介绍如何在Linux和Windows上配置Minio服务使用TLS。

1. 前提条件

2. 配置已存在的证书

如果你已经有私钥和公钥证书,你需要将它们拷贝到Minio的config/certs文件夹,分别取名为private.keypublic.crt

如果这个证书是被证书机构签发的,public.crt应该是服务器的证书,任何中间体的证书以及CA的根证书的级联。

3. 生成证书

Linux

Minio在Linux只支持使用PEM格式的key/certificate。

使用 Let's Encrypt

更多信息,请访问 这里

使用 generate_cert.go (self-signed certificate)

你需要下载 generate_cert.go,它是一个简单的go工具,可以生成自签名的证书,不过大多数情况下用着都是木有问题的。

generate_cert.go 已经提供了带有DNS和IP条目的SAN证书:

Copygo run generate_cert.go -ca --host "10.10.0.3"

使用 OpenSSL:

生成私钥:

Copyopenssl genrsa -out private.key 2048

生成自签名证书:

Copyopenssl req -new -x509 -days 3650 -key private.key -out public.crt -subj "/C=US/ST=state/L=location/O=organization/CN=domain"

Windows

Minio在Windows上只支持PEM格式的key/certificate,目前不支持PFX证书。

安装 GnuTLS

下载并解压GnuTLS

确保将解压后的binary路径加入到系统路径中。

Copysetx path "%path%;C:\Users\MyUser\Downloads\gnutls-3.4.9-w64\bin"

你可能需要重启powershell控制台来使其生效。

生成private.key

运行下面的命令来生成 private.key

Copycerttool.exe --generate-privkey --outfile private.key 

生成public.crt

创建文件cert.cnf,填写必要信息来生成证书。

Copy# X.509 Certificate options
#
# DN options

# The organization of the subject.
organization = "Example Inc."

# The organizational unit of the subject.
#unit = "sleeping dept."

# The state of the certificate owner.
state = "Example"

# The country of the subject. Two letter code.
country = "EX"

# The common name of the certificate owner.
cn = "Sally Certowner"

# In how many days, counting from today, this certificate will expire.
expiration_days = 365

# X.509 v3 extensions

# DNS name(s) of the server
dns_name = "localhost"

# (Optional) Server IP address
ip_address = "127.0.0.1"

# Whether this certificate will be used for a TLS server
tls_www_server

# Whether this certificate will be used to encrypt data (needed
# in TLS RSA ciphersuites). Note that it is preferred to use different
# keys for encryption and signing.
encryption_key

生成公钥证书

Copycerttool.exe --generate-self-signed --load-privkey private.key --template cert.cnf --outfile public.crt 

4. 安装第三方CAs

Minio可以配置成连接其它服务,不管是Minio节点还是像NATs、Redis这些。如果这些服务用的不是在已知证书机构注册的证书,你可以让Minio服务信任这些CA,怎么做呢,将这些证书放到Minio配置路径下(~/.minio/certs/CAs/ Linux 或者 C:\Users\<Username>\.minio\certs\CAs Windows).


Recommend

  • 18

    每个租户的MinIO服务器限制 纠删码 (多块 硬盘/服务器) 条目 限制 每个群集的最大服务器数 不限 联盟集群的最大数量 no-limit 最小服务器数 02 服务器数为1时,每台服务器的最小硬盘数 04 服务器数为2或3时,每台服务器的最小硬盘数 02...

  • 5

    一开始看了一篇使用阿里云 OSS 搭建图床的文章,于是有了使用 OSS 搭建图床的想法,但我不想用现成的 OSS,后来想到之前使用过免费的 Minio: Setup private object storage using...

  • 11

    1. docker-compose.yml 编写docker-compose配置文件,添加minio和nginx服务。 version: '3.9' services: web-server: image: nginx restart: always ports: - "8888:80" volumes: - ./nginx.conf:...

  • 7
    • www.bboy.app 3 years ago
    • Cache

    使用minio作为s3网关

    使用minio作为s3网关 发表于 2021-09-23...

  • 8
    • www.servicemesher.com 3 years ago
    • Cache

    Istio安全之服务间访问控制RBAC

    Istio安全之服务间访问控制RBAC · Service Mesh|服务网格中文社区 2019年3月25日 ...

  • 9

    使用Linux+Nginx+TLS+WS+CDN安装配置V2rayV2ray安装配置很简单,跟着下面一步一步搭建安全快速的V2Ray服务端,Nginx+TLS+WS(WebSocket)+CDN简单又安全!在日常网络生活中,隐私泄露的危险无处不在,如何保护你的个人隐私提高你在互联网上的用户安全性?

  • 4
    • syxdevcode.github.io 2 years ago
    • Cache

    rockylinux使用docker安装minio

    单节点编排version: "3"services: minio: restart: always image: minio/minio container_name: minio ports: - "9100:9000" # api 端口 - "9190:90...

  • 11

    contos7使用s3fs挂载minio对象存储实践 精选 原创 主机可以访问到对象存储API、例如...

  • 10

    因为在云服务器上默认只有一块磁盘,如果直接在系统盘上安装MinIO,会被拒绝,所以这里采用containerd的方式绕过这一限制 CentOS 7.9 MinIO版本 RELEASE.2023-03-09T23-16-13Z

  • 12
    • www.biaodianfu.com 1 year ago
    • Cache

    开源对象存储服务:Minio

    Minio简介 Minio 是一个开源的对象存储服务器。对象存储服务(Object Storage Service,OSS)是一种海量、安全、低成本、高可靠的云存储服务,适合存放任意类型的文件。容量和处理能力弹性扩展,多种存储类型供选择,全面优化存储成本。它是对 Amazon S3 云...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK