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

[bug]: price oracle SSL certificate validation missing #1278

Open
ZZiigguurraatt opened this issue Jan 7, 2025 · 1 comment
Open

[bug]: price oracle SSL certificate validation missing #1278

ZZiigguurraatt opened this issue Jan 7, 2025 · 1 comment
Labels
bug Something isn't working needs triage P1
Milestone

Comments

@ZZiigguurraatt
Copy link

The price oracle client inside tapd does not seem to do SSL certificate validation of the price oracle server. This is a security issue as we have no confidence that we trust the price oracle we are talking to is the one we think we are talking to.

We should have the following choices:

  1. Root CAs to trust (in addition to or instead of the operating system root CA list)
  2. Trust operating system root CA list (yes or no)
  3. Require certificate checking
  4. Don't require certificate checking
  5. Pin to a specific certificate (either signed by a CA or self signed)
@Roasbeef
Copy link
Member

Roasbeef commented Jan 10, 2025

The issue is how we create the server dial opts in oracle.go:

// serverDialOpts returns the set of server options needed to connect to the
// price oracle RPC server using a TLS connection.
func serverDialOpts() ([]grpc.DialOption, error) {
var opts []grpc.DialOption
// Skip TLS certificate verification.
tlsConfig := tls.Config{InsecureSkipVerify: true}
transportCredentials := credentials.NewTLS(&tlsConfig)
opts = append(opts, grpc.WithTransportCredentials(transportCredentials))
return opts, nil
}

This should inherit dialInsecure from the earlier context.

@Roasbeef Roasbeef added this to the v0.6 milestone Jan 10, 2025
@Roasbeef Roasbeef added the P1 label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage P1
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants