You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently AWS API keys are used directly in order to authenticate the Uli API server to AWS and authorise S3 access. We can secure this by removing these keys and using identity based Authz/AuthN.
@aws-sdk/client-s3 uses AWS credentials env module that automatically takes API keys from environment variables. We don't need to explicitly pass them. So instead of doing:
This makes the config more forgiving and secure. We can rely on the same environment variables for local developement but at the same time, we can take advantage of EKS Pod Identity - which provides a way of attaching an IAM role to a pod (just like EC2 instance profiles) to allow access to S3. Developers can use temporary credentials received via aws sso login --profile tattle or manually copying credentials from the login page.
We can effectively eliminate the need to handle or process AWS API keys in code.
Addtional Context
Of course, some keys have additional utility like SES access which we will need to consider while switching over.
eternaltyro
changed the title
[Enhancement] Remove explicitly passing AWS API keys
[Enhancement] Remove AWS API key handling from API Server config
Sep 17, 2024
eternaltyro
changed the title
[Enhancement] Remove AWS API key handling from API Server config
[Enhancement] Remove AWS API key handling from Uli API Server config
Sep 17, 2024
Is your feature request related to a problem? Please describe.
Currently AWS API keys are used directly in order to authenticate the Uli API server to AWS and authorise S3 access. We can secure this by removing these keys and using identity based Authz/AuthN.
Uli/browser-extension/api-server/s3.js
Lines 7 to 8 in 58e19f2
Describe the solution you would like
@aws-sdk/client-s3
uses AWS credentials env module that automatically takes API keys from environment variables. We don't need to explicitly pass them. So instead of doing:Uli/browser-extension/api-server/s3.js
Lines 12 to 14 in 58e19f2
We can do something simpler like:
The SDK would handle AWS AuthN automatically.
Describe alternatives you've considered
This makes the config more forgiving and secure. We can rely on the same environment variables for local developement but at the same time, we can take advantage of EKS Pod Identity - which provides a way of attaching an IAM role to a pod (just like EC2 instance profiles) to allow access to S3. Developers can use temporary credentials received via
aws sso login --profile tattle
or manually copying credentials from the login page.We can effectively eliminate the need to handle or process AWS API keys in code.
Addtional Context
Of course, some keys have additional utility like SES access which we will need to consider while switching over.
References:
The text was updated successfully, but these errors were encountered: