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: CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,16 @@
9
9
#### Under the Hood
10
10
11
11
- re-organize macros to match new structure [#184](https://github.com/dbt-msft/dbt-sqlserver/pull/184)
12
+
### v0.21.1
13
+
14
+
#### features
15
+
16
+
- Added support for more authentication methods: automatic, environment variables, managed identity. All of them are documented in the readme. [#178](https://github.com/dbt-msft/dbt-sqlserver/pull/178) contributed by [@sdebruyn](https://github.com/sdebruyn)
17
+
18
+
#### fixes
19
+
20
+
- fix for [#186](https://github.com/dbt-msft/dbt-sqlserver/issues/186) and [#177](https://github.com/dbt-msft/dbt-sqlserver/issues/177) where new columns weren't being added when snapshotting or incrementing [#188](https://github.com/dbt-msft/dbt-sqlserver/pull/188)
21
+
12
22
### v0.21.0
13
23
14
24
Please see [dbt-core v0.21.0 release notes](https://github.com/dbt-labs/dbt-core/releases/tag/v0.21.0) for upstream changes
Copy file name to clipboardExpand all lines: README.md
+61-15Lines changed: 61 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,14 +59,35 @@ trusted_connection: True
59
59
```
60
60
### Azure SQL-specific auth
61
61
The following [`pyodbc`-supported ActiveDirectory methods](https://docs.microsoft.com/en-us/sql/connect/odbc/using-azure-active-directory?view=sql-server-ver15#new-andor-modified-dsn-and-connection-string-keywords) are available to authenticate to Azure SQL:
62
+
- Auto
62
63
- Azure CLI
64
+
- Environment-based authentication
63
65
- ActiveDirectory Password
64
66
- ActiveDirectory Interactive
65
67
- ActiveDirectory Integrated
66
68
- Service Principal (a.k.a. AAD Application)
67
-
- ~~ActiveDirectory MSI~~ (not implemented)
69
+
- Managed Identity
68
70
69
-
However, the Azure CLI is the ideal way to authenticate instead of using the built-in ODBC ActiveDirectory methods, for reasons detailed below.
71
+
Usually the automatic option is the easiest one to use since it will work with any configuration already present in your environment, as explained below.
72
+
73
+
#### Auto
74
+
75
+
This will try to authenticate by using the following methods one by one until it finds a valid way to authenticate:
76
+
77
+
1. Read credentials from environment variables (see environment-based authentication below)
78
+
2. Use the managed identity of the system (see MSI below)
79
+
3. VS Code: use the account used to log in to the VS Code Azure extension if installed
80
+
4. Use the logged account in the Azure CLI if installed (see below)
81
+
5. Azure PowerShell: use the account used with `Connect-AzAccount` in the Azure PowerShell module if installed
82
+
83
+
To use automatic authentication, set `authentication` in `profiles.yml` to `Auto`:
84
+
85
+
```yaml
86
+
authentication: Auto
87
+
```
88
+
89
+
This is the recommended way for authenticating to databases on Azure because it avoids storing credentials in your
90
+
profile and can resort to different authentication mechanisms depending on the system you're running dbt on.
70
91
71
92
#### Azure CLI
72
93
Use the authentication of the Azure command line interface (CLI). First, [install the Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli), then, log in:
@@ -77,47 +98,72 @@ az login
77
98
78
99
Then, set `authentication` in `profiles.yml` to `CLI`:
79
100
80
-
```
101
+
```yaml
81
102
authentication: CLI
82
103
```
83
104
84
-
This is also the preferred route for using a service principal:
105
+
#### Environment-based authentication
106
+
You can let dbt dynamically use credentials from your environment variables by configuring
107
+
your profile with environment-based authentication:
85
108
86
-
```
87
-
az login --service-principal --username $CLIENTID --password $SECRET --tenant $TENANTID
109
+
```yaml
110
+
authenticaton: environment
88
111
```
89
112
90
-
This avoids storing a secret as plain text in `profiles.yml`.
113
+
You can configure the following environment variables:
uses your machine's credentials (might be disabled by your AAD admins), also requires that you have Active Directory Federation Services (ADFS) installed and running, which is only the case if you have an on-prem Active Directory linked to your Azure AD...
109
-
```
143
+
Uses your machine's credentials (might be disabled by your AAD admins), also requires that you have Active Directory Federation Services (ADFS) installed and running, which is only the case if you have an on-prem Active Directory linked to your Azure AD...
144
+
145
+
```yaml
110
146
authentication: ActiveDirectoryIntegrated
111
147
```
148
+
112
149
##### Service Principal
113
-
`client_*` and `app_*` can be used interchangeably. Again, it is not recommended to store a service principal secret in plain text in your `dbt_profile.yml`. The CLI auth method is preferred.
114
-
```
150
+
`client_*` and `app_*` can be used interchangeably. Again, it is not recommended to store a service principal secret in plain text in your `dbt_profile.yml`. The auto, environment or CLI auth methods are preferred over this one.
151
+
152
+
```yaml
115
153
authentication: ServicePrincipal
116
154
tenant_id: tenatid
117
155
client_id: clientid
118
156
client_secret: clientsecret
119
157
```
120
158
159
+
#### Managed Identity
160
+
161
+
If the system you're running dbt on has a [managed identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview),
162
+
then you can configure the authentication like so:
0 commit comments