Skip to content

feat(net.vault): 🚧 add auth token vault#35

Merged
codedesignplus merged 3 commits intomainfrom
rc
Oct 30, 2024
Merged

feat(net.vault): 🚧 add auth token vault#35
codedesignplus merged 3 commits intomainfrom
rc

Conversation

@codedesignplus
Copy link
Collaborator

This pull request introduces a new TypeAuth enum to handle different authentication types in the Vault and refactors the VaultOptions class to use this new enum. Additionally, it updates the VaultClientFactory to create clients based on the authentication type and modifies the test cases to reflect these changes. Minor updates were also made to the docker-compose.yml and related scripts.

Authentication Enhancements:

  • Added TypeAuth enum to packages/CodeDesignPlus.Net.Vault/src/CodeDesignPlus.Net.Vault.Abstractions/Options/TypeAuth.cs to define different authentication types for the Vault.
  • Updated VaultOptions class to include a TypeAuth property that determines the authentication type based on the provided credentials.
  • Modified VaultClientFactory to create clients based on the TypeAuth value and throw an exception if the authentication type is not defined.

Validation and Exception Handling:

  • Updated the Validate method in VaultOptions to check for TypeAuth.None and add a validation error if no authentication type is specified.
  • Added test cases in VaultOptionsTest to validate the new TypeAuth property and ensure proper error handling for invalid authentication types. [1] [2]

Test Enhancements:

  • Added new test cases in VaultClientFactoryTest to verify client creation based on different authentication types and to handle invalid authentication scenarios. [1] [2]
  • Included a new test case in VaultExtensionsTest to verify the configuration builder with token-based authentication.

Configuration and Script Updates:

  • Minor updates to docker-compose.yml to change command to entrypoint for better script execution. [1] [2]
  • Added a new config.sh script to set up Vault configuration.
  • Modified entrypoint.sh to include a greeting message and start the Vault server.
  • Updated credentials in credentials.json for testing purposes.

CodeDesignPlus and others added 3 commits October 29, 2024 19:40
@codedesignplus codedesignplus merged commit 8ad979b into main Oct 30, 2024
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