Infisical / infisical

♾ Infisical is the open-source secret management platform: Sync secrets across your team/infrastructure, prevent secret leaks, and manage internal PKI
https://infisical.com
Other
13.16k stars 698 forks source link

Remove @aws-sdk/client-secrets-manager dependency from backend #678

Open dangtony98 opened 1 year ago

dangtony98 commented 1 year ago

Feature description

As part of the initiative to reduce dependencies on the backend, it'd be great to remove the @aws-sdk/client-secrets-manager dependency that's currently used as an SDK in the AWS secret manager (AWS SM) integration to sync secrets from Infisical to AWS SM.

This task involves replacing this dependency with the HTTPS Query API as mentioned here.

The HTTPS Query API gives you programmatic access to Secrets Manager and AWS. The HTTPS Query API allows you to issue HTTPS requests directly to the service and thus we can use it to create/read/update/delete secrets in AWS SM.

Why would it be useful?

This would further enhance the security of Infisical by reducing dependencies.

Additional context

This shouldn't be too difficult and I'd recommend it as a great first issue especially since the AWS SM integration is already made; we just need to refactor logic to use the HTTP Query API instead of the AWS SM SDK.

abdullahranginwala commented 1 year ago

I would love to work on this issue. Based on my initial look at the code, I have identified the following services/functions to be replaced with HTTPS Query API: CreateSecretCommand, GetSecretValueCommand, ResourceNotFoundException, SecretsManagerClient, UpdateSecretCommand .

However, I couldn't find a detailed documentation for making the create/read/update/delete calls.

This seems like a straightforward implementation but some more context about the APIs will be extremely helpful.

dangtony98 commented 1 year ago

That would be great @abdullahranginwala - Just assigned it to you!

Definitely join the Slack; best to communicate there

abdullahranginwala commented 1 year ago

I am unable to join slack since it requires a work email ending with @infisical.com

JunedKhan101 commented 1 year ago

@abdullahranginwala I don't think so that is the case, I have joined the slack community with my gmail account.

dangtony98 commented 1 year ago

Hi @abdullahranginwala,

Can you try joining via this link: https://infisical.com/slack

Let me know if it works!

abdullahranginwala commented 1 year ago

Yup, worked! I was trying to access the other link

abdullahranginwala commented 11 months ago

Apologies for such a late reply. Is this issue still active? @dangtony98

abdullahranginwala commented 11 months ago

Upon further investigation, it seems the issue is more complex due to AWS Signature 4 authentication requirements. For now, I am setting this aside.

dangtony98 commented 11 months ago

@abdullahranginwala Sounds good!