Closed bkeane closed 2 months ago
ArnZ is a DSL for authorizing methods based on AWS IAM caller ARNs.
Your Goa application...
When imported, all methods will require all callers to be IAM authenticated.
package design import ( . "goa.design/goa/v3/dsl" _ "goa.design/plugins/v3/arnz/dsl" )
You can authorize callers by ARN using the AllowArnsMatching function, passing it a regular expression.
AllowArnsMatching
Method("privileged", func() { AllowArnsMatching("^arn:aws:iam::123456789012:user/administrator$") Result(SecretStuff) HTTP(func() { Get("/secrets") Response(StatusOK) }) })
Allowing unsigned requests is useful for allowing traffic not originated from API gateway.
Method("healthz", func() { AllowUnsignedCallers() Result(HealthCheck) HTTP(func() { GET("/healthz") Response(StatusOK) }) })
note: Allowing unsigned callers does not disable authentication or authorization for signed requests.
Arnz
ArnZ is a DSL for authorizing methods based on AWS IAM caller ARNs.
Given
Your Goa application...
You Can
Authenticate All Callers
When imported, all methods will require all callers to be IAM authenticated.
Authorize Callers by ARN
You can authorize callers by ARN using the
AllowArnsMatching
function, passing it a regular expression.Allow Unsigned Requests
Allowing unsigned requests is useful for allowing traffic not originated from API gateway.
note: Allowing unsigned callers does not disable authentication or authorization for signed requests.
Further Reading