Code Monkey home page Code Monkey logo

etcdwp's People

Contributors

dream403 avatar opvexe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

lonisy

etcdwp's Issues

生产环境测试示例地址: 106.75.49.141:2379

// 内网: 10.9.74.198
// 外网: 106.75.49.141
etcd --name etcd0 --initial-advertise-peer-urls http://10.9.74.198:2380 \
--listen-peer-urls http://0.0.0.0:2380 \
--listen-client-urls http://0.0.0.0:2379  \
--advertise-client-urls http://10.9.74.198:2379,http://106.75.49.141:2380 \
--initial-cluster-token etcd-cluster-1 \
--initial-cluster etcd0=http://10.9.74.198:2380 \
--initial-cluster-state new >> etcd.log 2>&1 &

功能遗忘清单及用户角色测试示例

遗忘的功能

  • 角色权限关联
  • 角色授予权限
  • 修改用户密码

测试示例

etcdctl user get root  (查看用户)
etcdctl role get root (查看角色)

etcdctl role add root    (创建root角色)
etcdctl user add root (创建root用户)
etcdctl user grant-role root root (关联角色和用户)
etcdctl auth enable (激活认证)

etcdctl user grant-role root  (用户角色添加)
etcdctl user revoke-role        (用户角色删除)

角色的访问权限可以被赋予read(读),write(写),readwrite(读和写)权限。

etcdctl role revoke-permission   角色名 /foo/*
etcdctl role grant-permission 角色名 --prefix=true readwrite /pub/  (授权pub下所有的key值读写权限)
etcdctl role grant-permission 角色名 readwrite key1 key5  (key1-key5权限)

ETCD TLS证书制作及证书验证 (指导TLS证书配置)

客户端TLS证书设置

使用了客户端证书、客户端私钥和受信任的 CA 证书(即 CertFile、KeyFile 和 TrustedCAFile)。这意味着在 etcd 客户端与 etcd 服务器之间建立 TLS 连接时,客户端会使用这些证书进行身份验证,并验证 etcd 服务器使用的证书是否由受信任的 CA 签名。如果任何一个验证步骤失败,TLS 连接将被终止。

如果你没有特殊的安全要求,可以使用上面提供的本地测试证书进行测试。在这种情况下,你可以将 CertFile、KeyFile 和 TrustedCAFile 分别设置为以下值:

CertFile: 客户端证书文件路径,例如 client.crt
KeyFile: 客户端私钥文件路径,例如 client.key
TrustedCAFile: 受信任的 CA 证书文件路径,例如 ca.crt

如果你使用的是自己的证书,可以将这些值设置为相应证书的文件路径。

生成测试证书 (CN为: localhost, 192.168.31.108)

其中 192.168.31.108 为当前主机的IP。(Macos->Wifi 设置->IP地址)

生成CA证书:
openssl genrsa -out ca.key 4096
openssl req -new -key ca.key -x509 -days 3650 -out ca.crt -subj "/CN=etcd-ca"
生产服务端证书:
openssl genrsa -out server.key 4096
openssl req -new -key server.key -out server.csr -subj "/CN=localhost"
echo "subjectAltName = DNS:localhost, IP:192.168.31.108" > extfile.cnf
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 3650 -extfile extfile.cnf
生成客户端证书:
openssl genrsa -out client.key 4096
openssl req -new -key client.key -out client.csr -subj "/CN=etcd-client"
openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt -days 3650
Etcd 配置文件中,需要指定以下参数:
etcd:
  listen_client_urls: https://0.0.0.0:2379
  listen_peer_urls: https://0.0.0.0:2380
  advertise_client_urls: https://localhost:2379
  initial_advertise_peer_urls: https://localhost:2380
  cert_file: /path/to/server.crt          # 指定 etcd 使用的证书和私钥
  key_file: /path/to/server.key          # 指定 etcd 使用的证书和私钥
  trusted_ca_file: /path/to/ca.crt     # 指定 etcd 使用的 CA 证书
  client_cert_auth: true              # 启用 client auth,客户端需要提供证书进行认证

部署 Etcd 单机版 (docker)

version: '3'
services:
  etcd:
    image: quay.io/coreos/etcd:v3.5.0
    command: ["etcd", "--cert-file=/certs/server.crt", "--key-file=/certs/server.key", "--client-cert-auth", "--trusted-ca-file=/certs/ca.crt", "--advertise-client-urls=https://localhost:2379", "--listen-client-urls=https://0.0.0.0:2379"]
    volumes:
      - ./certs:/certs
    ports:
      - "2379:2379"
    restart: always

欢迎使用GPT-4,GPT-3.5

DeepAuto Chat (深度自动化AI对话机器人) based on GPT-4, which can deeply understand your needs and provide you with some suggestions and answers. (support ios android macos window linux)

[优化]优化连接服务卡顿

问题一、连接服务问题

问题描述:创建etcd服务-> 连接服务正常-> 关闭etcd服务-> 连接卡顿

image

问题二、连接服务断开,跳转键值页面。会自动返回到首页

问题描述:断开etcd服务-> 点击首页etcd服务->跳转到键值详情页面->自动返回到首页

期望 连接正常或失败均不卡顿

bug多如牛毛,希望尽快修复.做得好的话收费也是可以的

bug多如牛毛,希望尽快修复.做得好的话收费也是可以的

1.导出bug,多个配置时,每次导出只会使用第一个配置.
2.连接异常,连点断开后客户端依然显示正常,实际上此时已经断开了.
3.数据显示不可靠,实际上数据已经被删除了,但是还是会显示.或者已经新增的数据不显示.
4.导入bug,多个配置导入时导入到那个配置,完全是随机的.
5.最要命的是,存在多个配置时,你根本不知道当前显示的是哪个配置.你点的配置1,它可能显示的是配置2或者3.

总结:
该版本就完全没有进行测试,自测甚至都咩有.

image

提醒自己

提醒自己:

1、以后项目的事一定要想好设计后路,特别是合作开发,一定要确定分割线,防止自己踹坑。方便自己排查和抛出问题。
2、没事收起自己的善良,少操心。别人求你你可以协助,不求你你就当做不知道。
3、不能确定的事或者有问题,同事没积极解决导致线上问题及时与领导反馈。请求帮助。
4、不合理的请求,拒绝不要怕得罪人。都是同事有啥怕的,一份工作而已,不要怂。大不了换个工作。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.