首页 > 其他分享 >consul 证书

consul 证书

时间:2023-12-25 13:34:06浏览次数:34  
标签:tls get consul 证书 ----- key

上面 consul  cluster 启动 时会生成证书,一个是证书, 这CA-cert 是CA的,这是根证书。一个是私钥

# k get secrets consul-ca-cert -oyaml
apiVersion: v1
data:
  tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURRVENDQXVpZ0F3SUJBZ0lVWm54b0hPNzNwSTY0NlRCMGhKQy9YR1dVTUt3d0NnWUlLb1pJemowRUF3SXcKZ1pFeEN6QUpCZ05WQkFZVEFsVlRNUXN3Q1FZRFZRUUlFd0pEUVRFV01CUUdBMVVFQnhNTlUyRnVJRVp5WVc1agphWE5qYnpFYU1CZ0dBMVVFQ1JNUk1UQXhJRk5sWTI5dVpDQlRkSEpsWlhReERqQU1CZ05WQkJFVEJUazBNVEExCk1SY3dGUVlEVlFRS0V3NUlZWE5vYVVOdmNuQWdTVzVqTGpFWU1CWUdBMVVFQXhNUFEyOXVjM1ZzSUVGblpXNTAKSUVOQk1CNFhEVEl6TVRJeU5UQXpNVEV5T1ZvWERUTXpNVEl5TWpBek1USXlPVm93Z1pFeEN6QUpCZ05WQkFZVApBbFZUTVFzd0NRWURWUVFJRXdKRFFURVdNQlFHQTFVRUJ4TU5VMkZ1SUVaeVlXNWphWE5qYnpFYU1CZ0dBMVVFCkNSTVJNVEF4SUZObFkyOXVaQ0JUZEhKbFpYUXhEakFNQmdOVkJCRVRCVGswTVRBMU1SY3dGUVlEVlFRS0V3NUkKWVhOb2FVTnZjbkFnU1c1akxqRVlNQllHQTFVRUF4TVBRMjl1YzNWc0lFRm5aVzUwSUVOQk1Ga3dFd1lIS29aSQp6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVJaUZ5MmYwb1dKWUIweGhZSjZGU2tReVZ0RXhJdHhzbjVHV1pReXA4Cm55ZVFEUUpvb1ZMQWllV21Vd0xKQW1JVXB2WW1HamhqRzREVStMWVc1d1hNcXFPQ0FS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QzF6WlhKMlpYS0NEeW91WTI5dWMzVnNMWE5sY25abGNvSVhLaTVqCmIyNXpkV3d0YzJWeWRtVnlMbU52Ym5OMWJET0NGV052Ym5OMWJDMXpaWEoyWlhJdVkyOXVjM1ZzTTRJYktpNWoKYjI1emRXd3RjMlZ5ZG1WeUxtTnZibk4xYkRNdWMzWmpnaGxqYjI1emRXd3RjMlZ5ZG1WeUxtTnZibk4xYkRNdQpjM1pqZ2hNcUxuTmxjblpsY2k1bWMyOHVZMjl1YzNWc2doRnpaWEoyWlhJdVpuTnZMbU52Ym5OMWJJSUpiRzlqCllXeG9iM04waHdSL0FBQUJNQW9HQ0NxR1NNNDlCQU1DQTBnQU1FVUNJQm9SZ2d6NjN5T3d6LytHTUE3VWlwSWYKalF1VFJ3Z1U3L2t0UzNhS09mVFFBaUVBOWxGR3dJdmV5NTUyM2hvMHpuU1EweU4ya0hLdUowOTc5djc3aTRLdwpNL2c9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
tls.key: LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSVAxcDJEeGtoVStIU1hUNWlzWFNuNVVLeFd4QTVhUE4xRlBHK29JdXd4Z1dvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFYTlwOVhwZTlXelUzUG5jY1pGY1BENWVCYmRjRkxSbU53aGFXRzF4VnZOVjFRZ0N4RjRTawpYeks1Q0U4dGFjaXhCaHVNRlJPUXhSV2dzOHZFRVoyazlRPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo=
kind: Secret

上面公钥 先 base64 解码, 再 解析内容。  这里有公钥,签发者等信息。证书可以到处传,私钥只是自己保存

-----BEGIN CERTIFICATE-----
MIIDQTCCAuigAwIBAgIUZnxoHO73pI646TB0hJC/XGWUMKwwCgYIKoZIzj0EAwIw
gZExCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNU2FuIEZyYW5j
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-----BEGIN EC PRIVATE KEY-----
MHcCAQEEII+FQXVNyjrOifsbPnc2Iuv2L9KbGd5W9N68LLFMhugqoAoGCCqGSM49
AwEHoUQDQgAEIiFy2f0oWJYB0xhYJ6FSkQyVtExItxsn5GWZQyp8nyeQDQJooVLA
ieWmUwLJAmIUpvYmGjhjG4DU+LYW5wXMqg==
-----END EC PRIVATE KEY-----

 

标签:tls,get,consul,证书,-----,key
From: https://www.cnblogs.com/qgbo/p/17925912.html

相关文章

  • docker-ce aliyun ssl 证书失效问题
    这个问题是由于您的DockerCE稳定版仓库的SSL证书验证失败导致的。您可以尝试以下解决方法:1.更新证书:从错误信息中可以看出证书无法通过验证。您可以尝试更新证书,以确保yum可以验证SSL证书。```bashsudoyumupdate-yca-certificates```2.修改仓库地址:尝试修改docker-ce-st......
  • IIS下使用SSL证书
    IIS下使用SSL证书    本文介绍windowsServer下SSL证书配置及IIS站点配置1.   生成SSL证书    在阿里云申请免费SSL证书    登录阿里云管理控制台,打开SSL证书管理     选择免费证书,点击创建证书。      突然发现阿里去免费证书......
  • java 判断 https证书到期
    Java判断HTTPS证书到期概述在Java中,我们可以使用SSLContext和HttpsURLConnection来判断HTTPS证书是否过期。本文将介绍整个流程,并提供相应代码和注释。流程图下面是整个判断HTTPS证书到期的流程图:sequenceDiagramparticipant客户端participant服务器客户......
  • 【内网渗透】隐藏cobaltstrike服务器—自定义证书+C2侧写
    简介自定义证书查看Cobaltstrike默认证书发现特征含有cobaltstrike关键字常用keytool命令查看证书文件:keytool-list-v-keystorexx.store修改证书密码:keytool-storepasswd-keystoretest.store修改alias别名:keytool-changealias-keystoretest.store-aliasso......
  • helm 启动 consul
    helm可以启动很简单的consulcluster:helminstallconsul consul/xxx/x -fconsul.yaml global:name:consuldatacenter:dc1tls:#Iftrue,theHelmchartwillenableTLSforConsul#serversandclientsandallconsul-k8s-control-planecom......
  • 一文掌握 Kubernetes 证书
    如果你正在自己的环境中运行Kubernetes,那么了解证书的工作原理以及如何管理它们以确保集群的安全性和完整性至关重要。在本文中,我们将解释什么是Kubernetes证书、其重要性,以及如何检查和更新kube-apiserver服务器证书。 Kubernetes证书在确保Kubernetes平台不同组件之......
  • day18 -基于Consul的自动发现 -告警平台部署管理-告警平台高级配置 (7.6-7.8.2)
    一、基于Consul的自动发现1、背景Prometheus配置文件prometheus-config.yaml配置了大量的采集规则,基本上都是运维小伙伴手动处理,如果后面增加了节点或者组件信息,就得手动修改此配置,并热加载promethues;那么能否动态的监听微服务呢?Prometheus提供了多种动态服务发现的功能,这里......
  • Jmeter HTTPS接口测试证书导入过程图解
    python中没有swich..case,若要实现一样的功能,又不想用if..elif来实现,可以充分利用字典进行实现主要是想要通过不同的key调用不同的方法,在学习过程中,发现不管输入的key是什么,只要字典中存在输出内容,每次都会输出,这跟自己需要的功能有出入。通过调试后,发现问题主要出现在key值对应的va......
  • 使用Python进行Firefox证书上传和删除证书的步骤
    在Web开发和测试过程中,有时需要在Firefox浏览器中管理证书,包括上传证书和删除证书。本文将介绍如何使用Python和Selenium库进行这些操作,以便更方便地处理证书管理。1.安装Selenium库和WebDriver:首先,确保已安装Selenium库和相应浏览器的WebDriver。可以使用以下命令安装Selenium:```b......
  • 脚本 给kubeadm安装的k8s集群 进行证书的延期 从1年改成10年
    请谨慎使用先测试#!/bin/bashset-oerrexitset-opipefail#set-oxtracelog::err(){printf"[$(date+'%Y-%m-%dT%H:%M:%S.%N%z')]:\033[31mERROR:\033[0m$@\n"}log::info(){printf"[$(date+'%Y-%m-%dT%H:%M:%S.%N%z'......