-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: custom root certificate support #19
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…into dani/docs-example-update
Coverage Report
File Coverage
|
brockdusome
approved these changes
Jul 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request primarily introduces changes to the
ClarifaiAuthHelper
class insrc/client/auth/helper.ts
to support the use of root SSL certificates for secure gRPC connections. The changes also include updates to related files likesrc/client/base.ts
,src/utils/types.ts
, and corresponding unit tests.The most important changes are:
Addition of new functionality:
src/client/auth/helper.ts
: Added a new private member_rootCertificatesPath
in theClarifaiAuthHelper
class to store the path to the root SSL certificates file. This path is passed as a new parameter in the constructor and is used to create a secure gRPC client if provided. [1] [2] [3]src/client/auth/helper.ts
: Added a new getter methodrootCertificatesPath
to return the root certificates path.src/client/auth/helper.ts
: Added a check in the constructor to validate the existence of the root certificates file if a path is provided.src/client/base.ts
: Added a new protected memberrootCertificatesPath
in theBaseClient
class to store the root certificates path obtained from theClarifaiAuthHelper
. [1] [2]Changes to existing functionality:
src/client/rag.ts
: Changed the default value of thebaseWorkflow
parameter in theRAG
class constructor from "Text" to "Universal".Updates to types and tests:
src/utils/types.ts
: Updated theAuthConfig
type to include an optionalrootCertificatesPath
field.tests/client/auth/helper.unit.test.ts
: Added a new unit test to check for an error when an invalid root certificates path is provided to theClarifaiAuthHelper
constructor.These changes enhance the flexibility of the gRPC client configuration by allowing it to use custom SSL root certificates when needed.