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

Add check_server_cert.sh #110

Merged
merged 1 commit into from
Feb 7, 2024
Merged

Add check_server_cert.sh #110

merged 1 commit into from
Feb 7, 2024

Conversation

aaronpkahn
Copy link
Collaborator

Description

Adds a script tools/check_server_cert.sh to validate client configs against telemetry servers.

Type of change

Please select all options that apply to this change:

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Checklist:

  • 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.

die "could not find json config file: $CONFIG"
fi

HOSTNAME=$(jq -r ".hostname" "$CONFIG")

Choose a reason for hiding this comment

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

Should this be .host?

Host string `json:"host,omitempty"`

Suggested change
HOSTNAME=$(jq -r ".hostname" "$CONFIG")
HOSTNAME=$(jq -r ".host" "$CONFIG")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@SirArkimedes thanks for the feedback, but this script is for validating server setup is compatible with a proposed vehicle config (which uses "hostname"). I've updated the README, and error messaging.

fi

HOSTNAME=$(jq -r ".hostname" "$CONFIG")
CA=$(jq -r ".ca" "$CONFIG")

Choose a reason for hiding this comment

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

Should this be .ca_file?

CAFile string `json:"ca_file"`

Suggested change
CA=$(jq -r ".ca" "$CONFIG")
CA=$(jq -r ".ca_file" "$CONFIG")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, that's the server config. This script accepts a fleet telemetry client config.

Choose a reason for hiding this comment

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

Ohhhh. Okay, the new README updates make this make sense, then! Thanks!

@aaronpkahn aaronpkahn merged commit 021c8b0 into main Feb 7, 2024
3 checks passed
@aaronpkahn aaronpkahn deleted the akahn/check_csrs branch February 7, 2024 18:54
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.

4 participants