add credentials provider #65
Merged
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.
About
Completes ENT-290
This PR adds support for a credentials provider as per this RFC
Changes
Required New Env Vars Introduced
ELASTICSEARCH_CREDENTIALS_PROVIDER_KEY
: This is thekey
for the credentials providerELASTICSEARCH_CREDENTIALS_PROVIDER_MECHANISM
: This is the security credential that is expected from the credential provider service. Could beapi-key
orservice-token
HASURA_CREDENTIALS_PROVIDER_URI
: The URI for the webhook serviceAll these env vars are not part of the
ddn connector init
flow. The user needs to manually add them after initializing the connector.When to use Credentials Provider
The Connector will use the Credentials Provider service if
HASURA_CREDENTIALS_PROVIDER_URI
env var is set and is not emptyTests
Basic unit tests that test the assertion of correct errors are present, but a full test would require a running elasticsearch instance and an environment where variables can be set and unset. These things are not a part of the test suite for now, but will be in the future.