Skip to content

Added property to accept certificates for tls termination at tcp router #502

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

AshishNaware
Copy link

@AshishNaware AshishNaware commented Jul 22, 2025

Summary

This PR introduces new property called frontend_tls to accept certs and keys that are used to terminate tls traffic at tcp router.

Backward Compatibility

Breaking Change? Yes/No

No

@AshishNaware AshishNaware requested a review from a team as a code owner July 22, 2025 15:32
Copy link

linux-foundation-easycla bot commented Jul 22, 2025

CLA Not Signed

func certHasSAN(cert *x509.Certificate) bool {
hasSANExtension := false
for _, ext := range cert.Extensions {
if ext.Id.String() == "2.5.29.17" {
Copy link

Choose a reason for hiding this comment

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

Some documentation here may help.

Where did this id 2.5.29.17 come from? Is this a well known constant in the go library perhaps? What would happen if this value changes? How do we update this value?

Choose a reason for hiding this comment

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

This is the OID of the SAN field coming from the ASN1 spec. It will never change. https://oidref.com/2.5.29.17

I think that the check that computes hasSANEntries below is sufficient / redundant, but not 100% sure.

Copy link
Author

Choose a reason for hiding this comment

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

if bp := os.Getenv("FRONTEND_TLS_BASE_PATH"); bp != "" {
return bp
}
return "/var/vcap/jobs/tcp_router/config/keys/tcp-router/frontend"
Copy link

Choose a reason for hiding this comment

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

do we have to worry about proper permissions? Copying the sibling's (backend) permissions:

chown -R root:vcap /var/vcap/jobs/tcp_router/config/certs/tcp-router/frontend
chmod -R 640 	  /var/vcap/jobs/tcp_router/config/certs/tcp-router/frontend
chmod      750 	  /var/vcap/jobs/tcp_router/config/certs/tcp-router/frontend

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

Successfully merging this pull request may close these issues.

5 participants