diff --git a/go.mod b/go.mod index dc152fc11e2..06b0120d260 100644 --- a/go.mod +++ b/go.mod @@ -44,9 +44,9 @@ require ( k8s.io/apiserver v0.26.5 k8s.io/client-go v0.26.5 k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 - knative.dev/hack v0.0.0-20230922114927-da6e74ccb8e8 - knative.dev/hack/schema v0.0.0-20230922114927-da6e74ccb8e8 - knative.dev/pkg v0.0.0-20230922122916-05a411a3e26f + knative.dev/hack v0.0.0-20230925132200-74aa02a8beeb + knative.dev/hack/schema v0.0.0-20230925132200-74aa02a8beeb + knative.dev/pkg v0.0.0-20230925085724-0efc1bce35a9 knative.dev/reconciler-test v0.0.0-20230920080213-4b73d83f40fc sigs.k8s.io/yaml v1.3.0 ) diff --git a/go.sum b/go.sum index 00ec6bcecf8..bd25b52f61e 100644 --- a/go.sum +++ b/go.sum @@ -844,12 +844,12 @@ k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+O k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8= k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/hack v0.0.0-20230922114927-da6e74ccb8e8 h1:/+fz5u4W5CfgUKaWlLKqtxzOJttg5GF8pw8mLWrEWWg= -knative.dev/hack v0.0.0-20230922114927-da6e74ccb8e8/go.mod h1:WA6zi0u24QTDuFZUeqBwSerEh4Io8lxe6UmvolOzA24= -knative.dev/hack/schema v0.0.0-20230922114927-da6e74ccb8e8 h1:NjEw0Mz9mjvYMaQnh4urK9jzAP0YSQoO2E2rO32SN84= -knative.dev/hack/schema v0.0.0-20230922114927-da6e74ccb8e8/go.mod h1:3pWwBLnTZSM9psSgCAvhKOHIPTzqfEMlWRpDu6IYhK0= -knative.dev/pkg v0.0.0-20230922122916-05a411a3e26f h1:ljGTwmELtmwa9VQ1TKW6wYxmnQYfQ9RUE5qkkh2cZ/w= -knative.dev/pkg v0.0.0-20230922122916-05a411a3e26f/go.mod h1:gWKApiC/FE1WUfnxR2l9xg95awiRZrK7i6LmgErAoro= +knative.dev/hack v0.0.0-20230925132200-74aa02a8beeb h1:GYlj0vJBoye0mtCbgZddyMTXIzgSRihRruaCnCffBSI= +knative.dev/hack v0.0.0-20230925132200-74aa02a8beeb/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= +knative.dev/hack/schema v0.0.0-20230925132200-74aa02a8beeb h1:JMg//74X3XLDnQkUn+Pf+IpZSqhdPCf1arzhIf1gnk4= +knative.dev/hack/schema v0.0.0-20230925132200-74aa02a8beeb/go.mod h1:3pWwBLnTZSM9psSgCAvhKOHIPTzqfEMlWRpDu6IYhK0= +knative.dev/pkg v0.0.0-20230925085724-0efc1bce35a9 h1:0GZJ6ZTAkS59goRuMVc5t9vNMmegbggrB/A7pTm2USE= +knative.dev/pkg v0.0.0-20230925085724-0efc1bce35a9/go.mod h1:HagK8mQdSVdmm2xSYMpl4iCLjhxPoPJdY1/NuuEvAVw= knative.dev/reconciler-test v0.0.0-20230920080213-4b73d83f40fc h1:2pGUphOyniBD5nhJ/Xt6a72owZLZEpAfR3NXcTEGIu8= knative.dev/reconciler-test v0.0.0-20230920080213-4b73d83f40fc/go.mod h1:i+/PWK/n3HPgjXMoj5U7CA6WRW/C3c3EfHCQ0FmrhNM= pgregory.net/rapid v1.0.0 h1:iQaM2w5PZ6xvt6x7hbd7tiDS+nk7YPp5uCaEba+T/F4= diff --git a/vendor/knative.dev/hack/embed.go b/vendor/knative.dev/hack/embed.go index 4e39c21a30e..62f856ec68c 100644 --- a/vendor/knative.dev/hack/embed.go +++ b/vendor/knative.dev/hack/embed.go @@ -16,7 +16,9 @@ limitations under the License. package hack -import "embed" +import ( + "embed" +) //go:embed *.sh var Scripts embed.FS diff --git a/vendor/knative.dev/pkg/resolver/addressable_resolver.go b/vendor/knative.dev/pkg/resolver/addressable_resolver.go index c53a13d393d..bbbcb78b677 100644 --- a/vendor/knative.dev/pkg/resolver/addressable_resolver.go +++ b/vendor/knative.dev/pkg/resolver/addressable_resolver.go @@ -163,8 +163,9 @@ func (r *URIResolver) AddressableFromDestinationV1(ctx context.Context, dest duc return nil, fmt.Errorf("URI is not absolute (both scheme and host should be non-empty): %q", dest.URI.String()) } return &duckv1.Addressable{ - URL: dest.URI, - CACerts: dest.CACerts, + URL: dest.URI, + CACerts: dest.CACerts, + Audience: dest.Audience, }, nil } @@ -188,9 +189,10 @@ func (r *URIResolver) addressableFromDestinationRef(ctx context.Context, dest du handled, url, err := resolver(ctx, or) if handled { return &duckv1.Addressable{ - Name: dest.Ref.Address, - URL: url, - CACerts: dest.CACerts, + Name: dest.Ref.Address, + URL: url, + CACerts: dest.CACerts, + Audience: dest.Audience, }, err } @@ -229,9 +231,10 @@ func (r *URIResolver) addressableFromDestinationRef(ctx context.Context, dest du url.Scheme = "https" } return &duckv1.Addressable{ - Name: dest.Ref.Address, - URL: url, - CACerts: dest.CACerts, + Name: dest.Ref.Address, + URL: url, + CACerts: dest.CACerts, + Audience: dest.Audience, }, nil } @@ -258,6 +261,11 @@ func (r *URIResolver) addressableFromDestinationRef(ctx context.Context, dest du addr.CACerts = dest.CACerts } + if dest.Audience != nil && *dest.Audience != "" { + // destinations audience takes preference + addr.Audience = dest.Audience + } + return addr, nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index d30efc8fe73..79239c0e113 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1176,17 +1176,17 @@ k8s.io/utils/net k8s.io/utils/pointer k8s.io/utils/strings/slices k8s.io/utils/trace -# knative.dev/hack v0.0.0-20230922114927-da6e74ccb8e8 +# knative.dev/hack v0.0.0-20230925132200-74aa02a8beeb ## explicit; go 1.18 knative.dev/hack knative.dev/hack/shell -# knative.dev/hack/schema v0.0.0-20230922114927-da6e74ccb8e8 +# knative.dev/hack/schema v0.0.0-20230925132200-74aa02a8beeb ## explicit; go 1.18 knative.dev/hack/schema/commands knative.dev/hack/schema/docs knative.dev/hack/schema/registry knative.dev/hack/schema/schema -# knative.dev/pkg v0.0.0-20230922122916-05a411a3e26f +# knative.dev/pkg v0.0.0-20230925085724-0efc1bce35a9 ## explicit; go 1.18 knative.dev/pkg/apiextensions/storageversion knative.dev/pkg/apiextensions/storageversion/cmd/migrate