hadoop/hadoop-tools/hadoop-azure
sreeb-msft 1a7acc403b
HADOOP-18498. ABFS: Remove unwanted ? prefix from SAS Tokens (#5136)
This commit parses SAS Tokens and removes the unwanted prefix of '?' from them, if present.

At present, SAS Tokens are provided to the driver through customer implementations of the SASTokenProvider interface. The SAS token providers should not assume that the token will be the first query parameter in the URIs that communicate with the backend. However, it was observed that certain public interfaces provided by Storage to generate SAS can include the '?' as the first character of the SAS Token, which would ideally be the case when it is the first query parameter. Thus, tokens that contain this prefix will lead to an error in the driver due to a clash of query parameters.

To avoid failures for use of such SAS tokens, after receiving the SAS Token from the provider, the code checks for whether any ? prefix is present or not. If yes, it is removed before further usage of the token. This way, users would not have to manually remove the prefix before passing it on as a configuration.

Contributed by Sree Bhattacharya
2022-11-28 11:38:13 +00:00
..
dev-support HADOOP-17767. ABFS: Update test scripts (#3124) 2022-10-20 18:07:04 +01:00
src HADOOP-18498. ABFS: Remove unwanted ? prefix from SAS Tokens (#5136) 2022-11-28 11:38:13 +00:00
.gitignore HADOOP-17767. ABFS: Update test scripts (#3124) 2022-10-20 18:07:04 +01:00
pom.xml HADOOP-17873. ABFS: Fix transient failures in ITestAbfsStreamStatistics and ITestAbfsRestOperationException (#3699) 2022-09-06 11:00:52 +01:00