|
| 1 | +--- |
| 2 | +title: Enable end-to-end Transport Layer Security |
| 3 | +titleSuffix: Azure Spring Cloud |
| 4 | +description: How to enable end-to-end Transport Layer Security for an application. |
| 5 | +author: MikeDodaro |
| 6 | +ms.author: brendm |
| 7 | +ms.service: spring-cloud |
| 8 | +ms.topic: how-to |
| 9 | +ms.date: 03/24/2021 |
| 10 | +ms.custom: devx-track-java, devx-track-azurecli |
| 11 | +--- |
| 12 | + |
| 13 | +# How to enable end-to-end TLS for an application |
| 14 | + |
| 15 | +This topic shows you how to enable end-to-end SSL/TLS to secure traffic from an ingress controller to applications that support HTTPS. |
| 16 | +After you enable end-to-end TLS and load a cert from keyvault, all communications within Azure Spring Cloud are secured with TLS. |
| 17 | + |
| 18 | +  |
| 19 | + |
| 20 | +## Prerequisites |
| 21 | + |
| 22 | +- A deployed Azure Spring Cloud instance. Follow our [quickstart on deploying via the Azure CLI](https://docs.microsoft.com/azure/spring-cloud/spring-cloud-quickstart-launch-app-cli) to get started. |
| 23 | +- If you're unfamiliar with end-to-end TLS, see the [end-to-end TLS sample](https://github.com/Azure-Samples/spring-boot-secure-communications-using-end-to-end-tls-ssl). |
| 24 | +- To securely load the required certificates into Spring Boot apps, you can use [keyvault spring boot starter](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-starter-keyvault-certificates). |
| 25 | + |
| 26 | + |
| 27 | +## Enable end-to-end TLS on an existing app |
| 28 | + |
| 29 | +Use the command `az spring-cloud app update --enable-end-to-end-tls` to enable or disable end-to-end TLS for an app. |
| 30 | + |
| 31 | +```azurecli |
| 32 | +az spring-cloud app update --enable-end-to-end-tls -n app_name -s service_name -g resource_group_name |
| 33 | +az spring-cloud app update --enable-end-to-end-tls false -n app_name -s service_name -g resource_group_name |
| 34 | +``` |
| 35 | + |
| 36 | +## Enable end-to-end TLS when you bind custom domain |
| 37 | + |
| 38 | +Use the command `az spring-cloud app custom-domain update --enable-end-to-end-tls` or `az spring-cloud app custom-domain bind --enable-end-to-end-tls` to enable or disable end-to-end TLS for an app. |
| 39 | + |
| 40 | +```azurecli |
| 41 | +az spring-cloud app custom-domain update --enable-end-to-end-tls -n app_name -s service_name -g resource_group_name |
| 42 | +az spring-cloud app custom-domain bind --enable-end-to-end-tls -n app_name -s service_name -g resource_group_name |
| 43 | +``` |
| 44 | + |
| 45 | +## Verify end-to-end TLS status |
| 46 | + |
| 47 | +Use the command `az spring-cloud app show` to check the value of `enableEndToEndTls`. |
| 48 | +``` |
| 49 | +az spring-cloud app show -n app_name -s service_name -g resource_group_name |
| 50 | +``` |
| 51 | + |
| 52 | +## Next steps |
| 53 | +* [Access Config Server and Service Registry](how-to-access-data-plane-azure-ad-rbac.md) |
0 commit comments