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

introduce data connectors, used to validate if vin is allowed to connect #177

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

patrickdemers6
Copy link
Collaborator

Description

Introduces the concept of data connectors which can use externally provided data to enhance server functionality.

The data connectors supported so far:

  • Redis
  • HTTP
  • File
  • gRPC

To start, data connectors are used for one capability: checking if a vin is allowed before allowing it to send data to the server. This prevents a compromised vehicle from being able to send data to a random fleet-telemetry server.

Please select all options that apply to this change:

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Checklist:

Confirm you have completed the following steps:

  • My code follows the style of this project.
  • I have performed a self-review of my code.
  • I have made corresponding updates to the documentation.
  • I have added/updated unit tests to cover my changes.
  • I have added/updated integration tests to cover my changes.

Other Notes

  • To generate gRPC service protos, additional dependencies are needed. The generation of protos is now handled by a Docker container.
  • General dependency upgrades.
    • Ginkgo no longer supports SlowSpecThreshold so it has been removed.

switch name {
case "vin_allowed":
if c.VinAllowedConnector != nil {
c.logger.Log(logrus.WARN, "vin_allowed capability specified multiple times", logrus.LogInfo{})
Copy link
Collaborator

Choose a reason for hiding this comment

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

heh, last connector wins!

@patrickdemers6
Copy link
Collaborator Author

I'd like to reject connection before web socket is established but am not having success. Getting that working can be a followup if someone wants to work on it.

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.

2 participants