Skip to content

Add support for multiple sds configs in DownstramTlsContext#24900

Merged
ggreenway merged 4 commits intoenvoyproxy:mainfrom
LuyaoZhong:multiple-sds
Jan 17, 2023
Merged

Add support for multiple sds configs in DownstramTlsContext#24900
ggreenway merged 4 commits intoenvoyproxy:mainfrom
LuyaoZhong:multiple-sds

Conversation

@LuyaoZhong
Copy link
Copy Markdown

Remove max_items=2 validation rules from sds configs proto. Add test cases to verify that multiple sds configs is allowed and works with SNI-based cert selection.

Fixes #24824

Signed-off-by: Luyao Zhong luyao.zhong@intel.com

Remove max_items=2 validation rules from sds configs proto.
Add test cases to verify that multiple sds configs is allowed
and works with SNI-based cert selection.

Fixes envoyproxy#24824

Signed-off-by: Luyao Zhong <luyao.zhong@intel.com>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @lizan
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #24900 was opened by LuyaoZhong.

see: more, trace.

}

TEST_F(ServerContextConfigImplTest, MultiSdsConfig) {
TEST_F(ServerContextConfigImplTest, SdsConfigNoName) {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The old test does not make sense. The validation failure is caused by not setting name instread of dual configs.

Signed-off-by: Luyao Zhong <luyao.zhong@intel.com>
"00:5B:C1:3E:33:8A:B9:2D:04:2C:B1:3F:0A";
constexpr char TEST_SERVER_CERT_NOT_BEFORE[] = "Apr 7 16:46:35 2022 GMT";
constexpr char TEST_SERVER_CERT_NOT_AFTER[] = "Apr 6 16:46:35 2024 GMT";
constexpr char TEST_SERVER_CERT_256_HASH[] =
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

regenerating this header file causes CI failure since it overrides the old content, TEST_SERVER_CERT_NOT_AFTER is not generated but other test still replies on it.

I checked that servercert_info.h was first introduced by #21428.
@daixiang0 How did you generate this file, I use generate_info_header in certs.sh, but the output is different.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

From a comment (https://github.com/envoyproxy/envoy/pull/21428/files#r884045881) it sounds like it was supposed to be generated, but it seems like that isn't the case for some reason. If you'd like you can manually add NOT_BEFORE and NOT_AFTER for the new correct values, and file an issue to fix so that they're generated automatically like they should be. Or if you'd like to fix it, that would be great.

Copy link
Copy Markdown
Author

@LuyaoZhong LuyaoZhong Jan 13, 2023

Choose a reason for hiding this comment

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

I see, the command in certs.sh was probably modified downstream to generate header info but not got committed and upstreamed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

regenerating this header file causes CI failure since it overrides the old content, TEST_SERVER_CERT_NOT_AFTER is not generated but other test still replies on it.

I checked that servercert_info.h was first introduced by #21428. @daixiang0 How did you generate this file, I use generate_info_header in certs.sh, but the output is different.

When run the script, it will update all contents, so you can add value and update all.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@daixiang0 yes, but we should add changes to certs.sh otherwise when other people run certs.sh the old content is not generated.

ggreenway
ggreenway previously approved these changes Jan 12, 2023
Copy link
Copy Markdown
Member

@ggreenway ggreenway left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

Signed-off-by: Luyao Zhong <luyao.zhong@intel.com>
Signed-off-by: Luyao Zhong <luyao.zhong@intel.com>
@LuyaoZhong
Copy link
Copy Markdown
Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #24900 (comment) was created by @LuyaoZhong.

see: more, trace.

@daixiang0
Copy link
Copy Markdown
Member

@LuyaoZhong
Copy link
Copy Markdown
Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #24900 (comment) was created by @LuyaoZhong.

see: more, trace.

Copy link
Copy Markdown
Member

@lizan lizan left a comment

Choose a reason for hiding this comment

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

/lgtm api

Copy link
Copy Markdown
Member

@ggreenway ggreenway left a comment

Choose a reason for hiding this comment

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

LGTM

@ggreenway ggreenway merged commit fb48a7d into envoyproxy:main Jan 17, 2023
VishalDamgude pushed a commit to freshworks-oss/envoy that referenced this pull request Feb 2, 2023
…xy#24900)

Remove max_items=2 validation rules from sds configs proto.
Add test cases to verify that multiple sds configs is allowed
and works with SNI-based cert selection.

Fixes envoyproxy#24824

Signed-off-by: Luyao Zhong <luyao.zhong@intel.com>
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

Successfully merging this pull request may close these issues.

SDS secret config not usable for SNI based cert selection with more than two certificates

4 participants