You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/immersive-reader/how-to-store-user-preferences.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ This functionality may be used as an alternate means to storing **user preferenc
26
26
27
27
## How to enable storing user preferences
28
28
29
-
the Immersive Reader SDK [launchAsync](./reference.md#launchasync)`options` parameter contains the `-onPreferencesChanged` callback. This function will be called anytime the user changes their preferences. The `value` parameter contains a string, which represents the user's current preferences. This string is then stored, for that user, by the host application.
29
+
the Immersive Reader SDK [launchAsync](reference.md#function-launchasync)`options` parameter contains the `-onPreferencesChanged` callback. This function will be called anytime the user changes their preferences. The `value` parameter contains a string, which represents the user's current preferences. This string is then stored, for that user, by the host application.
|`token`| string | The Microsoft Entra authentication token. To learn more, see [How to create an Immersive Reader resource](how-to-create-immersive-reader.md). |
53
-
|`subdomain`| string | The custom subdomain of your [Immersive Reader resource](how-to-create-immersive-reader.md) in Azure. |
54
-
|`content`|[Content](#content)| An object that contains the content to be shown in the Immersive Reader. |
55
-
|`options`|[Options](#options)| Options for configuring certain behaviors of the Immersive Reader. Optional. |
52
+
| token | string | The Microsoft Entra authentication token. To learn more, see [How to create an Immersive Reader resource](how-to-create-immersive-reader.md). |
53
+
| subdomain | string | The custom subdomain of your [Immersive Reader resource](how-to-create-immersive-reader.md) in Azure. |
54
+
| content |[Content](#content)| An object that contains the content to be shown in the Immersive Reader. |
55
+
| options |[Options](#options)| Options for configuring certain behaviors of the Immersive Reader. Optional. |
56
56
57
57
#### Returns
58
58
59
59
Returns a `Promise<LaunchResponse>`, which resolves when the Immersive Reader is loaded. The `Promise` resolves to a [LaunchResponse](#launchresponse) object.
60
60
61
61
#### Exceptions
62
62
63
-
The returned `Promise` is rejected with an [Error](#error) object if the Immersive Reader fails to load.
63
+
If the Immersive Reader fails to load, the returned `Promise` is rejected with an [Error](#error) object.
|`options`|[renderButtons options](#renderbuttons-options)| Options for configuring certain behaviors of the renderButtons function. Optional. |
98
+
| options |[renderButtons options](#renderbuttons-options)| Options for configuring certain behaviors of the renderButtons function. Optional. |
99
99
100
100
#### renderButtons options
101
101
@@ -128,9 +128,9 @@ Use the following optional attributes to configure the look and feel of the butt
128
128
129
129
| Attribute | Description |
130
130
| --------- | ----------- |
131
-
|`data-button-style`| Sets the style of the button. Can be `icon`, `text`, or `iconAndText`. Defaults to `icon`. |
132
-
|`data-locale`| Sets the locale. For example, `en-US` or `fr-FR`. Defaults to English `en`. |
133
-
|`data-icon-px-size`| Sets the size of the icon in pixels. Defaults to 20 px. |
131
+
| data-button-style | Sets the style of the button. Can be `icon`, `text`, or `iconAndText`. Defaults to `icon`. |
132
+
| data-locale | Sets the locale. For example, `en-US` or `fr-FR`. Defaults to English `en`. |
133
+
| data-icon-px-size | Sets the size of the icon in pixels. Defaults to 20 px. |
134
134
135
135
## LaunchResponse
136
136
@@ -332,16 +332,15 @@ Default value: null
332
332
```
333
333
334
334
##### `preferences`
335
-
336
-
> [!CAUTION]
337
-
> Don't attempt to programmatically change the values of the `-preferences` string sent to and from the Immersive Reader application because this might cause unexpected behavior resulting in a degraded user experience. Host applications should never assign a custom value to or manipulate the `-preferences` string. When using the `-preferences` string option, use only the exact value that was returned from the `-onPreferencesChanged` callback option.
338
-
339
335
```Parameters
340
336
Type: String
341
337
Required: false
342
338
Default value: null
343
339
```
344
340
341
+
> [!CAUTION]
342
+
> Don't attempt to programmatically change the values of the `-preferences` string sent to and from the Immersive Reader application because this might cause unexpected behavior resulting in a degraded user experience. Host applications should never assign a custom value to or manipulate the `-preferences` string. When using the `-preferences` string option, use only the exact value that was returned from the `-onPreferencesChanged` callback option.
343
+
345
344
##### `onPreferencesChanged`
346
345
```Parameters
347
346
Type: Function
@@ -372,6 +371,9 @@ type ReadAloudOptions = {
372
371
| speed | Number | Playback speed. Must be between 0.5 and 2.5, inclusive. |
373
372
| autoPlay | Boolean | Automatically start Read Aloud when the Immersive Reader loads. |
374
373
374
+
> [!NOTE]
375
+
> Due to browser limitations, autoplay is not supported in Safari.
Copy file name to clipboardExpand all lines: articles/ai-services/immersive-reader/security-how-to-update-role-assignment.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,27 +15,27 @@ ms.author: sharmas
15
15
16
16
# Security advisory: Update role assignment for Microsoft Entra authentication
17
17
18
-
A security bug was discovered with Immersive Reader Microsoft Entra authentication configuration. We advise that you change the permissions on your Immersive Reader resources.
18
+
A security bug was discovered that affects Microsoft Entra authentication for Immersive Reader. We advise that you change the permissions on your Immersive Reader resources.
19
19
20
20
## Background
21
21
22
-
A security bug was discovered that relates to Microsoft Entra authentication for Immersive Reader. When initially creating your Immersive Reader resources and configuring them for Microsoft Entra authentication, it's necessary to grant permissions for the Microsoft Entra application identity to access your Immersive Reader resource. This is known as a *role assignment*. The Azure role that was previously used for permissions was the [Cognitive Services User](../../role-based-access-control/built-in-roles.md#cognitive-services-user) role.
22
+
When you initially create your Immersive Reader resources and configure them for Microsoft Entra authentication, it's necessary to grant permissions for the Microsoft Entra application identity to access your Immersive Reader resource. This is known as a *role assignment*. The Azure role that was previously used for permissions was the [Cognitive Services User](../../role-based-access-control/built-in-roles.md#cognitive-services-user) role.
23
23
24
-
During a security audit, it was discovered that this Cognitive Services User role has permissions to [list keys](/rest/api/cognitiveservices/accountmanagement/accounts/list-keys). This is slightly concerning because Immersive Reader integrations involve the use of this Microsoft Entra access token in client web apps and browsers, and if the access token were stolen by a bad actor or attacker, there's a concern that this access token could be used to `list keys` of your Immersive Reader resource. If an attacker could `list keys` for your resource, then they would obtain the `Subscription Key` for your resource. The `Subscription Key` for your resource is used as an authentication mechanism and is considered a secret. If an attacker had the resource's `Subscription Key`, it would allow them to make valid and authenticated API calls to your Immersive Reader resource endpoint, which could lead to Denial of Service due to the increased usage and throttling on your endpoint. It would also allow unauthorized use of your Immersive Reader resource, which would lead to increased charges on your bill.
24
+
During a security audit, it was discovered that this Cognitive Services User role has permissions to [list keys](/rest/api/cognitiveservices/accountmanagement/accounts/list-keys). This is slightly concerning because Immersive Reader integrations involve the use of this Microsoft Entra access token in client web apps and browsers. If the access token were stolen by a bad actor or attacker, there's a concern that this access token could be used to `list keys` for your Immersive Reader resource. If an attacker could `list keys` for your resource, then they would obtain the `Subscription Key` for your resource. The `Subscription Key` for your resource is used as an authentication mechanism and is considered a secret. If an attacker had the resource's `Subscription Key`, it would allow them to make valid and authenticated API calls to your Immersive Reader resource endpoint, which could lead to Denial of Service due to the increased usage and throttling on your endpoint. It would also allow unauthorized use of your Immersive Reader resource, which would lead to increased charges on your bill.
25
25
26
-
In practice however, this attack or exploit isn't likely to occur or might not even be possible. For Immersive Reader scenarios, customers obtain Microsoft Entra access tokens with an audience of `https://cognitiveservices.azure.com`. In order to successfully `list keys` for your resource, the Microsoft Entra access token would need to have an audience of `https://management.azure.com`. Generally speaking, this isn't much of a concern, since the access tokens used for Immersive Reader scenarios wouldn't work to `list keys`, as they don't have the required audience. In order to change the audience on the access token, an attacker would have to hijack the token acquisition code and change the audience before the call is made to Microsoft Entra ID to acquire the token. Again, this isn't likely to be exploited because, as an Immersive Reader authentication best practice, we advise that customers create Microsoft Entra access tokens on the web application backend, not in the client or browser. In those cases, since the token acquisition happens on the backend service, it's not as likely or perhaps even possible that attacker could compromise that process and change the audience.
26
+
In practice, however, this attack or exploit isn't likely to occur or might not even be possible. For Immersive Reader scenarios, customers obtain Microsoft Entra access tokens with an audience of `https://cognitiveservices.azure.com`. In order to successfully `list keys` for your resource, the Microsoft Entra access token would need to have an audience of `https://management.azure.com`. Generally speaking, this isn't much of a concern, since the access tokens used for Immersive Reader scenarios wouldn't work to `list keys`, as they don't have the required audience. In order to change the audience on the access token, an attacker would have to hijack the token acquisition code and change the audience before the call is made to Microsoft Entra ID to acquire the token. Again, this isn't likely to be exploited because, as an Immersive Reader authentication best practice, we advise that customers create Microsoft Entra access tokens on the web application backend, not in the client or browser. In those cases, since the token acquisition happens on the backend service, it's not as likely or perhaps even possible that an attacker could compromise that process and change the audience.
27
27
28
28
The real concern comes when or if any customer were to acquire tokens from Microsoft Entra ID directly in client code. We strongly advise against this, but since customers are free to implement as they see fit, it's possible that some customers are doing this.
29
29
30
-
To mitigate the concerns about any possibility of using the Microsoft Entra access token to `list keys`, we created a new built-in Azure role called `Cognitive Services Immersive Reader User` that doesn't have the permissions to `list keys`. This new role isn't a shared role for the Azure AI services platform like `Cognitive Services User` role is. This new role is specific to Immersive Reader and will only allow calls to Immersive Reader APIs.
30
+
To mitigate the concerns about any possibility of using the Microsoft Entra access token to `list keys`, we created a new built-in Azure role called `Cognitive Services Immersive Reader User` that doesn't have the permissions to `list keys`. This new role isn't a shared role for the Azure AI services platform like `Cognitive Services User` role is. This new role is specific to Immersive Reader and only allows calls to Immersive Reader APIs.
31
31
32
32
We advise ALL customers to use the new `Cognitive Services Immersive Reader User` role instead of the original `Cognitive Services User` role. We have provided a script below that you can run on each of your resources to switch over the role assignment permissions.
33
33
34
34
This recommendation applies to ALL customers, to ensure that this vulnerability is patched for everyone, no matter what the implementation scenario or likelihood of attack.
35
35
36
36
If you do NOT do this, nothing will break. The old role will continue to function. The security impact for most customers is minimal. However, we advise that you migrate to the new role to mitigate the security concerns discussed. Applying this update is a security advisory recommendation; it's not a mandate.
37
37
38
-
Any new Immersive Reader resources you create with our script at [How to: Create an Immersive Reader resource](./how-to-create-immersive-reader.md) automatically uses the new role.
38
+
Any new Immersive Reader resources you create with our script at [How to: Create an Immersive Reader resource](./how-to-create-immersive-reader.md) automatically use the new role.
39
39
40
40
## Update role and rotate your subscription keys
41
41
@@ -135,7 +135,7 @@ You can rotate the subscription keys in the [Azure portal](https://portal.azure.
135
135
| Parameter | Comments |
136
136
| --- | --- |
137
137
| SubscriptionName |The name of your Azure subscription. |
138
-
| ResourceGroupName |The name of the Resource Group that contains your Immersive Reader resource. |
138
+
| ResourceGroupName |The name of the resource group that contains your Immersive Reader resource. |
139
139
| ResourceName |The name of your Immersive Reader resource. |
140
140
| AADAppIdentifierUri |The URI for your Microsoft Entra app. |
0 commit comments