Commit 6e018c8
Fix prefix match for ADLS_SAS_TOKEN (apache#2461)
The current logic when constructing an ADLS file system incorrectly
matches
[`adls.sas-token-expires-at-ms.`](https://github.com/apache/iceberg/blob/d1771207c9040f1c8b6886665b56d1a972fe402a/azure/src/main/java/org/apache/iceberg/azure/AzureProperties.java#L45)
prefixed keys. If this is provided and encountered prior to
[`adls.sas-token.`](https://github.com/apache/iceberg/blob/d1771207c9040f1c8b6886665b56d1a972fe402a/azure/src/main/java/org/apache/iceberg/azure/AzureProperties.java#L44)
prefixed keys, it will incorrectly determine the `ADLS_ACCOUNT_NAME` and
`ADLS_SAS_TOKEN`.
For example with the following properties:
```
{
'adls.sas-token-expires-at-ms.testaccount.dfs.core.windows.net': '1757597218121',
'adls.sas-token.testaccount.dfs.core.windows.net': '<redacted>'
}
```
**Before**
```
{
'adls.sas-token-expires-at-ms.testaccount.dfs.core.windows.net': '1757597218121',
'adls.sas-token.testaccount.dfs.core.windows.net': '<redacted>',
'adls.account-name': 'adls',
'adls.sas-token': '1757597218121'
}
```
**After**
```
{
'adls.sas-token-expires-at-ms.testaccount.dfs.core.windows.net': '1757597218121',
'adls.sas-token.testaccount.dfs.core.windows.net': '<redacted>',
'adls.account-name': 'testaccount',
'adls.sas-token': '<redacted>'
}
```
---------
Co-authored-by: Thomas Powell <tpowell@palantir.com>1 parent a9897de commit 6e018c8
2 files changed
+29
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
511 | 539 | | |
512 | 540 | | |
513 | 541 | | |
| |||
0 commit comments