mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 17:11:30 +00:00
refactor: move aws body scope parsing to ingress
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/mulgadc/spinifex/spinifex/foundation/aws/arn"
|
||||
"github.com/mulgadc/spinifex/spinifex/foundation/aws/errors"
|
||||
"github.com/mulgadc/spinifex/spinifex/gateway/bodyscope"
|
||||
"github.com/mulgadc/spinifex/spinifex/ingress/aws/bodyscope"
|
||||
)
|
||||
|
||||
// The resource a policy check evaluates against when the request names nothing
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/mulgadc/spinifex/spinifex/foundation/aws/arn"
|
||||
"github.com/mulgadc/spinifex/spinifex/foundation/aws/errors"
|
||||
"github.com/mulgadc/spinifex/spinifex/gateway/bodyscope"
|
||||
"github.com/mulgadc/spinifex/spinifex/ingress/aws/bodyscope"
|
||||
"github.com/mulgadc/spinifex/spinifex/ingress/aws/query"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"slices"
|
||||
|
||||
"github.com/mulgadc/spinifex/spinifex/foundation/aws/errors"
|
||||
"github.com/mulgadc/spinifex/spinifex/gateway/bodyscope"
|
||||
"github.com/mulgadc/spinifex/spinifex/ingress/aws/bodyscope"
|
||||
)
|
||||
|
||||
// The resource a policy check evaluates against when the request names nothing
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"maps"
|
||||
"slices"
|
||||
|
||||
"github.com/mulgadc/spinifex/spinifex/ingress/aws/query"
|
||||
"github.com/mulgadc/spinifex/spinifex/foundation/aws/errors"
|
||||
"github.com/mulgadc/spinifex/spinifex/gateway/bodyscope"
|
||||
handlers_ecs "github.com/mulgadc/spinifex/spinifex/handlers/ecs"
|
||||
"github.com/mulgadc/spinifex/spinifex/ingress/aws/bodyscope"
|
||||
"github.com/mulgadc/spinifex/spinifex/ingress/aws/query"
|
||||
)
|
||||
|
||||
// The resource a policy check evaluates against when the request names nothing
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
"github.com/aws/aws-sdk-go/service/eks"
|
||||
"github.com/mulgadc/spinifex/spinifex/foundation/aws/arn"
|
||||
"github.com/mulgadc/spinifex/spinifex/foundation/aws/errors"
|
||||
"github.com/mulgadc/spinifex/spinifex/gateway/bodyscope"
|
||||
handlers_eks "github.com/mulgadc/spinifex/spinifex/handlers/eks"
|
||||
"github.com/mulgadc/spinifex/spinifex/ingress/aws/bodyscope"
|
||||
)
|
||||
|
||||
// The resource a policy check evaluates against when the request names nothing
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// Package bodyscope reads the handful of identifier fields a policy scope
|
||||
// Package bodyscope reads the identifier fields an AWS ingress policy-scope
|
||||
// resolver needs out of a JSON request body, without deserialising the typed
|
||||
// input the handler will build from the same bytes.
|
||||
// input an action adapter will build from the same bytes.
|
||||
//
|
||||
// Two properties matter here. A type mismatch on an unrelated field cannot
|
||||
// poison the parse and silently widen the request to "*", because every field
|
||||
+1
-1
@@ -3,7 +3,7 @@ package bodyscope_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/mulgadc/spinifex/spinifex/gateway/bodyscope"
|
||||
"github.com/mulgadc/spinifex/spinifex/ingress/aws/bodyscope"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
+1
-1
@@ -7,7 +7,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/mulgadc/spinifex/spinifex/gateway/bodyscope"
|
||||
"github.com/mulgadc/spinifex/spinifex/ingress/aws/bodyscope"
|
||||
)
|
||||
|
||||
// A lookup is one identifier an authz resolver reads through bodyscope, paired
|
||||
Reference in New Issue
Block a user