hadoop/hadoop-tools
sreeb-msft 00249619a0
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:40:06 +00:00
..
hadoop-aliyun
hadoop-archive-logs
hadoop-archives
hadoop-aws
hadoop-azure
hadoop-azure-datalake
hadoop-benchmark
hadoop-datajoin
hadoop-distcp
hadoop-dynamometer
hadoop-extras
hadoop-fs2img
hadoop-gridmix
hadoop-kafka
hadoop-openstack
hadoop-pipes
hadoop-resourceestimator
hadoop-rumen
hadoop-sls
hadoop-streaming
hadoop-tools-dist
pom.xml