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

feat: use aws secret manager #128

Closed
wants to merge 1 commit into from

Conversation

ezhil56x
Copy link
Contributor

Fixes #126
/claim #126

Copy link
Contributor

@poundifdef poundifdef left a comment

Choose a reason for hiding this comment

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

This code does not compile. Can you show a recording of the software working after you've fixed it? Then I'll review again.

To test, run:

go run .

And then

curl -G "http://localhost:8080/api/data/query" \
     --data-urlencode="api_key=local" \
     --data-urlencode="query=select 1" 

This should not throw any errors on the go side and the curl command. should return regular JSON.

@@ -66,7 +66,7 @@ func setupLogs(logConfig config.Logging) {
}
}

func GetStorageServices(c config.ScratchDataConfig) (*models.StorageServices, error) {
func GetStorageServices(c config.ScratchDataConfig, vault vault.Vault) (*models.StorageServices, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not change the signature of this function. Instead, add a new Vault member to the models.StorageServices struct. You can follow the same pattern we use for the blobstore and queue in this function.

)

type Database interface {
VerifyAdminAPIKey(hashedAPIKey string) bool

GetDestinations() []config.Destination
CreateDestination(destType string, settings map[string]any) (config.Destination, error)
GetDestinationCredentials(dbID int64) (config.Destination, error)
GetStorageServices() []config.StorageService
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not needed. When creating a database, we already pass the StorageServices struct into the New... function.

@poundifdef
Copy link
Contributor

Because this code doesn’t compile, I will close this pr for now.

@poundifdef poundifdef closed this Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use a AWS Secret Manager for DB credentials
2 participants