Windows 8
Windows 8
Windows 8
Abstract
This paper provides information about wireless hotspots for Windows 8. It provides guidelines for hotspot operators to offer a tailored experience to Windows 8 users. It assumes that the reader is familiar with common hotspot practices, such as captive portals and the WISPr protocol. This information applies to the following operating systems: Windows 8 References and resources discussed here are listed at the end of this paper. The current version of this paper is maintained on the Web at: Windows 8 Integration for Wireless Hotspot Operators
Disclaimer: This document is provided as-is. Information and views expressed in this document, including URL and other Internet website references, may change without notice. Some information relates to prereleased product which may be substantially modified before its commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here. You bear the risk of using it. Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred. This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes. You may modify this document for your internal, reference purposes. 2012 Microsoft. All rights reserved.
Document History
Date September 28, 2012 August 15, 2012 June 27, 2012 May 31, 2012 Change Updated to reflect changes in branding Updated for Windows 8 RTM Updated information about Provisioning for Hotspot Authentication Updated information about provisioning for hotspot authentication, signing the provisioning file, handling large numbers of SSIDs, and getting started with a hotspot authentication app First publication
Contents
Introduction ................................................................................................................... 3 Hotspot Authentication Methods .................................................................................. 3 Captive Portals ........................................................................................................... 3 Consistent Connection Handling ........................................................................... 4 Touch-Friendly Web Pages .................................................................................... 4 Provisioning after Purchase ................................................................................... 4 Offer App Installation ............................................................................................ 4 WISPr Authentication ................................................................................................ 5 Provisioning for Hotspot Authentication............................................................... 6 Handling large numbers of SSIDs........................................................................... 7 Handling the Hotspot Authentication Event ......................................................... 9 Hotspot 2.0 .............................................................................................................. 11 Getting started with a Hotspot Authentication app .................................................... 11 Review the sample ................................................................................................... 11 Update the sample................................................................................................... 12 Verify background events ........................................................................................ 12 Resources ..................................................................................................................... 13
Introduction
Wi-Fi hotspots have proliferated in public areas such as airports, coffee shops, and hotels. Operators of such networks generally offer Internet access, either as a complimentary service to their clients funded by the venue owner or as a paid offering. Various methods have arisen to handle the need to authenticate to these networks. Open networks with captive portals (called the Universal Access Method in WISPr) are the common denominator, as they are accessible to users on any device equipped with a WLAN interface and a web browser. However, captive portal extensions (WISPr) and alternate authentication methods (Hotspot 2.0, EAP) offer opportunities to streamline the hotspot connection experience. This document addresses the interaction between a Wi-Fi hotspot operator, their app, and Windows 8. The actions described can be taken by a standard app downloaded from the Windows Store, or by an operator app installed by Windows to complement a mobile broadband device attached to the PC.
Windows 8 supports captive portal networks by immediately launching the web browser if a captive portal is detected. The user will see the operators branded web page in the foreground of their device, helping them understand what actions they should take to authenticate via the captive portal. Windows provides mechanisms which may enable users to bypass captive portals on subsequent attempts. However, the captive portal will always be the experience encountered by a first-time user. In order to offer these users the best possible experience, this section discusses a number of best practices for captive portals.
WISPr Authentication
A WISPr-capable hotspot includes a payload like the following in its captive portal page:
<HTML> <!-<?xml version=1.0 encoding=UTF-8?> <WISPAccessGatewayParam xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:noNamespaceSchemaLocation=http://www.acmewisp.com/WISPAccess GatewayParam.xsd> <Redirect> <AccessProcedure>1.0</AccessProcedure> <AccessLocation>Hotel Contoso Guest Network</AccessLocation> <LocationName>Hotel Contoso</LocationName> <LoginURL>https://captiveportal.com/login</LoginURL> <MessageType>100</MessageType> <ResponseCode>0</ResponseCode> </Redirect> </WISPAccessGatewayParam> --> </HTML>
This XML, contained in an HTML comment to avoid its display to customers, is interpreted by a smart client such as Windows to learn where the users credentials must be submitted. When a customer manually connects to a WISPr-capable network, they see the following prompt:
Customers who select No, I need to sign up are directed to the operators captive portal as usual. Customers who select Yes, Ill enter my user name and password are prompted for credentials as part of the Windows connection experience. These credentials are automatically provided to the operators website, and the user is connected after successfully authenticating.
It is also possible for an operators app to automatically supply credentials or replace the credentials prompt with a tailored purchase or authentication flow. This requires that the network support WISPr, and that the app be installed before the user connects to the network. If your network only offers WISPr to clients with certain UserAgent strings, the user will not see this prompt and cannot manually enter credentials. However, your app can still participate in WISPr authentication by including the appropriate UserAgent when creating the network profile.
The ExtensionId field contains the package family name of the app that will be used to generate hotspot credentials. The package family name is automatically generated by Visual Studio. To find the package family name for your application, open the package.appxmanifest file in your Visual Studio solution and go to the Packaging window.
After the provisioning file is processed, the app with the package family name YourAppIdGoesHere needs to register for the Hotspot Authentication event. It is required that the provisioning file is processed first in order to grant the specified app access to this event. An app can register a single handler for this event. The event registration remains valid as long as there is at least one profile that refers to the corresponding app.
Signing the Provisioning File
Because provisioning modifies system settings that persist after the user has exited or even uninstalled the app, a stricter measure of verification is required than for most APIs. This verification is provided by a combination of operator-specific hardware (the SIM), cryptographic signatures, and user confirmation. Table 1. Requirements for verification
SIM present? Yes, MB provider Yes, MB provider Source of provisioning Mobile operator app Operator web site Signature requirement None Certificate must: User confirmation requirement None None
Chain back to trusted root CA Be associated with mobile broadband hardware in APN database or experience metadata User prompted to confirm the first time the certificate is used; none thereafter
Certificate must:
If you are provisioning Windows to connect to several SSIDs, it is both possible and recommended to provide multiple SSIDs per profile. This greatly reduces the size of the provisioning file and improves the responsiveness of the PC. If you intend to use the APIs discussed later to mark a network that should no longer be used, these actions apply to all SSIDs covered by the same profile, so it is a best practice to group related SSIDs in a single profile. There is a maximum of ten profiles with 25 primary SSIDs each.
September 28, 2012 2012 Microsoft. All rights reserved.
Secondary SSIDs
If you need to configure more than 25 SSIDs per profile, you may specify secondary SSIDs for each profile in the SSIDConfig note of the HotspotAuth section. This does not create additional profiles for these networks, but will associate the Hotspot settings from this profile with that SSID. If the user connects manually in the future, creating a new profile, the hotspot settings from this profile are automatically associated with the user-created profile. Because secondary SSIDs will not autoconnect unless the user manually connects to them once, these should be less common networks that most users do not encounter. There is a maximum of 250 secondary SSIDs per profile.
Prefixes
If you need to associate with a particularly large or dynamic set of SSIDs, the secondary SSID list may contain prefixes as well as static SSIDs. This allows you to associate your app with a broad set of SSIDs that have four or more octets in common at the beginning of the SSID. Prefixes may be only secondary SSIDs, not primary. A best practice is to create primary SSIDs for the most common variants, then a secondary prefix to handle the less common cases. A prefix counts as a single secondary SSID, even though it applies to multiple networks. Table 2. SSIDs for profiles
Number of SSIDs 1 - 10 11 - 250 Type of profile Simple WLAN Profile WLAN Profile with multiple primary SSIDs Location of SSID list WLANProfile/SSIDConfig WLANProfile/SSIDConfig Comments None Group related SSIDs into each profile; app and user actions apply to all SSIDs in a profile Make frequentlyencountered SSIDs primary; less common SSIDs should be secondary
250 - 2750
Type of profile WLAN Profile with multiple primary SSIDs and secondary SSIDs including prefixes
Comments Put most common variants as primary SSIDs, even if secondary SSID prefixes also cover them.
Other APIs exist to retrieve: The BSSID of the wireless network (see the Windows.Networking.Connectivity namespace) DHCP parameters of the network (see Win32 and COM for Windows Store apps - Networking)
Using this information and any other information your app needs to obtain from the local system or the network, credentials can be generated. The object also contains methods that permit the app to continue or complete the hotspot authentication. Possible paths for the app are covered in the following sections.
Issuing Credentials
In the simplest case, the app generates credentials based on information it has or can retrieve. For example, a username and password are generated using information in the WISPr payload and information about the network adapter.
After performing any actions necessary to generate or obtain credentials, the app calls the IssueCredentials method on the HotspotAuthenticationContext object. This method permits the app to supply: The UserName WISPr parameter The Password WISPr parameter Arbitrary non-standard parameters to be included in the WISPr response Behavior on failure
In the event that the server rejects the credentials supplied by the application, Windows disconnects from the network and does not reattempt a connection in the current user session. The final flag allows the application to indicate that Windows should never automatically reattempt a connection using this profile if the credentials are unsuccessful.
Abort Authentication
If the app discovers that it cannot generate credentials for the current network (because roaming agreements have changed, information is unavailable, or for another reason), it must call the AbortAuthentication method on the HotspotAuthenticationContext object. Windows disconnects from the network and does not reattempt a connection in the current user session. This function accepts a flag that indicates Windows should never automatically reattempt a connection using this profile. Note that this does not remove the profile from the system, and the app may be asked for credentials again if the user manually attempts to connect to the network. If the profile is completely removed, the app must supply a new provisioning file that removes the associated profile.
Alternate Authentication Methods
If the app is able to authenticate using a method other than WISPr, it may do so. After successfully authenticating to the network using an alternate method, it must complete the connection by calling the SkipAuthentication method on the HotspotAuthenticationContext object. When this method is called, Windows redetects connectivity to the Internet, helping the UI correctly reflect the authenticated state as soon as possible. Note that the Hotspot Authentication event is not invoked for hotspots that do not advertise support for the WISPr protocol. However, this permits an app to choose a different protocol to use in response, or to use a custom version of WISPr if required.
Interacting with the User
In the event that user interaction is required before authentication can proceed, the app must call the TriggerAttentionRequired method on the HotspotAuthenticationContext object. This is useful in circumstances such as: The user has elected not to store credentials in the app and needs to sign in. Connecting will charge the users credit card or other account, and consent is required before proceeding.
This method does not complete the authentication. When this method is invoked, the app requests to be launched in the foreground with the specified arguments. The event token should be passed to the foreground application so that it can retrieve the HotspotAuthenticationContext object again and complete the authentication using one of the other three methods. The apps request to launch is not guaranteed to succeed. The Hotspot Authentication event may occur due to an automatic connection while the PC is in Connected Standby. The app is launched only when the PC is no longer in Connected Standby, has been unlocked, and is still connected to the wireless network. Because this delays Internet access until the user unlocks the PC, this state should be avoided whenever credentials can be generated automatically.
Hotspot 2.0
Hotspot 2.0 is a newer standard for seamless authentication to hotspots. Rather than the current industry practice of unencrypted hotspot networks, Hotspot 2.0 offers an encrypted connection between the client and the access point, using IEEE 802.11u to communicate with the provider prior to establishing a connection. Authentication and encryption are provided by using WPA2-Enterprise with one of several EAP methods. Windows does not support the discovery or online sign-up portions of Hotspot 2.0, but does support WPA2-Enterprise and all EAP methods required by the Hotspot 2.0 specification. Therefore, Windows 8 is capable of connecting to a Hotspot 2.0 network when the user already has credentials. These are the common credential types defined by Hotspot 2.0: Table 3. Hotspot 2.0 credential types Credential EAP method EAP User can Operator can method enter provision supported credentials credentials Username and EAP-TTLS Yes Yes No password Yes* Certificate EAP-TLS Yes No SIM EAP-SIM or Yes Yes* Yes EAP-AKA *User can select from certificates or SIMs already present on the system. Because Windows does not support 802.11u discovery, operators must provision Windows with wireless profiles containing the applicable SSIDs for their networks.
metadata. For an example using unsigned provisioning metadata with privilege APIs, see the Mobile Broadband Provisioning sample.
o o
present in the browsers redirect page and that it conforms to the WISPr specification. Is your app correctly associated with the profile? If so, the background event will fire. If not, the user will be prompted for credentials upon manually connecting to the network. Check that the application family name specified as the ExtensionId matches your application and that provisioning was successful.
Next, check that you are able to successfully handle authenticate to the network. In particular, you should cover the following cases: Successful authentication: In the ideal case, your app can provide credentials and connect the user to the network. User interaction: If you need to interact with the user in certain cases, ensure that your app launches to the correct context to perform the interaction, and not simply to you apps home page. Unsuccessful authentication: Particularly when using prefixes, you should handle the possibility that a network matches your prefix, but you are not able to generate credentials for it. In this case, you should abort authentication. Access denied: In certain cases, your app will receive the background event, but may not be able to retrieve the details of the authentication attempt. In this case, your background event should cleanly terminate as soon as possible.
Resources
Designing for Touch http://go.microsoft.com/fwlink/?LinkId=244250 Providing Mobile Broadband Metadata http://go.microsoft.com/fwlink/?linkid=242064