SCB-1563: Support for encrypting values#55
Open
threeq wants to merge 10 commits intoapache:masterfrom
Open
Conversation
拉取主分支最新功能
tianxiaoliang
requested changes
Dec 10, 2019
| timeout: 5m | ||
| sslEnabled: false | ||
| rootCAFile: /opt/kie/ca.crt No newline at end of file | ||
| rootCAFile: /opt/kie/ca.crt |
| service KV | ||
| } | ||
|
|
||
| func (ckv *cryptoKV) CreateOrUpdate(ctx context.Context, kv *model.KVDoc) (*model.KVDoc, error) { |
Contributor
There was a problem hiding this comment.
不需要重新写一个实现,而是将加解密过程作为一个中间层,在kv创建更新查询流程中处理,这整个文件都是不需要的
Contributor
Author
There was a problem hiding this comment.
这样就需要写到两个具体实现里面,
github-projs/servicecomb-kie/server/service/mongo/history/service.go
github-projs/servicecomb-kie/server/service/mongo/kv/kv_service.go
这样如果后面换了存储实现(比如 consul,mysql 等),再次实现这个 service 的时候也需要加上加密的相关实现,这样会增加和底层 service 的耦合度及其实现难度。所以我建议对加密形成一个中间代理层,这个代理层里面的对加密的实现其实和底层的存储无关
Contributor
|
感谢你的贡献,请看下comment,提出你的意见 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.