Skip to content

Commit 423315d

Browse files
authored
acrolinx and linking
1 parent 70fc13c commit 423315d

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

articles/iot-hub/authenticate-authorize-azure-ad.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ ms.custom: ['Role: Cloud Development', 'Role: IoT Device', 'Role: System Archite
1515

1616
You can use Azure Active Directory (Azure AD) to authenticate requests to Azure IoT Hub service APIs, like create device identity and invoke direct method. You can also use Azure role-based access control (Azure RBAC) to authorize those same service APIs. By using these technologies together, you can grant permissions to access IoT Hub service APIs to an Azure AD security principal. This security principal could be a user, group, or application service principal.
1717

18-
Authenticating access by using Azure AD and controlling permissions by using Azure RBAC provides improved security and ease of use over [security tokens](iot-hub-dev-guide-sas.md). To minimize potential security issues inherent in security tokens, we recommend that you [use Azure AD with your IoT hub whenever possible](#azure-ad-access-and-shared-access-policies).
18+
Authenticating access by using Azure AD and controlling permissions by using Azure RBAC provides improved security and ease of use over security tokens. To minimize potential security issues inherent in security tokens, we recommend that you [use Azure AD with your IoT hub whenever possible](#azure-ad-access-and-shared-access-policies).
1919

2020
> [!NOTE]
21-
> Authentication with Azure AD isn't supported for the IoT Hub *device APIs* (like device-to-cloud messages and update reported properties). Use [symmetric keys](iot-hub-dev-guide-sas.md#use-a-symmetric-key-in-the-identity-registry) or [X.509](iot-hub-x509ca-overview.md) to authenticate devices to IoT Hub.
21+
> Authentication with Azure AD isn't supported for the IoT Hub *device APIs* (like device-to-cloud messages and update reported properties). Use [symmetric keys](authenticate-authorize-sas.md) or [X.509](authenticate-authorize-x509.md) to authenticate devices to IoT Hub.
2222
2323
## Authentication and authorization
2424

25-
*Authentication* is the process of proving that you are who you say you are. This is achieved by verifying of the identity of a user or device to IoT Hub. It's sometimes shortened to *AuthN*. *Authorization* is the process of confirming permissions for an authenticated user or device on IoT Hub. It specifies what resources and commands you're allowed to access, and what you can do with those resources and commands. Authorization is sometimes shortened to *AuthZ*.
25+
*Authentication* is the process of proving that you are who you say you are. Authentication verifies the identity of a user or device to IoT Hub. It's sometimes shortened to *AuthN*. *Authorization* is the process of confirming permissions for an authenticated user or device on IoT Hub. It specifies what resources and commands you're allowed to access, and what you can do with those resources and commands. Authorization is sometimes shortened to *AuthZ*.
2626

2727
When an Azure AD security principal requests access to an IoT Hub service API, the principal's identity is first *authenticated*. For authentication, the request needs to contain an OAuth 2.0 access token at runtime. The resource name for requesting the token is `https://iothubs.azure.net`. If the application runs in an Azure resource like an Azure VM, Azure Functions app, or Azure App Service app, it can be represented as a [managed identity](../active-directory/managed-identities-azure-resources/how-managed-identities-work-vm.md).
2828

@@ -96,7 +96,7 @@ The following table describes the permissions available for IoT Hub service API
9696
9797
## Azure AD access and shared access policies
9898

99-
By default, IoT Hub supports service API access through both Azure AD and [shared access policies and security tokens](iot-hub-dev-guide-sas.md). To minimize potential security vulnerabilities inherent in security tokens, disable access with shared access policies.
99+
By default, IoT Hub supports service API access through both Azure AD and [shared access policies and security tokens](authenticate-authorize-sas.md). To minimize potential security vulnerabilities inherent in security tokens, disable access with shared access policies.
100100

101101
1. Ensure that your service clients and users have [sufficient access](#manage-access-to-iot-hub-by-using-azure-rbac-role-assignment) to your IoT hub. Follow the [principle of least privilege](../security/fundamentals/identity-management-best-practices.md).
102102
1. In the [Azure portal](https://portal.azure.com), go to your IoT hub.

articles/iot-hub/authenticate-authorize-sas.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.date: 09/01/2023
1010
ms.custom: ['Role: Cloud Development', 'Role: IoT Device', 'Role: System Architecture']
1111
---
1212

13-
# Controll access to IoT Hub with shared access signatures
13+
# Control access to IoT Hub with shared access signatures
1414

1515
IoT Hub uses shared access signature (SAS) tokens to authenticate devices and services to avoid sending keys on the wire. You use SAS tokens to grant time-bounded access to devices and services to specific functionality in IoT Hub. To get authorization to connect to IoT Hub, devices and services must send SAS tokens signed with either a shared access or symmetric key. Symmetric keys are stored with a device identity in the identity registry.
1616

@@ -27,7 +27,7 @@ IoT Hub uses *permissions* to grant access to each IoT hub endpoint. Permissions
2727

2828
## Authentication and authorization
2929

30-
*Authentication* is the process of proving that you are who you say you are. This is achieved by verifying of the identity of a user or device to IoT Hub. It's sometimes shortened to *AuthN*. *Authorization* is the process of confirming permissions for an authenticated user or device on IoT Hub. It specifies what resources and commands you're allowed to access, and what you can do with those resources and commands. Authorization is sometimes shortened to *AuthZ*.
30+
*Authentication* is the process of proving that you are who you say you are. Authentication verifies the identity of a user or device to IoT Hub. It's sometimes shortened to *AuthN*. *Authorization* is the process of confirming permissions for an authenticated user or device on IoT Hub. It specifies what resources and commands you're allowed to access, and what you can do with those resources and commands. Authorization is sometimes shortened to *AuthZ*.
3131

3232
This article describes authentication and authorization using **Shared access signatures**, which lets you group permissions and grant them to applications using access keys and signed security tokens. You can also use symmetric keys or shared access keys to authenticate a device with IoT Hub. SAS tokens provide authentication for each call made by the device to IoT Hub by associating the symmetric key to each call.
3333

@@ -64,7 +64,7 @@ You can use the following permissions to control access to your IoT hub:
6464
* The **RegistryRead** permission is used by back-end cloud services and grants the following access:
6565
* Read access to the identity registry. For more information, see [Identity registry](iot-hub-devguide-identity-registry.md).
6666

67-
* The **RegistryReadWrite** permission is used by back-end cloud services and grants the follwoing access:
67+
* The **RegistryReadWrite** permission is used by back-end cloud services and grants the following access:
6868
* Read and write access to the identity registry. For more information, see [Identity registry](iot-hub-devguide-identity-registry.md).
6969

7070
### Per-device security credentials
@@ -75,9 +75,9 @@ When you register a device to use SAS token authentication, that device gets two
7575

7676
## Use SAS tokens from services
7777

78-
Services can generate SAS tokens by using a shared access policy which defines the appropriate permissions as explained previously in the [Access control and permissions](#access-control-and-permissions) section.
78+
Services can generate SAS tokens by using a shared access policy that defines the appropriate permissions as explained previously in the [Access control and permissions](#access-control-and-permissions) section.
7979

80-
As an example, a service using the pre-created shared access policy called **registryRead** would create a token with the following parameters:
80+
As an example, a service using the precreated shared access policy called **registryRead** would create a token with the following parameters:
8181

8282
* resource URI: `{IoT hub name}.azure-devices.net`,
8383
* signing key: one of the keys of the `registryRead` policy,
@@ -100,7 +100,7 @@ The result, which grants access to read all device identities in the identity re
100100

101101
For more examples, see [Generate SAS tokens](#generate-sas-tokens).
102102

103-
For services, SAS tokens only grant permissions at the IoT Hub level. That is, a service authenticating with a token based on the **service** policy will be able to perform all the operations granted by the **ServiceConnect** permission. These operations include receiving device-to-cloud messages, sending cloud-to-device messages, and so on. If you want to grant more granular access to your services, for example, limiting a service to only sending cloud-to-device messages, you can use Azure Active Directory. To learn more, see [Authenticate with Azure AD](authenticate-azure-ad.md).
103+
For services, SAS tokens only grant permissions at the IoT Hub level. That is, a service authenticating with a token based on the **service** policy will be able to perform all the operations granted by the **ServiceConnect** permission. These operations include receiving device-to-cloud messages, sending cloud-to-device messages, and so on. If you want to grant more granular access to your services, for example, limiting a service to only sending cloud-to-device messages, you can use Azure Active Directory. To learn more, see [Authenticate with Azure AD](authenticate-authorize-azure-ad.md).
104104

105105
## Use SAS tokens from devices
106106

@@ -152,7 +152,7 @@ The two main scenarios for using shared access policies to access device functio
152152

153153
Since the shared access policy can potentially grant access to connect as any device, it is important to use the correct resource URI when creating SAS tokens. This setting is especially important for token services, which have to scope the token to a specific device using the resource URI. This point is less relevant for protocol gateways as they are already mediating traffic for all devices.
154154

155-
As an example, a token service using the pre-created shared access policy called **device** would create a token with the following parameters:
155+
As an example, a token service using the precreated shared access policy called **device** would create a token with the following parameters:
156156

157157
* resource URI: `{IoT hub name}.azure-devices.net/devices/{device id}`,
158158
* signing key: one of the keys of the `device` policy,
@@ -200,11 +200,11 @@ Here are the main steps of the token service pattern:
200200
201201
The token service can set the token expiration as desired. When the token expires, the IoT hub severs the device/module connection. Then, the device/module must request a new token from the token service. A short expiry time increases the load on both the device/module and the token service.
202202

203-
For a device/module to connect to your hub, you must still add it to the IoT Hub identity registryeven though it is using a token and not a key to connect. Therefore, you can continue to use per-device/per-module access control by enabling or disabling device/module identities in the identity registry. This approach mitigates the risks of using tokens with long expiry times.
203+
For a device/module to connect to your hub, you must still add it to the IoT Hub identity registryeven though it is using a token and not a key to connect. Therefore, you can continue to use per-device/per-module access control by enabling or disabling device/module identities in the identity registry. This approach mitigates the risks of using tokens with long expiry times.
204204

205205
### Comparison with a custom gateway
206206

207-
The token service pattern is the recommended way to implement a custom identity registry/authentication scheme with IoT Hub. This pattern is recommended because IoT Hub continues to handle most of the solution traffic. However, if the custom authentication scheme is so intertwined with the protocol, you may require a *custom gateway* to process all the traffic. An example of such a scenario is using [Transport Layer Security (TLS) and pre-shared keys (PSKs)](https://tools.ietf.org/html/rfc4279). For more information, see [How an IoT Edge device can be used as a gateway](../iot-edge/iot-edge-as-gateway.md).
207+
The token service pattern is the recommended way to implement a custom identity registry/authentication scheme with IoT Hub. This pattern is recommended because IoT Hub continues to handle most of the solution traffic. However, if the custom authentication scheme is so intertwined with the protocol, you may require a *custom gateway* to process all the traffic. An example of such a scenario is using [Transport Layer Security (TLS) and preshared keys (PSKs)](https://tools.ietf.org/html/rfc4279). For more information, see [How an IoT Edge device can be used as a gateway](../iot-edge/iot-edge-as-gateway.md).
208208

209209
## Generate SAS tokens
210210

@@ -234,7 +234,7 @@ Here are the expected values:
234234
| {URL-encoded-resourceURI} |Lower case URL-encoding of the lower case resource URI |
235235
| {policyName} |The name of the shared access policy to which this token refers. Absent if the token refers to device-registry credentials. |
236236

237-
The URI prefix is computed by segment and not by character. For example `/a/b` is a prefix for `/a/b/c` but not for `/a/bc`.
237+
The URI prefix is computed by segment and not by character. For example, `/a/b` is a prefix for `/a/b/c` but not for `/a/bc`.
238238

239239
### [Node.js](#tab/node)
240240

@@ -367,7 +367,7 @@ For SASL PLAIN, the **username** can be:
367367
* `{policyName}@sas.root.{iothubName}` if using IoT hub-level tokens.
368368
* `{deviceId}@sas.{iothubname}` if using device-scoped tokens.
369369

370-
In both cases, the password field contains the token, as described in [IoT Hub SAS tokens](iot-hub-dev-guide-sas.md#sas-tokens).
370+
In both cases, the password field contains the token, as described in [SAS token structure](#sas-token-structure).
371371

372372
HTTPS implements authentication by including a valid token in the **Authorization** request header.
373373

0 commit comments

Comments
 (0)