哪里网站建设联系/丽水百度seo

哪里网站建设联系,丽水百度seo,专业网站的特点,什么网站做宣传好文章目录 HTTPS的工作流程部署Harbor可参考上一篇文章生成自签证书1.修改/etc/hosts文件2.生成证书a.创建存放证书路径b.创建ca.key密钥c.创建ca.crtd.创建给Harbor服务器使用密钥 yunzhidong.harbor.com.keye.创建给Harbor服务器使用证书签名请求文件 yunzhidong.harbor.com.c…

文章目录

    • HTTPS的工作流程
    • 部署Harbor可参考上一篇文章
    • 生成自签证书
      • 1.修改/etc/hosts文件
      • 2.生成证书
        • a.创建存放证书路径
        • b.创建ca.key密钥
        • c.创建ca.crt
        • d.创建给Harbor服务器使用密钥 yunzhidong.harbor.com.key
        • e.创建给Harbor服务器使用证书签名请求文件 yunzhidong.harbor.com.csr
        • f.构建用于域名配置的 v3.ext 文件
        • g.生成客户端数字证书yunzhidong.harbor.com.crt
        • h.生成证书yunzhidong.harbor.com.cert
    • 配置证书
      • 编辑harbor.yml
      • 配置Docker证书

HTTPS的工作流程

HTTPS的工作流程
客户端发起连接请求:客户端(通常是浏览器)向服务器发送一个安全连接请求,使用HTTPS的URL或点击HTTPS链接触发。
服务器证书发送:服务器收到请求后,将自己的数字证书发送给客户端。证书中包含了服务器的公钥、数字签名和其他相关信息。
客户端验证证书:浏览器接收到服务器证书后,会进行一系列的验证步骤,包括验证证书是否由受信任的证书颁发机构签发,以及证书中的域名是否与目标服务器的域名相匹配。如果验证通过,客户端可以确定所连接的服务器是可信的。
密钥协商:一旦服务器证书被验证通过,客户端会生成一个随机的对称密钥,用于后续的数据加密和解密。该对称密钥通过服务器证书中的公钥进行加密,并发送给服务器。
通信加密:服务器使用其私钥解密客户端发送的对称密钥,并与客户端之间建立起一个加密的安全通道。从此之后,客户端和服务器之间的数据传输都会在此加密通道中进行,保证数据的机密性。
安全数据传输:在建立了安全通道后,客户端和服务器可以安全地传输数据了。数据在发送前,会使用对称密钥对数据进行加密,然后在接收端使用相同的对称密钥解密。
完整性检查:为了确保数据在传输过程中没有被篡改,HTTPS使用消息摘要函数进行完整性检查。接收方会对接收到的数据进行校验,并比对校验结果与发送方计算的结果是否相同。
通过上述流程,HTTPS保证了在传输过程中的数据加密、身份认证和完整性保护,提供了更安全可靠的网络通信。这使得敏感信息的传输、交易和共享在更加安全的环境下进行。

也就是说:我们介绍HTTPS,更多是在介绍后面这个S,也就是对HTTP的加密方式。

部署Harbor可参考上一篇文章

linux rocky 9.4部署和管理docker harbor私有源

生成自签证书

1.修改/etc/hosts文件

[root@harbor ~]# cat  /etc/hosts 
192.168.0.200  yunzhidong.harbor.com

这里我们使用yunzhidong.harbor.com 这个域名访问Harbor Web服务
在这里插入图片描述

2.生成证书

a.创建存放证书路径
[root@harbor ~]# mkdir -pv /usr/local/ssl
[root@harbor ~]# cd /usr/local/ssl/

在这里插入图片描述

b.创建ca.key密钥
[root@harbor ssl]# openssl genrsa -out ca.key 4096
[root@harbor ssl]# ls
ca.key
[root@harbor ssl]# 

在这里插入图片描述

c.创建ca.crt

– 提示:可将下面信息修改成自己的信息

[root@harbor ssl]# openssl req -x509 -new -nodes -sha512 -days 365 -subj "/C=CN/ST=Beijing/L=Beijing/O=example/OU=Personal/CN=Harbor Root CA" -key ca.key  -out ca.crt
[root@harbor ssl]# ls
ca.crt  ca.key
[root@harbor ssl]# 

在这里插入图片描述

d.创建给Harbor服务器使用密钥 yunzhidong.harbor.com.key
提示:需要把yunzhidong.harbor.com 改成自己的域名,并且同hosts文件内相同
[root@harbor ssl]# openssl genrsa -out yunzhidong.harbor.com.key 4096
[root@harbor ssl]# ls
ca.crt  ca.key  yunzhidong.harbor.com.key
[root@harbor ssl]# 

在这里插入图片描述

e.创建给Harbor服务器使用证书签名请求文件 yunzhidong.harbor.com.csr
[root@harbor ssl]# openssl req -sha512 -new   -subj "/C=CN/ST=Beijing/L=Beijing/O=example/OU=Personal/CN=yunzhidong.harbor.com"    -key yunzhidong.harbor.com.key    -out yunzhidong.harbor.com.csr
[root@harbor ssl]# 
[root@harbor ssl]# ls
ca.crt  ca.key  yunzhidong.harbor.com.csr  yunzhidong.harbor.com.key
[root@harbor ssl]# 

在这里插入图片描述

f.构建用于域名配置的 v3.ext 文件

– 提示这里只需要修改DNS.1=域名

cat > v3.ext <<-EOF
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
extendedKeyUsage = serverAuth
subjectAltName = @alt_names[alt_names]
DNS.1=yunzhidong.harbor.com
EOF

在这里插入图片描述

g.生成客户端数字证书yunzhidong.harbor.com.crt
[root@harbor ssl]# openssl x509 -req -sha512 -days 3650   -extfile v3.ext     -CA ca.crt -CAkey ca.key -CAcreateserial     -in yunzhidong.harbor.com.csr     -out yunzhidong.harbor.com.crt

在这里插入图片描述

h.生成证书yunzhidong.harbor.com.cert
[root@harbor ssl]# openssl x509 -inform PEM -in yunzhidong.harbor.com.crt -out yunzhidong.harbor.com.cert

执行好,步骤abcdefgh
会生成8个文件

ca.crt  ca.key  ca.srl  v3.ext  yunzhidong.harbor.com.crt  yunzhidong.harbor.com.csr  yunzhidong.harbor.com.key

在这里插入图片描述

Harbor 启用https 需要ca.crt ,yunzhidong.harbor.com.key,yunzhidong.harbor.com.crt
Docker配置证书需要 ca.crt ,yunzhidong.com.key ,yunzhidong.harbor.com.cert
linux系统或者windows系统信任证书需要ca.crt

配置证书

编辑harbor.yml

1.把hostname: yunzhidong.harbor.com 改成自己的域名
2.指定刚才证书存放路径

https:# https port for harbor, default is 443port: 443# The path of cert and key files for nginxcertificate: /usr/local/ssl/yunzhidong.harbor.crtprivate_key: /usr/local/ssl/yunzhidong.harbor.key

在这里插入图片描述
3.[root@harbor harbor]# ./install.sh

在这里插入图片描述
在这里插入图片描述
4.WEB验证
使用IP登录,自动跳转https登录
在这里插入图片描述
5.将刚才生成的ca.crt证书拿到本地电脑安装证书
在这里插入图片描述在这里插入图片描述
在这里插入图片描述
C:\Windows\System32\drivers\etc\hosts,类似/etc/hosts
添加192.168.0.200 yunzhidong.harbor.com
在这里插入图片描述
6.域名访问
在这里插入图片描述
7.curl测试访问

[root@harbor harbor]# curl -i https://yunzhidong.harbor.com报错:
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.htmlcurl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

在这里插入图片描述
报错原因是:linux 没有安装ca.crt证书或者docker没有添加证书,这里有两种办法解决。
或者我们先curl -k 跳过证书访问试下

[root@harbor harbor]# curl -i -k https://yunzhidong.harbor.com
HTTP/1.1 200 OK

在这里插入图片描述8.linux 信任证书,不同linux 系统不同的文件目录
我这里是Rocky Linux release 9.4 (Blue Onyx)

[root@harbor harbor]# cat /etc/redhat-release 
Rocky Linux release 9.4 (Blue Onyx)

在这里插入图片描述
复制ca.crt证书到 /etc/pki/ca-trust/source/anchors/

[root@harbor harbor]# cp /usr/local/ssl/ca.crt /etc/pki/ca-trust/source/anchors/

然后执行信任操作

[root@harbor harbor]# update-ca-trust 

我们再次尝试 [root@harbor harbor]# curl -i https://yunzhidong.harbor.com
不再报错,如果还是不行,请重启Harbor和docker服务。

在这里插入图片描述
并且在为配置docker证书的情况下,依然能使用docker登录harbor

[root@harbor harbor]# docker login https://yunzhidong.harbor.com

在这里插入图片描述

9.取消linux 信任证书

[root@harbor harbor]# rm -rf /etc/pki/ca-trust/source/anchors/ca.crt 
[root@harbor harbor]# update-ca-trust 
[root@harbor harbor]# 

curl -i 无法正常登录,证明删除信任成功
在这里插入图片描述

[root@harbor harbor]# docker-compose down 
[root@harbor harbor]# systemctl restart docker
[root@harbor harbor]# docker-compose up -d[root@harbor harbor]# docker login https://yunzhidong.harbor.com 也无法使用

在这里插入图片描述

配置Docker证书

10.配置Docker证书
https://goharbor.io/docs/2.11.0/install-config/configure-https/
此链接也有官方生成证书教程
在这里插入图片描述
很明显,/etc/docker/certs.d/ 是存放docker证书的路径
所以我们创建此路径并把证书拷贝至此。

[root@harbor harbor]# ls /etc/docker/
daemon.json
[root@harbor harbor]# mkdir -pv /etc/docker/certs.d
mkdir: created directory '/etc/docker/certs.d'
[root@harbor harbor]# cd /etc/docker/certs.d/
[root@harbor certs.d]# ls

创建跟生成证书时和/etc/hosts 域名相同的目录

[root@harbor certs.d]# mkdir -pv yunzhidong.harbor.com
mkdir: created directory 'yunzhidong.harbor.com'
[root@harbor certs.d]# cd yunzhidong.harbor.com/
[root@harbor yunzhidong.harbor.com]# pwd
/etc/docker/certs.d/yunzhidong.harbor.com
[root@harbor yunzhidong.harbor.com]# 

在这里插入图片描述
在这里插入图片描述拷贝证书

[root@harbor yunzhidong.harbor.com]# ls
[root@harbor yunzhidong.harbor.com]# cp /usr/local/ssl/ca.crt /etc/docker/certs.d/yunzhidong.harbor.com/
[root@harbor yunzhidong.harbor.com]# cp /usr/local/ssl/yunzhidong.harbor.com.cert /etc/docker/certs.d/yunzhidong.harbor.com/
[root@harbor yunzhidong.harbor.com]# cp /usr/local/ssl/yunzhidong.harbor.com.key /etc/docker/certs.d/yunzhidong.harbor.com/
[root@harbor yunzhidong.harbor.com]# ls
ca.crt  yunzhidong.harbor.com.cert  yunzhidong.harbor.com.key
[root@harbor yunzhidong.harbor.com]# 

重启docker服务

[root@harbor yunzhidong.harbor.com]# systemctl restart docker
[root@harbor yunzhidong.harbor.com]# docker login https://yunzhidong.harbor.com
Authenticating with existing credentials...
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credential-storesLogin Succeeded
[root@harbor yunzhidong.harbor.com]# 

在这里插入图片描述
并且 curl -i 无法登录,证明docker证书生效

[root@harbor yunzhidong.harbor.com]# curl -i https://yunzhidong.harbor.com
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.htmlcurl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

在这里插入图片描述
现在全球都在推进 SSL 安全加密,越来越多的网站采用了 HTTPS 访问,没有启用 HTTPS 的网站可能即将在 浏览器 里禁止访问了,刚刚我没装ca.crt证书在本地电脑上,压根不能使用域名web访问。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/887327.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Spring Boot3远程调用工具RestClient

Spring Boot3.2之后web模块提供了一个新的远程调用工具RestClient&#xff0c;它的使用比RestTemplate方便&#xff0c;开箱即用&#xff0c;不需要单独注入到容器之中&#xff0c;友好的rest风格调用。下面简单的介绍一下该工具的使用。 一、写几个rest风格测试接口 RestCont…

svn 崩溃、 cleanup失败 怎么办

在使用svn的过程中&#xff0c;可能出现整个svn崩溃&#xff0c; 例如cleanup 失败的情况&#xff0c;类似于 这时可以下载本贴资源文件并解压。 或者直接访问网站 SQLite Download Page 进行下载 解压后得到 sqlite3.exe 放到发生问题的svn根目录的.svn路径下 右键呼出pow…

[Leetcode小记] 3233. 统计不是特殊数字的数字数量

代码&#xff1a; 方法一&#xff1a;平凡解法(最直观但时间复杂度最高) class Solution {public int nonSpecialCount(int l, int r) {int resr-l1;//初始不是特殊数字的答案为[l,r]范围内数字总数for(int i(int)Math.ceil(Math.sqrt(l));i<(int)Math.floor(Math.sqrt(r))…

jenkins 2.346.1最后一个支持java8的版本搭建

1.jenkins下载 下载地址&#xff1a;Index of /war-stable/2.346.1 2.部署 创建目标文件夹&#xff0c;移动到指定位置 创建一个启动脚本&#xff0c;deploy.sh #!/bin/bash set -eDATE$(date %Y%m%d%H%M) # 基础路径 BASE_PATH/opt/projects/jenkins # 服务名称。同时约定部…

package.json中^1.x.x、~1.x.x、1.x.x有什么区别

目录 包版本号的语义化 包版本号的符号 举例 包版本号的语义化 在开始回答这个问题之前&#xff0c;先简单介绍一下包版本号的语义化。 在npm中&#xff0c;包的版本号通常遵循语义化版本规范&#xff08;Semantic Versioning&#xff09;&#xff0c;即采用 major.minor.p…

el-table :span-method 合并单元格(2.0)

2024.11.23今天我学习了如何使用el-table组件的合并单元格方法&#xff0c;效果如下&#xff1a; 代码如下&#xff1a; <template><div class"container"><el-table :data"table_data" :span-method"object_merge" border>&…

CWT-CNN-SABO-LSSVM | Matlab实现基于CWT-CNN-SABO-LSSVM对滚动轴承的故障诊断

CWT-CNN-SABO-LSSVM | Matlab实现基于CWT-CNN-SABO-LSSVM对滚动轴承的故障诊断 目录 CWT-CNN-SABO-LSSVM | Matlab实现基于CWT-CNN-SABO-LSSVM对滚动轴承的故障诊断分类效果基本描述程序设计参考资料 分类效果 基本描述 基于CWT-CNN-SABO-LSSVM对滚动轴承的故障诊断 matlab代码…

Java基于SSM框架的校园综合服务小程序【附源码、文档】

博主介绍&#xff1a;✌IT徐师兄、7年大厂程序员经历。全网粉丝15W、csdn博客专家、掘金/华为云//InfoQ等平台优质作者、专注于Java技术领域和毕业项目实战✌ &#x1f345;文末获取源码联系&#x1f345; &#x1f447;&#x1f3fb; 精彩专栏推荐订阅&#x1f447;&#x1f3…

WPF——ICON按钮制作

前言 首先ICON按钮&#xff0c;即带图标按钮&#xff0c;即图标按钮。 图标按钮在开发时&#xff0c;主要是有两种方式来进行。一是在Button的Content内添加Image&#xff0c;然后设置Image的属性Source来实现&#xff0c;这种方式主要是简单易操作&#xff0c;对于初学者来说…

LlamaIndex ollama 搭建本地RAG应用,建立本地知识库

目录 简介安装前的准备下载ollama创建llamaindex conda环境&#xff0c;为后面编码作准备 环境变量迁移ollama到其他盘运行ollama方式一方式二禁止ollama开机自启动运行第一个模型 Chatbox聊天下载Chatbox配置ollama地址和模型验证 建立自身特定知识数据搭配大语言模型创建项目…

[RabbitMQ] 重试机制+TTL+死信队列

&#x1f338;个人主页:https://blog.csdn.net/2301_80050796?spm1000.2115.3001.5343 &#x1f3f5;️热门专栏: &#x1f9ca; Java基本语法(97平均质量分)https://blog.csdn.net/2301_80050796/category_12615970.html?spm1001.2014.3001.5482 &#x1f355; Collection与…

ChatGPT 桌面版发布了,如何安装?

本章教程教大家如何进行安装。 一、下载安装包 官网地址地址&#xff1a;https://openai.com/chatgpt/desktop/ 支持Windows和MacOS操作系统 二、安装步骤 Windows用户下载之后&#xff0c;会有一个exe安装包&#xff0c;点击运行安装即可。 注意事项&#xff0c;如果Windows操…

uniapp vue2项目迁移vue3项目

uniapp vue2项目迁移vue3项目&#xff0c;必须适配的部分 一、main.js 创建应用实例 // 之前 - Vue 2 import Vue from vue import App from ./App Vue.config.productionTip false // vue3 不再需要 App.mpType app // vue3 不再需要 const app new Vue({ ...App }) …

Brain.js 用于浏览器的 GPU 加速神经网络

Brain.js 是一个强大的 JavaScript 库&#xff0c;它允许开发者在浏览器和 Node.js 环境中构建和训练神经网络 。这个库的目的是简化机器学习模型的集成过程&#xff0c;使得即使是没有深厚机器学习背景的开发者也能快速上手 。 概述 Brain.js 提供了易于使用的 API&#xff…

群核科技首次公开“双核技术引擎”,发布多模态CAD大模型

11月20日&#xff0c;群核科技在杭州举办了第九届酷科技峰会。现场&#xff0c;群核科技首次正式介绍其技术底层核心&#xff1a;基于GPU高性能计算的物理世界模拟器。并对外公开了两大技术引擎&#xff1a;群核启真&#xff08;渲染&#xff09;引擎和群核矩阵&#xff08;CAD…

oracle会话追踪

一 跟踪当前会话 1.1 查看当前会话的SID,SERIAL# #在当前会话里执行 示例&#xff1a; SQL> select distinct userenv(sid) from v$mystat; USERENV(SID) -------------- 1945 SQL> select distinct sid,serial# from v$session where sid1945; SID SERIAL# …

算法-快速排序-Python版详解

原题如下&#xff1a; 给定你一个长度为 n 的整数数列。请你使用快速排序对这个数列按照从小到大进行排序。并将排好序的数列按顺序输出。 输入格式 输入共两行&#xff0c;第一行包含整数 n。 第二行包含 n 个整数&#xff08;所有整数均在 1∼10^9 范围内&#xff09;&am…

strlwr(arr);的模拟实现(c基础)

hi , I am 36 适合对象c语言初学者 strlwr(arr)&#xff1b;函数是把arr数组变为小写字母,并返回arr 链接介绍一下strlwr(arr)&#xff1b;(c基础)-CSDN博客 下面进行My__strlwr(arr);模拟实现 #include<stdio.h> //返回值为arr(地址),于是用指针变量,原数组为字符型…

Hadoop分布式文件系统(一)——HDFS简介

目录 1. HDFS设计目标2. HDFS组件3. HDFS数据复制4. HDFS健壮性4.1 磁盘数据错误&#xff0c;心跳检测和重新复制4.2 集群均衡4.3 数据完整性4.4 元数据磁盘错误4.5 快照 5. HDFS数据组织5.1 数据块存储5.2 流水线复制5.3 文件的删除和恢复 参考 1. HDFS设计目标 1.错误检测和快…

基于UDP和TCP实现回显服务器

目录 一. UDP 回显服务器 1. UDP Echo Server 2. UDP Echo Client 二. TCP 回显服务器 1. TCP Echo Server 2. TCP Echo Client 回显服务器 (Echo Server) 就是客户端发送什么样的请求, 服务器就返回什么样的响应, 没有任何的计算和处理逻辑. 一. UDP 回显服务器 1. UD…