azure-spring-boot/azure-spring-boot-starters/azure-sqlserver-spring-boot...
weiping 70a23a5445 update snapshot version for 2.1.x (#536) 2019-01-21 22:48:32 -06:00
..
README.md add AlwaysEncrypted Starter (#420) 2018-10-09 09:39:31 +08:00
pom.xml update snapshot version for 2.1.x (#536) 2019-01-21 22:48:32 -06:00

README.md

Azure SQL DB AlwaysEncrypted Spring Boot Starter

Azure SQL DB Always Encrypted feature allows to encrypt data in SQL and store master keys in Azure KeyVault

Sample Code

Please refer to sample project here.

Quick Start

Add the dependency

azure-sqlserver-spring-boot-starter is published on Maven Central Repository. If you are using Maven, add the following dependency.

<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-sqlserver-spring-boot-starter</artifactId>
</dependency>

Add the property settings

Open application.properties file and add below properties with your SQL DB credentials.

spring.datasource.jdbc-url=jdbc:sqlserver://<server>.database.windows.net:1433;database=<db>;Encrypt=true;TrustServerCertificate=false;HostNameInCertificate=*.database.windows.net;loginTimeout=30
spring.datasource.username=
spring.datasource.password=

To enable always encryption set the following

 spring.datasource.always-encrypted=true
 spring.datasource.always-encrypted.keyvault.client-id=
 spring.datasource.always-encrypted.keyvault.client-secret=

Allow telemetry

Microsoft would like to collect data about how users use this Spring boot starter. Microsoft uses this information to improve our tooling experience. Participation is voluntary. If you don't want to participate, just simply disable it by setting below configuration in application.properties.

 spring.datasource.always-encrypted.keyvault.allow-telemetry=false

Find more information about Azure Service Privacy Statement, please check Microsoft Online Services Privacy Statement.