Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于错误注册的实现方案 #71

Closed
hi-sb opened this issue Jul 15, 2019 · 2 comments
Closed

关于错误注册的实现方案 #71

hi-sb opened this issue Jul 15, 2019 · 2 comments

Comments

@hi-sb
Copy link

hi-sb commented Jul 15, 2019

看了下面关于错误注册的方案,用黑白名单其实并不好。结合一下以前我们的做法,consul 本身有acl token这个特性,也就是说通过consul 可以实现费token赋予某个节点的读或者写的权限,来控制,比如 sit/service1 这是一个sit 的服务节点。那么sit 环境分配到了一个acl token 叫做 0x1782173 ,那么这个token 具有这个服务的读权限则可以发现这个服务。具有这个节点的写权限则可以注册这个服务。同理 通过consul的 acl token 可以控制 各环境,甚至是一个环境下每一个token 能发现哪些服务,能注册哪些服务都是可以控制的。

我这边,以前实现过一次,但是一些原因那个代码不能拿出来。在这里提供一个思路,希望有帮助,谢谢!

@HaojunRen
Copy link
Member

我集成的不仅仅是Consul,还有Nacos,Eureka,Zookeeper。我需要统一的解决方案

@HaojunRen HaojunRen reopened this Jul 21, 2019
@HaojunRen
Copy link
Member

Consul Token机制并不好,它是随机生成的,我们要做到更安全的方式,例如token三个月更新一次,一旦更新,consul上注册的服务全部都要手工更新一遍。请问你们是怎么管理的?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants