Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain Azure SAS tokens are sanitized incorrectly by the SDK #88140

Closed
fcofdez opened this issue Jun 28, 2022 · 2 comments · Fixed by #88155
Closed

Certain Azure SAS tokens are sanitized incorrectly by the SDK #88140

fcofdez opened this issue Jun 28, 2022 · 2 comments · Fixed by #88155
Labels
>bug :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs Team:Distributed Meta label for distributed team v8.3.0

Comments

@fcofdez
Copy link
Contributor

fcofdez commented Jun 28, 2022

After introducing #86135 the underlying Azure SDK sanitizes incorrectly certain SAS tokens, preventing the correct authentication against the Azure storage service.

@fcofdez fcofdez added >bug :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs Team:Distributed Meta label for distributed team v8.3.0 labels Jun 28, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@fcofdez
Copy link
Contributor Author

fcofdez commented Jun 29, 2022

This seems to affect to SAS tokens that are prefixed with ?. During the SAS token parsing, the SDK cannot identify the first SAS token query param, removing it from the sanitized token, this produces an invalid signature.

fcofdez added a commit to fcofdez/elasticsearch that referenced this issue Jun 29, 2022
…nvalid signatures

When the SAS token is prefixed with ? the SDK parses incorrectly
all the query params and removes the first query param, this
produces an invalid signature preventing the repository to
authenticate against the storage service. This commit reverts
to the previous behaviour where the SAS token was appended to
the URL as it is provided by the user.

Closes elastic#88140
fcofdez added a commit that referenced this issue Jun 29, 2022
…valid signatures (#88155)

When the SAS token is prefixed with ? the SDK parses incorrectly
all the query params and removes the first query param, this
produces an invalid signature preventing the repository to
authenticate against the storage service. This commit reverts
to the previous behaviour where the SAS token was appended to
the URL as it is provided by the user.

Closes #88140
fcofdez added a commit to fcofdez/elasticsearch that referenced this issue Jun 29, 2022
…valid signatures (elastic#88155)

When the SAS token is prefixed with ? the SDK parses incorrectly
all the query params and removes the first query param, this
produces an invalid signature preventing the repository to
authenticate against the storage service. This commit reverts
to the previous behaviour where the SAS token was appended to
the URL as it is provided by the user.

Closes elastic#88140
fcofdez added a commit that referenced this issue Jun 29, 2022
…valid signatures (#88176)

When the SAS token is prefixed with ? the SDK parses incorrectly
all the query params and removes the first query param, this
produces an invalid signature preventing the repository to
authenticate against the storage service. This commit reverts
to the previous behaviour where the SAS token was appended to
the URL as it is provided by the user.

Closes #88140
Backport of #88155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs Team:Distributed Meta label for distributed team v8.3.0
Projects
None yet
2 participants