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 infrastructure for loading certs on the server #86

Merged
merged 8 commits into from
Aug 2, 2024
Merged

Conversation

UnstoppableMango
Copy link
Contributor

No description provided.

The Makefile has been updated to improve the way it handles '.go' files. The changes include:
- Adjusted the GO_SRC variable to exclude './' from the start of file paths.
- Added new targets under .make/tidy/ for each Go module (gen, provider, sdk, tests) to ensure their dependencies are tidied up correctly.
- Introduced a new function to load certificates for TLS configuration
- Added a new option in the provisioner struct for gRPC server options
- Modified the New function to include these server options when creating a new gRPC server
- Created an opt function WithTLS that appends TLS credentials to the gRPC server options
- Renamed RegisterCommandServiceServer and State functions for better readability
Two new utility functions have been added to the opts package. The NoOp function is a no-operation function that returns an error-free function for any type. The If function takes a boolean predicate and an option, returning the option if the predicate is true or a no-op otherwise.
Significant changes include:
- Added error handling to the 'New' function in the provisioner package.
- Introduced new functions for setting gRPC options and TLS configuration.
- Created a function to handle optional certificates, which only applies if all certificate files are provided.
- Refactored existing functions to use these new option-setting functions.
The provisioner's main.go file has been updated to enhance the logging system. The log level is now set based on the verbose flag, and error messages have been improved for better clarity. Additionally, support for optional certificates (CA, server certificate, and private key) has been introduced. These can be provided via new command line flags: 'ca-file', 'cert-file', and 'key-file'.
@UnstoppableMango UnstoppableMango enabled auto-merge (squash) August 2, 2024 22:59
@UnstoppableMango UnstoppableMango merged commit 1302582 into main Aug 2, 2024
11 checks passed
@UnstoppableMango UnstoppableMango deleted the certs branch August 2, 2024 23:01
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.

1 participant