We are using ServiceBus v2.7 and AccessControlExtensions v1.0
Given 2 namespaces named like this ["customxyzns", "customxyzns2"], if you call NamespaceAccessControl.GetAccessControlList() using the first, it resolves the second one and errors out. Here is an example stack trace with namespaces
updated to match.
System.Data.Services.Client.DataServiceClientException: ACS50010: Validation of Audience URI(s) 'https://customxyzns-sb.accesscontrol.windows.net/v2/mgmt/service/' failed. No match was found with allowed audience(s) 'https://customxyzns2-sb.accesscontrol.windows.net/v2/mgmt/service'. at System.Data.Services.Client.DataServiceRequest.Execute[TElement](System.Data.Services.Client.DataServiceContext, System.Data.Services.Client.QueryComponents) at System.Data.Services.Client.DataServiceQuery`1.Execute() at System.Data.Services.Client.DataServiceQuery`1.GetEnumerator() at System.Linq.Enumerable.FirstOrDefault[TSource](System.Collections.Generic.IEnumerable`1[TSource]) at System.Data.Services.Client.DataServiceQueryProvider.ReturnSingleton[TElement](System.Linq.Expressions.Expression) at System.Linq.Queryable.FirstOrDefault[TSource](System.Linq.IQueryable`1[TSource]) at Microsoft.ServiceBus.AccessControlExtensions.NamespaceAccessControl.GetLongestPrefixRelyingPartyAddress(Microsoft.ServiceBus.AccessControlExtensions.AccessControlManagement.ManagementService, System.String) in c:\DEV\Git\Stackify\ThirdParty\Microsoft.ServiceBus.AccessControlExtensions\Microsoft.ServiceBus.AccessControlExtensions\NamespaceAccessControl.cs:line 53 at Microsoft.ServiceBus.AccessControlExtensions.NamespaceAccessControl.GetAccessControlList(System.Uri, Microsoft.ServiceBus.AccessControlExtensions.AccessControlSettings) in c:\DEV\Git\Stackify\ThirdParty\Microsoft.ServiceBus.AccessControlExtensions\Microsoft.ServiceBus.AccessControlExtensions\NamespaceAccessControl.cs:line 33 at Stackify.Core.Services.ServiceProvider.ClientServiceNamespaceService.EnsureQueueExists(Microsoft.ServiceBus.NamespaceManager, System.String, Stackify.Core.Entities.Azure.AzureServiceNamespace, Stackify.Core.Entities.Azure.AzureServiceNamespace) in c:\build-dir\PBW-PTWB1162-BA\Common\Stackify.Core.Services\ServiceProvider\ClientServiceNamespaceService.cs:line 304 at Stackify.Core.Services.ServiceProvider.ClientServiceNamespaceService.EnsureAgentAccess(Stackify.Core.Entities.Client.Device.ClientAgent) in c:\build-dir\PBW-PTWB1162-BA\Common\Stackify.Core.Services\ServiceProvider\ClientServiceNamespaceService.cs:line 218 at Stackify.Core.Services.ServiceProvider.ClientServiceNamespaceService.EnsureAllAgentAccess() in c:\build-dir\PBW-PTWB1162-BA\Common\Stackify.Core.Services\ServiceProvider\ClientServiceNamespaceService.cs:line 119 at WorkerRoleLib.GeneralTask.TaskRunner.Process(Microsoft.ServiceBus.Messaging.BrokeredMessage, System.Collections.Generic.Dictionary`2[System.String,System.String], System.Object) in c:\build-dir\PBW-PTWB1162-BA\StackifyWorkers\WorkerRoleLib\GeneralTask\TaskRunner.cs:line 331 at Knock.Objects.Workers.MessagePumpWorker`1+<>c__DisplayClass2.<receivemessage>b__1() in c:\build-dir\PBW-PTWB1162-BA\StackifyWorkers\Knock.Objects.Workers\MessagePumpWorker.cs:line 158 at StackifyLib.ProfileTracer.ExecInternalOperation(System.String, System.Action) at StackifyLib.ProfileTracer.Exec(System.Action) at Knock.Objects.Workers.MessagePumpWorker`1.ReceiveMessage(Microsoft.ServiceBus.Messaging.BrokeredMessage) in c:\build-dir\PBW-PTWB1162-BA\StackifyWorkers\Knock.Objects.Workers\MessagePumpWorker.cs:line 111 at Microsoft.ServiceBus.Messaging.MessageReceivePump+SyncCallbackAsyncResult.ExecuteSyncCallback(System.Object) at Microsoft.ServiceBus.Common.IOThreadScheduler+ScheduledOverlapped.IOCallback(UInt32, UInt32, System.Threading.NativeOverlapped*) at Microsoft.ServiceBus.Common.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*) at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*) --- End of inner exception stack trace --- at System.Data.Services.Client.QueryResult.Execute() at System.Data.Services.Client.DataServiceRequest.Execute[TElement](System.Data.Services.Client.DataServiceContext, System.Data.Services.Client.QueryComponents)</receivemessage>
Is there any insight on how to prevent this outside of changing the namespace names themselves so they aren't similar.
This seems to be an internal bug to the dlls.