Skip to content

Commit 589bc07

Browse files
DOCSP-26307 FLE Java Automatically Generate Credentials with AzureVM (#2501)
* draft note change * managed identity notes * wording update * wording * clean up code * more wording * add to QE * chris feedback
1 parent 6cfb955 commit 589bc07

File tree

9 files changed

+110
-36
lines changed

9 files changed

+110
-36
lines changed

source/includes/queryable-encryption/tutorials/automatic/azure/client.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@
105105
:language: java
106106
:dedent:
107107

108+
.. include:: /includes/tutorials/automatic/azure/azure-vm-managed-identity.rst
109+
108110
.. tab::
109111
:tabid: go
110112

source/includes/queryable-encryption/tutorials/automatic/azure/dek.rst

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010

1111
.. include:: /includes/queryable-encryption/tab-note.rst
1212

13-
.. tip::
14-
15-
You recorded your {+azure-kv+} credentials in the
16-
in the :ref:`Register Your Applitcation with Azure <qe-tutorial-automatic-azure-register>`
17-
step of this guide.
18-
1913
.. tabs-drivers::
2014

2115
.. tab::
@@ -54,6 +48,8 @@
5448
:language: java
5549
:dedent:
5650

51+
.. include:: /includes/tutorials/automatic/azure/azure-vm-managed-identity.rst
52+
5753
.. tab::
5854
:tabid: go
5955

@@ -72,11 +68,6 @@
7268
:language: csharp
7369
:dedent:
7470

75-
.. tip:: Learn More
76-
77-
To learn more about the KMS provider object for {+azure-kv+}, see
78-
:ref:`qe-reference-kms-providers-azure`.
79-
8071
.. step:: Add Your Key Information
8172

8273
Update the following code to specify your {+cmk-long+}:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. important:: Record your Credentials
2+
3+
Ensure you record the following credentials:
4+
5+
- **Tenant ID**
6+
- **Client ID**
7+
- **Client secret**
8+
9+
You will need them to construct your ``kmsProviders`` object
10+
later in this tutorial.

source/includes/queryable-encryption/tutorials/automatic/azure/register.rst

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,39 @@
1313
`Register an application with the Microsoft identity platform <https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app>`__
1414
Quick Start.
1515

16-
.. important:: Record your Credentials
16+
.. tabs-drivers::
1717

18-
Ensure you record the following credentials:
18+
.. tab::
19+
:tabid: nodejs
1920

20-
- **tenant id**
21-
- **client id**
22-
- **client secret**
21+
.. include:: /includes/queryable-encryption/tutorials/automatic/azure/record-credentials.rst
2322

24-
You will need them to construct your ``kmsProviders`` object
25-
later in this tutorial.
23+
.. tab::
24+
:tabid: python
25+
26+
.. include:: /includes/queryable-encryption/tutorials/automatic/azure/record-credentials.rst
27+
28+
.. tab::
29+
:tabid: java-sync
30+
31+
.. important:: Record your Credentials
32+
33+
Ensure you record the following credentials:
34+
35+
- **tenant id**
36+
- **client id**
37+
- **client secret**
38+
39+
Unless you are running your client within an Azure Virtual
40+
Machine, you will need these credentials to construct your
41+
``kmsProviders`` object later in this tutorial.
42+
43+
.. tab::
44+
:tabid: go
45+
46+
.. include:: /includes/queryable-encryption/tutorials/automatic/azure/record-credentials.rst
47+
48+
.. tab::
49+
:tabid: csharp
50+
51+
.. include:: /includes/queryable-encryption/tutorials/automatic/azure/record-credentials.rst
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.. tip:: Azure Virtual Machine Managed Identities
2+
3+
If your client runs on an Azure Virtual Machine (VM), you can allow the
4+
VM to use its Managed Identity to authenticate to your key vault.
5+
6+
To allow the Azure VM to automatically provide your credentials,
7+
assign an empty map instead of one that contains your Azure
8+
credentials as shown in the following code:
9+
10+
.. code-block:: java
11+
12+
String kmsProvider = "azure";
13+
Map<String, Map<String, Object>> kmsProviders = new HashMap<String, Map<String, Object>>();
14+
Map<String, Object> providerDetails = new HashMap<>();
15+
kmsProviders.put(kmsProvider, providerDetails);

source/includes/tutorials/automatic/azure/client.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
:language: java
7070
:dedent:
7171

72+
.. include:: /includes/tutorials/automatic/azure/azure-vm-managed-identity.rst
73+
7274
.. tab::
7375
:tabid: nodejs
7476

source/includes/tutorials/automatic/azure/dek.rst

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88
Add the service account credentials to your CSFLE-enabled client
99
code.
1010

11-
.. tip::
12-
13-
You recorded your {+azure-kv+} credentials in the
14-
in the :ref:`Register Your Applitcation with Azure <csfle-tutorial-automatic-azure-register>`
15-
step of this guide.
16-
1711
.. tabs-drivers::
1812

1913
.. tab::
@@ -25,6 +19,8 @@
2519
:language: java
2620
:dedent:
2721

22+
.. include:: /includes/tutorials/automatic/azure/azure-vm-managed-identity.rst
23+
2824
.. tab::
2925
:tabid: nodejs
3026

@@ -61,11 +57,6 @@
6157
:language: go
6258
:dedent:
6359

64-
.. tip:: Learn More
65-
66-
To learn more about the KMS provider object for {+azure-kv+}, see
67-
:ref:`csfle-reference-kms-providers-azure`.
68-
6960
.. step:: Add Your Key Information
7061

7162
Update the following code to specify your {+cmk-long+}:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. important:: Record your Credentials
2+
3+
Ensure you record the following credentials:
4+
5+
- **Tenant ID**
6+
- **Client ID**
7+
- **Client secret**
8+
9+
You will need them to construct your ``kmsProviders`` object
10+
later in this tutorial.

source/includes/tutorials/automatic/azure/register.rst

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,41 @@
1212
follow Microsoft's official
1313
`Register an application with the Microsoft identity platform <https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app>`__
1414
Quick Start.
15+
16+
.. tabs-drivers::
17+
18+
.. tab::
19+
:tabid: nodejs
20+
21+
.. include:: /includes/tutorials/automatic/azure/record-credentials.rst
22+
23+
.. tab::
24+
:tabid: python
25+
26+
.. include:: /includes/tutorials/automatic/azure/record-credentials.rst
27+
28+
.. tab::
29+
:tabid: java-sync
30+
31+
.. important:: Record your Credentials
1532

16-
.. important:: Record your Credentials
33+
Ensure you record the following credentials:
34+
35+
- **tenant id**
36+
- **client id**
37+
- **client secret**
1738

18-
Ensure you record the following credentials:
39+
Unless you are running your client within an Azure Virtual
40+
Machine, you will need these credentials to construct your
41+
``kmsProviders`` object later in this tutorial.
42+
43+
.. tab::
44+
:tabid: go
45+
46+
.. include:: /includes/tutorials/automatic/azure/record-credentials.rst
47+
48+
.. tab::
49+
:tabid: csharp
1950

20-
- **tenant id**
21-
- **client id**
22-
- **client secret**
51+
.. include:: /includes/tutorials/automatic/azure/record-credentials.rst
2352

24-
You will need them to construct your ``kmsProviders`` object
25-
later in this tutorial.

0 commit comments

Comments
 (0)