Feature Request: Add support for AWS IAM roles (ECS Task Role / EC2 Instance Profile) for SQS authentication
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
調査の方向性
まず internal/config/mqconfig_aws.go と、issue に引用されている IsConfigured() メソッドから始め、次に構成検証が 'message queue configuration is required' を送出する箇所と、SQS クライアントが構築される箇所(AWS SDK のデフォルト認証チェーンに依存していることを確認するために)を追跡する。AWSSQSConfig をカバーする構成検証テストを見つけ、IAM ロール環境のケースを追加する。完了の条件は、AWS_CONTAINER_CREDENTIALS_* または AWS_EXECUTION_ENV が存在する場合に Region のみ設定されていれば IsConfigured() が true を返し、明示的なキーも引き続き機能し、既存の構成テストがすべて通過することである。
索引モデルが issue の本文から書いたものです。
説明
Feature Request: Add support for AWS IAM roles (ECS Task Role / EC2 Instance Profile) for SQS authentication
Description
Currently, Outpost requires explicit AWS credentials (AWS_SQS_ACCESS_KEY_ID and AWS_SQS_SECRET_ACCESS_KEY) for SQS authentication. This prevents the use of AWS IAM roles, which is the recommended security practice for applications running on AWS infrastructure like ECS, EC2, or Lambda.
Current Behavior
When running Outpost on ECS Fargate without explicit credentials, the service fails with:
config validation error: message queue configuration is required
Looking at the source code in internal/config/mqconfig_aws.go, the IsConfigured() method requires non-empty credentials:
func (c *AWSSQSConfig) IsConfigured() bool {
return c.AccessKeyID != "" && c.SecretAccessKey != "" && c.Region != ""
}
Expected Behavior
Outpost should support AWS IAM roles by:
- Detecting when running in an AWS environment with IAM roles available
- Using the AWS SDK's default credential provider chain
- Only requiring the region when IAM roles are available
Use Case
Many organizations follow AWS security best practices by:
- Using IAM roles instead of long-lived access keys
- Running containerized workloads on ECS with task roles
- Deploying on EC2 instances with instance profiles
- Following the principle of least privilege
Currently, we have to create IAM users with access keys specifically for Outpost, which:
- Goes against security best practices
- Requires additional secret management
- Increases the attack surface
- Makes credential rotation more complex
Proposed Solution
Modify the IsConfigured() method to support IAM roles:
func (c *AWSSQSConfig) IsConfigured() bool {
// Check if running with IAM role credentials
if hasIAMRoleCredentials() {
return c.Region != ""
}
// Fall back to explicit credentials
return c.AccessKeyID != "" && c.SecretAccessKey != "" && c.Region != ""
}
func hasIAMRoleCredentials() bool {
// ECS Task Role
if os.Getenv("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI") != "" {
return true
}
// EC2 Instance Profile
if os.Getenv("AWS_CONTAINER_CREDENTIALS_FULL_URI") != "" {
return true
}
// Lambda or other AWS services
if os.Getenv("AWS_EXECUTION_ENV") != "" {
return true
}
return false
}
The AWS SDK for Go already handles credential resolution automatically through its default credential provider chain, so the SQS client initialization should work without explicit credentials when IAM roles are available.
Environment
- Outpost version: v0.4.1
- Deployment platform: AWS ECS Fargate
- AWS SDK: Already included in Outpost
Additional Context
This feature would align Outpost with AWS best practices and make it easier to deploy in production environments. Many similar tools (e.g., Fluent Bit, Prometheus, etc.) support IAM roles out of the box.
Workarounds
Current workarounds include:
- Creating IAM users with access keys (security anti-pattern)
- Using a sidecar container to provide credentials
- Forking Outpost to add IAM role support
None of these are ideal for production use.
References
- 主要言語
- Go
- スター
- 1.1k
- フォーク
- 70
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 56
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hookdeck/outpost のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
hookdeck/outpost#1117 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
hookdeck/outpost の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: Bedrock invoke-with-response-stream reports `stop_reason: "end_turn"` for tool-use turnsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
oalders/clodhopper#162 ·
メンテナーはふだん 1 日以内に返信
-
component/server severity/minor type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信