Skip to content

Commit f9ba2cd

Browse files
authored
Merge pull request #279667 from MicrosoftDocs/main
6/28/2024 PM Publish
2 parents b4e3ad4 + 70c6844 commit f9ba2cd

File tree

109 files changed

+2364
-2221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+2364
-2221
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"redirections": [
3+
{
4+
"source_path_from_root": "/articles/education-hub/custom-tenant-set-up-classroom.md",
5+
"redirect_url": "/articles/education-hub/about-education-hub.md",
6+
"redirect_document_id": false
7+
}
8+
]
9+
}

.openpublishing.redirection.virtual-desktop.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,11 @@
434434
"source_path_from_root": "/articles/virtual-desktop/configure-rdp-shortpath-limit-ports-public-networks.md",
435435
"redirect_url": "/azure/virtual-desktop/configure-rdp-shortpath",
436436
"redirect_document_id": true
437+
},
438+
{
439+
"source_path_from_root": "/articles/virtual-desktop/disaster-recovery.md",
440+
"redirect_url": "/azure/virtual-desktop/disaster-recovery-concepts",
441+
"redirect_document_id": true
437442
}
438443
]
439444
}

articles/aks/gpu-cluster.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,10 @@ To use Azure Linux, you specify the OS SKU by setting `os-sku` to `AzureLinux` d
177177
name: nvidia-device-plugin-ds
178178
spec:
179179
tolerations:
180-
- key: nvidia.com/gpu
181-
operator: Exists
182-
effect: NoSchedule
180+
- key: "sku"
181+
operator: "Equal"
182+
value: "gpu"
183+
effect: "NoSchedule"
183184
# Mark this pod as a critical add-on; when enabled, the critical add-on
184185
# scheduler reserves resources for critical add-on pods so that they can
185186
# be rescheduled after a failure.

articles/aks/private-clusters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Create a private cluster with default basic networking using the [`az aks create
5858
```azurecli-interactive
5959
az aks create \
6060
--name <private-cluster-name> \
61-
--resource-group-name <private-cluster-resource-group> \
61+
--resource-group <private-cluster-resource-group> \
6262
--load-balancer-sku standard \
6363
--enable-private-cluster \
6464
--generate-ssh-keys

articles/aks/use-trusted-launch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,6 @@ In this article, you learned how to enable trusted launch. Learn more about [tru
222222
[az-aks-nodepool-add]: /cli/azure/aks/nodepool#az-aks-nodepool-add
223223
[az-aks-nodepool-update]: /cli/azure/aks/nodepool#az-aks-nodepool-update
224224
[azure-generation-two-virtual-machines]: ../virtual-machines/generation-2.md
225-
[verify-secure-boot-failures]: ../virtual-machines/trusted-launch-faq.md#verifying-secure-boot-failures
225+
[verify-secure-boot-failures]: ../virtual-machines/trusted-launch-faq.md#verify-secure-boot-failures
226226
[tusted-launch-ephemeral-os-sizes]: ../virtual-machines/ephemeral-os-disks.md#trusted-launch-for-ephemeral-os-disks
227227
[skip-gpu-driver-install]: gpu-cluster.md#skip-gpu-driver-installation-preview

articles/app-service/app-service-web-configure-tls-mutual-auth.md

Lines changed: 147 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ author: msangapu-msft
66
ms.author: msangapu
77
ms.assetid: cd1d15d3-2d9e-4502-9f11-a306dac4453a
88
ms.topic: article
9-
ms.date: 12/11/2020
9+
ms.date: 06/21/2024
1010
ms.devlang: csharp
11-
ms.custom: devx-track-csharp, devx-track-extended-java, devx-track-js
11+
ms.custom: devx-track-csharp, devx-track-extended-java, devx-track-js, devx-track-python
1212
---
1313
# Configure TLS mutual authentication for Azure App Service
1414

@@ -36,7 +36,7 @@ az webapp update --set clientCertEnabled=true --name <app-name> --resource-group
3636
```
3737
### [Bicep](#tab/bicep)
3838

39-
For Bicep, modify the properties `clientCertEnabled`, `clientCertMode`, and `clientCertExclusionPaths`. A sampe Bicep snippet is provided for you:
39+
For Bicep, modify the properties `clientCertEnabled`, `clientCertMode`, and `clientCertExclusionPaths`. A sample Bicep snippet is provided for you:
4040

4141
```bicep
4242
resource appService 'Microsoft.Web/sites@2020-06-01' = {
@@ -57,7 +57,7 @@ resource appService 'Microsoft.Web/sites@2020-06-01' = {
5757

5858
### [ARM](#tab/arm)
5959

60-
For ARM templates, modify the properties `clientCertEnabled`, `clientCertMode`, and `clientCertExclusionPaths`. A sampe ARM template snippet is provided for you:
60+
For ARM templates, modify the properties `clientCertEnabled`, `clientCertMode`, and `clientCertExclusionPaths`. A sample ARM template snippet is provided for you:
6161

6262
```ARM
6363
{
@@ -438,4 +438,147 @@ public class ClientCertValidator {
438438
}
439439
```
440440

441+
## Python sample
442+
443+
The following Flask and Django Python code samples implement a decorator named `authorize_certificate` that can be used on a view function to permit access only to callers that present a valid client certificate. It expects a PEM formatted certificate in the `X-ARR-ClientCert` header and uses the Python [cryptography](https://pypi.org/project/cryptography/) package to validate the certificate based on its fingerprint (thumbprint), subject common name, issuer common name, and beginning and expiration dates. If validation fails, the decorator ensures that an HTTP response with status code 403 (Forbidden) is returned to the client.
444+
445+
### [Flask](#tab/flask)
446+
447+
```python
448+
from functools import wraps
449+
from datetime import datetime, timezone
450+
from flask import abort, request
451+
from cryptography import x509
452+
from cryptography.x509.oid import NameOID
453+
from cryptography.hazmat.primitives import hashes
454+
455+
456+
def validate_cert(request):
457+
458+
try:
459+
cert_value = request.headers.get('X-ARR-ClientCert')
460+
if cert_value is None:
461+
return False
462+
463+
cert_data = ''.join(['-----BEGIN CERTIFICATE-----\n', cert_value, '\n-----END CERTIFICATE-----\n',])
464+
cert = x509.load_pem_x509_certificate(cert_data.encode('utf-8'))
465+
466+
fingerprint = cert.fingerprint(hashes.SHA1())
467+
if fingerprint != b'12345678901234567890':
468+
return False
469+
470+
subject = cert.subject
471+
subject_cn = subject.get_attributes_for_oid(NameOID.COMMON_NAME)[0].value
472+
if subject_cn != "contoso.com":
473+
return False
474+
475+
issuer = cert.issuer
476+
issuer_cn = issuer.get_attributes_for_oid(NameOID.COMMON_NAME)[0].value
477+
if issuer_cn != "contoso.com":
478+
return False
479+
480+
current_time = datetime.now(timezone.utc)
481+
482+
if current_time < cert.not_valid_before_utc:
483+
return False
484+
485+
if current_time > cert.not_valid_after_utc:
486+
return False
487+
488+
return True
489+
490+
except Exception as e:
491+
# Handle any errors encountered during validation
492+
print(f"Encountered the following error during certificate validation: {e}")
493+
return False
494+
495+
def authorize_certificate(f):
496+
@wraps(f)
497+
def decorated_function(*args, **kwargs):
498+
if not validate_cert(request):
499+
abort(403)
500+
return f(*args, **kwargs)
501+
return decorated_function
502+
```
503+
504+
The following code snippet shows how to use the decorator on a Flask view function.
505+
506+
```python
507+
@app.route('/hellocert')
508+
@authorize_certificate
509+
def hellocert():
510+
print('Request for hellocert page received')
511+
return render_template('index.html')
512+
```
513+
514+
### [Django](#tab/django)
515+
516+
```python
517+
from functools import wraps
518+
from datetime import datetime, timezone
519+
from django.core.exceptions import PermissionDenied
520+
from cryptography import x509
521+
from cryptography.x509.oid import NameOID
522+
from cryptography.hazmat.primitives import hashes
523+
524+
525+
def validate_cert(request):
526+
527+
try:
528+
cert_value = request.headers.get('X-ARR-ClientCert')
529+
if cert_value is None:
530+
return False
531+
532+
cert_data = ''.join(['-----BEGIN CERTIFICATE-----\n', cert_value, '\n-----END CERTIFICATE-----\n',])
533+
cert = x509.load_pem_x509_certificate(cert_data.encode('utf-8'))
534+
535+
fingerprint = cert.fingerprint(hashes.SHA1())
536+
if fingerprint != b'12345678901234567890':
537+
return False
538+
539+
subject = cert.subject
540+
subject_cn = subject.get_attributes_for_oid(NameOID.COMMON_NAME)[0].value
541+
if subject_cn != "contoso.com":
542+
return False
543+
544+
issuer = cert.issuer
545+
issuer_cn = issuer.get_attributes_for_oid(NameOID.COMMON_NAME)[0].value
546+
if issuer_cn != "contoso.com":
547+
return False
548+
549+
current_time = datetime.now(timezone.utc)
550+
551+
if current_time < cert.not_valid_before_utc:
552+
return False
553+
554+
if current_time > cert.not_valid_after_utc:
555+
return False
556+
557+
return True
558+
559+
except Exception as e:
560+
# Handle any errors encountered during validation
561+
print(f"Encountered the following error during certificate validation: {e}")
562+
return False
563+
564+
def authorize_certificate(view):
565+
@wraps(view)
566+
def _wrapped_view(request, *args, **kwargs):
567+
if not validate_cert(request):
568+
raise PermissionDenied
569+
return view(request, *args, **kwargs)
570+
return _wrapped_view
571+
```
572+
573+
The following code snippet shows how to use the decorator on a Django view function.
574+
575+
```python
576+
@authorize_certificate
577+
def hellocert(request):
578+
print('Request for hellocert page received')
579+
return render(request, 'hello_azure/index.html')
580+
```
581+
582+
---
583+
441584
[exclusion-paths]: ./media/app-service-web-configure-tls-mutual-auth/exclusion-paths.png

articles/app-service/environment/side-by-side-migrate.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to migrate your App Service Environment v2 to App Service
44
author: seligj95
55
ms.topic: tutorial
66
ms.custom: devx-track-azurecli, references_regions
7-
ms.date: 6/26/2024
7+
ms.date: 6/28/2024
88
ms.author: jordanselig
99
---
1010
# Migration to App Service Environment v3 using the side-by-side migration feature
@@ -17,7 +17,7 @@ ms.author: jordanselig
1717
1818
App Service can automate migration of your App Service Environment v1 and v2 to an [App Service Environment v3](overview.md). There are different migration options. Review the [migration path decision tree](upgrade-to-asev3.md#migration-path-decision-tree) to decide which option is best for your use case. App Service Environment v3 provides [advantages and feature differences](overview.md#feature-differences) over earlier versions. Make sure to review the [supported features](overview.md#feature-differences) of App Service Environment v3 before migrating to reduce the risk of an unexpected application issue.
1919

20-
The side-by-side migration feature automates your migration to App Service Environment v3. The side-by-side migration feature creates a new App Service Environment v3 with all of your apps in a different subnet. Your existing App Service Environment isn't deleted until you initiate its deletion at the end of the migration process. Because of this process, there's a rollback option if you need to cancel your migration. This migration option is best for customers who want to migrate to App Service Environment v3 with zero downtime and can support using a different subnet for their new environment. If you need to use the same subnet and can support about one hour of application downtime, see the [in-place migration feature](migrate.md). For manual migration options that allow you to migrate at your own pace, see [manual migration options](migration-alternatives.md).
20+
The side-by-side migration feature automates your migration to App Service Environment v3. The side-by-side migration feature creates a new App Service Environment v3 with all of your apps in a different subnet. Your existing App Service Environment isn't deleted until you initiate its deletion at the end of the migration process. This migration option is best for customers who want to migrate to App Service Environment v3 with zero downtime and can support using a different subnet for their new environment. If you need to use the same subnet and can support about one hour of application downtime, see the [in-place migration feature](migrate.md). For manual migration options that allow you to migrate at your own pace, see [manual migration options](migration-alternatives.md).
2121

2222
> [!IMPORTANT]
2323
> If you fail to complete all steps described in this tutorial, you'll experience downtime. For example, if you don't update all dependent resources with the new IP addresses or you don't allow access to/from your new subnet, such as the case for your custom domain suffix key vault, you'll experience downtime until that's addressed.
@@ -215,7 +215,7 @@ Once you're ready to redirect traffic, you can complete the final step of the mi
215215
> You have 14 days to complete this step. If you don't complete this step in 14 days, your migration is automatically reverted back to an App Service Environment v2. If you need more than 14 days to complete this step, contact support.
216216
>
217217
218-
If you discover any issues with your new App Service Environment v3, don't run the command to redirect customer traffic. This command also initiates the deletion of your App Service Environment v2. If you find an issue, you can revert all changes and return to your old App Service Environment v2. The revert process takes 3 to 6 hours to complete. Once the revert process completes, your old App Service Environment is back online and your new App Service Environment v3 is deleted. You can then attempt the migration again once you resolve any issues.
218+
If you discover any issues with your new App Service Environment v3, don't run the command to redirect customer traffic. This command also initiates the deletion of your App Service Environment v2. If you find an issue, contact support.
219219

220220
## Use the side-by-side migration feature
221221

@@ -445,7 +445,7 @@ This step is your opportunity to test and validate your new App Service Environm
445445

446446
Once you confirm your apps are working as expected, you can finalize the migration by running the following command. This command also deletes your old environment. You have 14 days to complete this step. If you don't complete this step in 14 days, your migration is automatically reverted back to an App Service Environment v2. If you need more than 14 days to complete this step, contact support.
447447

448-
If you find any issues or decide at this point that you no longer want to proceed with the migration, contact support to revert the migration. Don't run the DNS change command if you need to revert the migration. For more information, see [Revert migration](#redirect-customer-traffic-validate-your-app-service-environment-v3-and-complete-migration).
448+
If you find any issues or decide at this point that you no longer want to proceed with the migration, contact support to discuss your options. Don't run the DNS change command since that command completes the migration.
449449

450450
```azurecli
451451
az rest --method post --uri "${ASE_ID}/NoDowntimeMigrate?phase=DnsChange&api-version=2022-03-01"
@@ -494,7 +494,7 @@ The App Service plan SKUs available for App Service Environment v3 run on the Is
494494
- **What properties of my App Service Environment will change?**
495495
You're on App Service Environment v3 so be sure to review the [features and feature differences](overview.md#feature-differences) compared to previous versions. Both your inbound and outbound IPs change when using the side-by-side migration feature. Note for ELB App Service Environment, previously there was a single IP for both inbound and outbound. For App Service Environment v3, they're separate. For more information, see [App Service Environment v3 networking](networking.md#addresses). For a full comparison of the App Service Environment versions, see [App Service Environment version comparison](version-comparison.md).
496496
- **What happens if migration fails or there is an unexpected issue during the migration?**
497-
If there's an unexpected issue, support teams are on hand. We recommend that you migrate dev environments before touching any production environments to learn about the migration process and see how it impacts your workloads. With the side-by-side migration feature, you can revert all changes if there's any issues.
497+
If there's an unexpected issue, support teams are on hand. We recommend that you migrate dev environments before touching any production environments to learn about the migration process and see how it impacts your workloads.
498498
- **What happens to my old App Service Environment?**
499499
If you decide to migrate an App Service Environment using the side-by-side migration feature, your old environment is used up until the final step in the migration process. Once you complete the final step, the old environment and all of the apps hosted on it get shutdown and deleted. Your old environment is no longer accessible. A revert to the old environment at this point isn't possible.
500500
- **What will happen to my App Service Environment v1/v2 resources after 31 August 2024?**

articles/azure-cache-for-redis/cache-best-practices-client-libraries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Although we don't own or support any client libraries, we do recommend some libr
2828
| ioredis | Node.js | [Link](https://github.com/luin/ioredis) | [More information here](https://ioredis.readthedocs.io/en/stable/API/) |
2929

3030
> [!NOTE]
31-
> Your application can to connect and use your Azure Cache for Redis instance with any client library that can also communicate with open-source Redis.
31+
> Your application can use any client library that is compatible with open-source Redis to connect to your Azure Cache for Redis instance.
3232
3333
## Client library-specific guidance
3434

articles/azure-cache-for-redis/cache-troubleshoot-timeouts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ There are several changes you can make to mitigate high server load:
145145

146146
- Investigate what is causing high server load such as [long-running commands](#long-running-commands), noted in this article, because of high memory pressure.
147147
- [Scale](cache-how-to-scale.md) out to more shards to distribute load across multiple Redis processes or scale up to a larger cache size with more CPU cores. For more information, see [Azure Cache for Redis planning FAQs](./cache-planning-faq.yml).
148-
- If your production workload on a _C1_ cache is negatively affected by extra latency from virus scanning, you can reduce the effect by to pay for a higher tier offering with multiple CPU cores, such as _C2_.
148+
- If your production workload on a _C1_ cache is negatively affected by extra latency from some internal defender scan runs, you can reduce the effect by scaling to a higher tier offering with multiple CPU cores, such as _C2_.
149149

150150
#### Spikes in server load
151151

152-
On _C0_ and _C1_ caches, you might see short spikes in server load not caused by an increase in requests a couple times a day while virus scanning is running on the VMs. You see higher latency for requests while virus scanning is happening on these tiers. Caches on the _C0_ and _C1_ tiers only have a single core to multitask, dividing the work of serving virus scanning and Redis requests.
152+
On _C0_ and _C1_ caches, you might see short spikes in server load not caused by an increase in requests a couple times a day while internal defender scanning is running on the VMs. You see higher latency for requests while internal defender scans happen on these tiers. Caches on the _C0_ and _C1_ tiers only have a single core to multitask, dividing the work of serving internal defender scanning and Redis requests.
153153

154154
### High memory usage
155155

0 commit comments

Comments
 (0)