-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for azure access token authorization
- Loading branch information
Showing
3 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# name: test/sql/cloud/azure/access_token_auth.test | ||
# description: test access-token authentication | ||
# group: [azure] | ||
|
||
require azure | ||
|
||
require delta | ||
|
||
require-env AZURE_ACCESS_TOKEN | ||
|
||
require-env AZURE_STORAGE_ACCOUNT | ||
|
||
statement ok | ||
set allow_persistent_secrets=false | ||
|
||
statement error | ||
SELECT count(*) FROM delta_scan('azure://delta-testing-private/dat/all_primitive_types/delta'); | ||
---- | ||
Invalid Input Error: No valid Azure credentials found! | ||
|
||
statement ok | ||
CREATE SECRET az1 ( | ||
TYPE AZURE, | ||
PROVIDER ACCESS_TOKEN, | ||
ACCOUNT_NAME '${AZURE_STORAGE_ACCOUNT}' | ||
) | ||
|
||
statement error | ||
SELECT count(*) FROM delta_scan('azure://delta-testing-private/dat/all_primitive_types/delta'); | ||
---- | ||
Invalid Input Error: No access_token value not found in secret provider! | ||
|
||
statement ok | ||
CREATE OR REPLACE SECRET az1 ( | ||
TYPE AZURE, | ||
PROVIDER ACCESS_TOKEN, | ||
ACCESS_TOKEN '${AZURE_ACCESS_TOKEN}', | ||
ACCOUNT_NAME '${AZURE_STORAGE_ACCOUNT}' | ||
) | ||
|
||
query I | ||
SELECT count(*) FROM delta_scan('azure://delta-testing-private/dat/all_primitive_types/delta'); | ||
---- | ||
5 |