Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetNamespaceInfo.ps1 example does not function when a Relay has a Private Endpoint #169

Open
RyanTBerry opened this issue Jan 19, 2024 · 2 comments

Comments

@RyanTBerry
Copy link

Actual Behavior

When using example script to obtain IPs for outbound whitelisting purposes: https://github.com/Azure/azure-relay-dotnet/blob/master/tools/GetNamespaceInfo.ps1, it does not function when using relays that have a private link.

  1. PowerShell Script Output:
    Namespace: arn-pf01tst1-PRD1

    Namespace : arn-pf01tst1-PRD1.servicebus.windows.net
    Deployment : ARN-PF01TST1-PRD1
    CloudServiceDNS : arn-pf01tst1-PRD1.privatelink.servicebus.windows.net
    CloudServiceVIP : 13.92.180.208
    GatewayDnsFormat : g{0}-arn-pf01tst1-prd1-sb.servicebus.windows.net

    Resolve-DnsName arn-pf01tst1-PRD1.privatelink.servicebus.windows.net -Type A

    Name Type TTL Section NameHost


    arn-pf01tst1-PRD1.privatelink. CNAME 30 Answer ns-sb2-prod-bl3-011.cloudapp.net
    servicebus.windows.net

    Name : ns-sb2-prod-bl3-011.cloudapp.net
    QueryType : A
    TTL : 45
    Section : Answer
    IP4Address : 13.92.180.208

  2. Issue is a result of a relay with a private link returning the privatelink FQDN as the name as shown above. It appears that this PowerShell script was authored before relay supported private links.

Expected Behavior

  1. Should return the list/block of public IP addresses used by the relay and work with or without privatelink enabled.

Versions

  • OS platform and version: All
  • NuGet package version or commit ID:
@jboeshart
Copy link

I added a couple updates to the proposed changes in RyanTBerry#1. I was still seeing issues resolving namespaces with private endpoints, this seems to make that work. Can we merge that in as well?

@jboeshart
Copy link

Looks like the Microsoft script has been updated and now handles the private link names properly, though it's only in the dev branch currently. This doesn't appear to be needed any longer with those fixes.

@jbjordan when do you anticipate that your changes will be merged into main?

58642cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants