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

support ssl-hostname-overwrite #243

Merged
merged 2 commits into from
Mar 29, 2022
Merged

support ssl-hostname-overwrite #243

merged 2 commits into from
Mar 29, 2022

Conversation

davidkhala
Copy link
Member

Signed-off-by: DavidLiu [email protected]

@davidkhala
Copy link
Member Author

resolve a point on #222

conn, connError = gRPCClient.NewConnection(node.Addr, func(tlsConfig *tls.Config) { tlsConfig.InsecureSkipVerify = true })
conn, connError = gRPCClient.NewConnection(node.Addr, func(tlsConfig *tls.Config) {
tlsConfig.InsecureSkipVerify = true
tlsConfig.ServerName = node.SslTargetNameOverride
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if SslTargetNameOverride leave to empty?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and I am not sure if we should add any kind of test as coverage?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

option.servername is a string so should be default to empty string

Good idea to have test coverage.
I will migrate my test back.

TLSCAKeyByte []byte
TLSCARootByte []byte
Addr string `yaml:"addr"`
SslTargetNameOverride string `yaml:"ssl_target_name_override"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a sample in readme document for usage

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the original document for struct Node?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有ssl hostname overwrite 之后就不需要在环境里面搞这段了

您可能还需要在 hosts 文件中增加节点域名和 IP 的映射关系

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at my point of view, ssl hostname overwrite still need you to change /etc/host if needed....

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/etc/host/ can be another layer if user want, but not mandatory for cheating grpc

@davidkhala davidkhala force-pushed the ssl-name-overwrite branch 3 times, most recently from feea25c to 05e02fc Compare March 26, 2022 13:23
@davidkhala
Copy link
Member Author

@SamYuan1990 在做这个的途中发现logging的策略比较模糊,可能需要清理下,可以另外开issue么?

@SamYuan1990
Copy link
Member

@SamYuan1990 在做这个的途中发现logging的策略比较模糊,可能需要清理下,可以另外开issue么?

好的,欢迎

Dockerfile Outdated
@@ -8,6 +8,7 @@ ENV GOPROXY=https://goproxy.cn,direct
ENV export GOSUMDB=off

COPY . .
RUN go mod vendor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? why we need go mod vendor here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

解决依赖冲突的时候加入的代码,刚测试过,由于go build的时候也会做类似的事情,所以多余
将此回滚

TLSCAKeyByte []byte
TLSCARootByte []byte
Addr string `yaml:"addr"`
SslTargetNameOverride string `yaml:"ssl_target_name_override"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at my point of view, ssl hostname overwrite still need you to change /etc/host if needed....

# docker pull hyperledger/fabric-orderer:amd64-1.4
# Error response from daemon: manifest for hyperledger/fabric-orderer:amd64-1.4 not found: manifest unknown: manifest unknown

echo y | ./byfn.sh up -i 1.4.12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest change back to 1.4.10
is 1.4 still LTS?
are we going to upgrade CI changes with this pr?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.4 is no more LTS, would you consider a removal for this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far not, as it is previous TLS, and I make a PR for supporting at #250
but honestly speaking, for my point of view, as 1.4 is no previous LTS, we don't need to bump up version in CI in high frequency.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.4.12 should be last version of release-1.4, I think no further bump up in future.

@davidkhala
Copy link
Member Author

@SamYuan1990 这个CI出的error让我想请教下
为何在文档当中我们都使用的是...msp/keystore/priv_sk
但是实际上存在的文件是:...msp/keystore/6e8f3e24524194db05ee8bd0b8989b6ba6551bad83f8cf4220d167221c82de36_sk

更为惊奇的是虽然 msp/keystore/priv_sk不存在,但是master上的1_4测试竟然也可以通过。

@davidkhala
Copy link
Member Author

davidkhala commented Mar 29, 2022

@SamYuan1990 这个CI出的error让我想请教下 为何在文档当中我们都使用的是...msp/keystore/priv_sk 但是实际上存在的文件是:...msp/keystore/6e8f3e24524194db05ee8bd0b8989b6ba6551bad83f8cf4220d167221c82de36_sk

更为惊奇的是虽然 msp/keystore/priv_sk不存在,但是master上的1_4测试竟然也可以通过。

了解到priv_sk是tape一直以来用的格式,也是2.x以来cryptogen生成的格式

@davidkhala davidkhala force-pushed the ssl-name-overwrite branch 2 times, most recently from 1e021ad to 9a22448 Compare March 29, 2022 07:46
Copy link
Member

@SamYuan1990 SamYuan1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SamYuan1990 SamYuan1990 merged commit 48781ce into master Mar 29, 2022
@SamYuan1990 SamYuan1990 deleted the ssl-name-overwrite branch March 29, 2022 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants