Feature Request: Add support for AWS IAM roles (ECS Task Role / EC2 Instance Profile) for SQS authentication
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
Comienza en internal/config/mqconfig_aws.go y el método IsConfigured() citado en el issue, y luego rastrea dónde la validación de configuración lanza 'message queue configuration is required' y dónde se construye el cliente SQS (para confirmar que depende de la cadena de credenciales predeterminada del AWS SDK). Encuentra los tests de validación de configuración que cubren AWSSQSConfig y añade casos para entornos de rol IAM. Hecho significa que IsConfigured() devuelve true con solo Region configurado cuando está presente AWS_CONTAINER_CREDENTIALS_* o AWS_EXECUTION_ENV, que las claves explícitas siguen funcionando y que los tests de configuración existentes pasan.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Go
- Estrellas
- 1.1k
- Forks
- 70
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 56
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hookdeck/outpost
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
hookdeck/outpost#1117 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
Todos los issues de hookdeck/outpost
Issues similares
-
Named Tuple element with a space in its name fails to parsePosiblemente ocupada @spicysharkco la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ClickHouse/clickhouse-go#2073 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
ci: nothing regenerates the Go contract types, so a hand-edit to types.gen.go passesPosiblemente ocupada @shaiknoorullah la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
shaiknoorullah/hg-mono#993 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CarlosDanielDev/aiacc#78 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100