Skip to content

Dev/improvements#22

Merged
romdalf merged 12 commits intobeezy-dev:mainfrom
coding-gecko:dev/improvements
Aug 20, 2025
Merged

Dev/improvements#22
romdalf merged 12 commits intobeezy-dev:mainfrom
coding-gecko:dev/improvements

Conversation

@coding-gecko
Copy link
Copy Markdown
Contributor

  • go version update to 1.24.5
  • adding "cert" method for vault authentication and it's related config example
  • socket checking refactor
  • adding retry to vault related operations

- updated to go 1.24.5
- image updated in containerfile
- k8s and cert auth now is supported as Vault authentication
- selectable via config file field "authmethod" with values "cert" and "k8s"
- Encrypt/decrypt split into internal function
- internal function called by Health()
- unix socket checking refactored
- instead of Health(), it is being done in goroutine every 10s (from startprovider.go)
- goroutine launched after grpc server is up&running
- based on error message, it decides whether to shut down plugin or not
- currently only shuts down on "invalid token"
- retryVaultOp() retries the execution of failed read/write operation on Vault
- if failure relates to token lease being invalid, tries to re-login
- added openssl config files to generate root ca, intermediate ca and kleidi client cert (used for authentication)
- added simple sh script to launch Kleidi as standalone container in docker with cert auth
- added config files
- added script to generate root ca, intermediate ca and client cert for cert auth
@romdalf romdalf self-assigned this Aug 8, 2025
@romdalf romdalf requested a review from Copilot August 8, 2025 11:34

This comment was marked as outdated.

romdalf and others added 3 commits August 8, 2025 13:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- fixed []byte conversion
- removed authInfo
@romdalf romdalf requested a review from Copilot August 8, 2025 15:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the Vault provider with improved authentication methods, error handling, and infrastructure updates. The changes include updating Go to version 1.24.5, adding certificate-based authentication alongside the existing Kubernetes authentication, implementing retry logic for Vault operations, and refactoring socket monitoring.

  • Updated Go version from 1.22.0 to 1.24.5 and related dependency updates
  • Added certificate authentication method for Vault with configuration examples and documentation
  • Implemented retry logic with automatic re-authentication for Vault operations

Reviewed Changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/prd/vault/vault/vault-config.json Updated configuration format with lowercase field names and added auth method parameters
internal/utils/startprovider.go Refactored socket monitoring to use periodic checking and removed socket parameter from Vault service initialization
internal/providers/hvault.go Major refactor adding retry logic, improved error handling, and support for multiple authentication methods
internal/providers/hauthprovider.go New file implementing authentication method factory for Kubernetes and certificate auth
go.mod Updated Go version and dependency versions
configuration/kleidi/vault-config.json Updated configuration example with new auth parameters
configuration/kleidi/cert-auth/* Added complete certificate authentication configuration examples and CA generation scripts
Containerfile-* Updated base images to use Go 1.24.5

Comment thread internal/providers/hvault.go Outdated
Comment thread internal/providers/hvault.go Outdated
@romdalf
Copy link
Copy Markdown
Collaborator

romdalf commented Aug 8, 2025

Moving to burning test for a 48-hour run.

- custom error struct hVaultErr added. Vault errors processed and stored in this type
- string comparison replaced with errors.Is
- unit test added and dockerfiles updated
@romdalf romdalf merged commit d63ae4a into beezy-dev:main Aug 20, 2025
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.

3 participants