Azure VPN Gateway IKEv2 Certificate Authentication – User Group Selection Can Be Manipulated Through macOS Local ID

snapshot560 0 Reputation points
2026-11-07T12:49:49.54+00:00

Environment:

  • Azure VPN Gateway

Point-to-Site VPN

IKEv2

Certificate Authentication

macOS native IKEv2 VPN client

Issue Description:

We discovered unexpected behavior when using certificate-based IKEv2 authentication with Azure VPN Gateway User Groups.

The Azure VPN Gateway appears to select the User Group and corresponding IP address pool based on the Local ID (IKE IDi) provided by the macOS client, rather than strictly validating it against the client certificate's Common Name (CN).

Steps to Reproduce:

Configure two Azure VPN User Groups with different certificate identifiers and IP address pools.

Use the same client certificate and private key for all connection attempts.

Connect from macOS using IKEv2.

Change only the Local ID in the macOS VPN configuration:

******@abc.com

  `******@defg.com`
  
     `user1`
     
     Observe the IP address assigned by Azure VPN Gateway.
     

Actual Result:

The same client certificate can successfully connect using different Local IDs, and Azure assigns IP addresses from different User Group address pools based on the supplied Local ID.

Expected Result:

Azure should validate the IKEv2 identity against the authenticated client certificate and prevent a client from selecting a different User Group simply by changing the Local ID.

Questions:

Is this the expected behavior of Azure VPN Gateway's IKEv2 certificate authentication?

Which exact identity field is used to select the Azure VPN User Group: IKE IDi, certificate CN, or another field?

Is there a supported configuration to enforce strict binding between the IKEv2 Local ID and the authenticated client certificate?

Does this behavior represent a security vulnerability or a known limitation?

We would appreciate confirmation from the Azure VPN Gateway engineering team.Environment:

Azure VPN Gateway

Point-to-Site VPN

IKEv2

Certificate Authentication

macOS native IKEv2 VPN client

Issue Description:

We discovered unexpected behavior when using certificate-based IKEv2 authentication with Azure VPN Gateway User Groups.

The Azure VPN Gateway appears to select the User Group and corresponding IP address pool based on the Local ID (IKE IDi) provided by the macOS client, rather than strictly validating it against the client certificate's Common Name (CN).

Steps to Reproduce:

Configure two Azure VPN User Groups with different certificate identifiers and IP address pools.

Use the same client certificate and private key for all connection attempts.

Connect from macOS using IKEv2.

  1. Change only the Local ID in the macOS VPN configuration:
    • ******@test01.com
    user1 Observe the IP address assigned by Azure VPN Gateway.

Actual Result:

The same client certificate can successfully connect using different Local IDs, and Azure assigns IP addresses from different User Group address pools based on the supplied Local ID.vpn-01

vpn-02

vpn-03

vpn-04

Expected Result:

Azure should validate the IKEv2 identity against the authenticated client certificate and prevent a client from selecting a different User Group simply by changing the Local ID.

Questions:

Is this the expected behavior of Azure VPN Gateway's IKEv2 certificate authentication?

Which exact identity field is used to select the Azure VPN User Group: IKE IDi, certificate CN, or another field?

Is there a supported configuration to enforce strict binding between the IKEv2 Local ID and the authenticated client certificate?

Does this behavior represent a security vulnerability or a known limitation?

We would appreciate confirmation from the Azure VPN Gateway engineering team.

Azure VPN Gateway
Azure VPN Gateway

An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.

0 comments No comments

1 answer

Sort by: Oldest
  1. Vasileios Dionysopoulos 826 Reputation points
    2026-11-07T15:32:25.4766667+00:00

    Hello,

    What the documentation says

    For certificate authentication, Microsoft's About P2S user groups page states that the gateway uses "the domain name of user certificate Common Names (CN) to determine which group a connecting user is in". The member type is AzureCertificateID with values like red.com for CN=******@red.com. The CN must be in the form ******@domain.com or DOMAIN\username. Credentials that match no group go to the default group, and when several groups match, the lowest priority number wins.

    So, to your questions:

    1. Expected behavior? Not according to the documentation. Group selection is documented as based on the certificate CN, not on the IKE IDi the client sends. If the same certificate lands in different pools depending only on the macOS Local ID, that contradicts the documented behavior.
    2. Which field? Documented: the domain part of the certificate CN. Your test suggests that in practice the IKEv2 identity is used, or at least takes precedence. Only the VPN Gateway team can confirm that.
    3. Strict binding setting? I don't know of any setting that enforces IDi ↔ certificate binding for user groups. None is documented.
    4. Vulnerability or limitation? Neither I nor Q&A moderators can classify that. Since it can let a client pick its own address pool, and therefore any NSG or firewall rules keyed on that pool, report it to the Microsoft Security Response Center at https://msrc.microsoft.com/report rather than continuing the details here. MSRC has a defined process and response timeline for exactly this. Consider trimming the reproduction steps from this public post in the meantime.

    Checks that strengthen the report

    • The certificate's CN and SAN values, and the Local ID values you used. Does a Local ID whose domain matches no certificate field still get accepted?
    • The same certificate over OpenVPN with the Azure VPN Client, which has no user-editable IKE identity. If OpenVPN follows the CN and IKEv2 doesn't, the issue is specific to IKEv2 identity handling.
    • Whether Windows' native IKEv2 client shows the same behavior. It sends an identity derived from the certificate, which shows whether only clients that allow a custom identity are affected.

    Mitigations until there's an answer

    The documentation itself says user groups only select the IP address pool, and recommends pairing pools with firewall rules, NSGs or ACLs. With this behavior, though, pool-based rules can't serve as the security boundary:

    • Separate trust domains cryptographically: different P2S gateways, each trusting only the root CA for its user population. A certificate from one CA can't connect to the other gateway, whatever identity it claims.
    • Use Microsoft Entra ID authentication (OpenVPN + Azure VPN Client) for group-based access. Group membership then comes from the signed token, not from a client-supplied value. The Azure VPN Client is available for macOS.
    • Keep authorization on the resources themselves (identity-aware access, private endpoints with RBAC) rather than relying only on the source IP pool.

    References: About P2S user groups and IP address pools · Configure P2S user groups · Report a security issue to MSRC

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.