hadoop/hadoop-tools/hadoop-azure
sreeb-msft 3f256fa209 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:49:02 +00:00
..
dev-support HADOOP-17770 WASB : Support disabling buffered reads in positional reads (#3233) 2021-10-22 11:45:42 +05:30
src HADOOP-18498. ABFS: Remove unwanted ? prefix from SAS Tokens (#5136) 2022-11-28 11:49:02 +00:00
.gitignore HADOOP-17191. ABFS: Run the tests with various combinations of configurations and publish a consolidated results (#2597) 2021-03-10 18:25:41 +00:00
pom.xml HADOOP-15983. Use jersey-json that is built to use jackson2 (#3988) 2022-10-21 11:34:09 +01:00