Skip to content

Commit f886ba6

Browse files
committed
proxy: Use source identity from L7 policy name
This commit is to use the source identity from L7 policy name if available, instead of the global source identity. Signed-off-by: Tam Mach <[email protected]>
1 parent e70c5e7 commit f886ba6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cilium/bpf_metadata.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,10 @@ Config::extractSocketMetadata(Network::ConnectionSocket& socket) {
472472

473473
// Resolve source identity for the Ingress address
474474
source_identity = resolvePolicyId(ingress_ip);
475+
if (!l7lb_policy_name_.empty()) {
476+
const auto* named_policy = &getPolicy(l7lb_policy_name_);
477+
source_identity = named_policy->getEndpointID();
478+
}
475479
if (source_identity == Cilium::ID::WORLD) {
476480
// No security ID available for the configured source IP
477481
ENVOY_LOG(warn,

0 commit comments

Comments
 (0)