From b4774a0c5dbb644e2fe68723faa99bd0e0f48767 Mon Sep 17 00:00:00 2001 From: Rene Krenn Date: Fri, 3 Oct 2025 09:28:04 +0200 Subject: [PATCH] MT#63678 customer-exporter: honor proxy.ignore_auth_realm location records were not exported with ignore_auth_realm = yes. the value is obtained now from config.yml. Change-Id: I3bb7ae5520ff636719db5635954562e0390b6c36 --- .../BulkProcessor/Redis/Trunk/location/usrdom.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/NGCP/BulkProcessor/Redis/Trunk/location/usrdom.pm b/lib/NGCP/BulkProcessor/Redis/Trunk/location/usrdom.pm index 792693f..4db51f0 100644 --- a/lib/NGCP/BulkProcessor/Redis/Trunk/location/usrdom.pm +++ b/lib/NGCP/BulkProcessor/Redis/Trunk/location/usrdom.pm @@ -3,6 +3,10 @@ use strict; ## no critic +use NGCP::BulkProcessor::Globals qw( + $config_yml_data +); + use NGCP::BulkProcessor::ConnectorPool qw( get_location_store destroy_stores @@ -18,6 +22,8 @@ use NGCP::BulkProcessor::NoSqlConnectors::RedisEntry qw( #use NGCP::BulkProcessor::Redis::Trunk::location::entry qw(); +use NGCP::BulkProcessor::Utils qw(stringtobool); + require Exporter; our @ISA = qw(Exporter NGCP::BulkProcessor::NoSqlConnectors::RedisEntry); our @EXPORT_OK = qw( @@ -33,7 +39,9 @@ my $type = $NGCP::BulkProcessor::NoSqlConnectors::RedisEntry::SET_TYPE; my $get_key = sub { my ($username,$domain) = @_; my $result = $table . '::' . $username; - $result .= ':' . $domain if $domain; + if (not $config_yml_data or stringtobool($config_yml_data->{proxy}->{ignore_auth_realm})) { + $result .= ':' . $domain if $domain; + } return $result; }; @@ -65,7 +73,7 @@ sub get_usrdom_by_username_domain { my ($username,$domain,$load_recursive) = @_; my $store = &$get_store(); - if ($username and $domain and my @res = $store->smembers(my $key = &$get_key($username,$domain))) { + if ($username and my @res = $store->smembers(my $key = &$get_key($username,$domain))) { return builditems_fromrows($key,\@res,$load_recursive); } return undef;