Skip to content

Commit

Permalink
fix(k8s): always authenticate with latest service account token (back…
Browse files Browse the repository at this point in the history
…port #11399) (#12588)

## Motivation

Backport of #11399

Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
Co-authored-by: Mike Beaumont <mjboamail@gmail.com>
  • Loading branch information
bartsmykla and michaelbeaumont authored Jan 17, 2025
1 parent f15e788 commit 93cf348
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/config/dp-server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ type DpServerAuthnConfig struct {
// Configuration for zone proxy authentication.
ZoneProxy ZoneProxyAuthnConfig `json:"zoneProxy"`
// If true then Envoy uses Google gRPC instead of Envoy gRPC which lets a proxy reload the auth data (service account token, dp token etc.) from path without proxy restart.
// This is enabled on Kubernetes.
EnableReloadableTokens bool `json:"enableReloadableTokens" envconfig:"kuma_dp_server_authn_enable_reloadable_tokens"`
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/xds/bootstrap/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package bootstrap

import (
mesh_proto "github.com/kumahq/kuma/api/mesh/v1alpha1"
"github.com/kumahq/kuma/pkg/config/core/resources/store"
dp_server "github.com/kumahq/kuma/pkg/config/dp-server"
core_runtime "github.com/kumahq/kuma/pkg/core/runtime"
)
Expand All @@ -17,7 +18,7 @@ func RegisterBootstrap(rt core_runtime.Runtime) error {
string(mesh_proto.IngressProxyType): rt.Config().DpServer.Authn.ZoneProxy.Type != dp_server.DpServerAuthNone,
string(mesh_proto.EgressProxyType): rt.Config().DpServer.Authn.ZoneProxy.Type != dp_server.DpServerAuthNone,
},
rt.Config().DpServer.Authn.EnableReloadableTokens,
rt.Config().DpServer.Authn.EnableReloadableTokens || rt.Config().Store.Type == store.KubernetesStore,
rt.Config().DpServer.Hds.Enabled,
rt.Config().GetEnvoyAdminPort(),
)
Expand Down

0 comments on commit 93cf348

Please sign in to comment.