Skip to content

HDDS-16371. [STS] Better messaging for invalid endpoint path and prevent non-canonical token use - #11186

Open
fmorg-git wants to merge 2 commits into
apache:HDDS-13323-stsfrom
fmorg-git:HDDS-16371
Open

HDDS-16371. [STS] Better messaging for invalid endpoint path and prevent non-canonical token use#11186
fmorg-git wants to merge 2 commits into
apache:HDDS-13323-stsfrom
fmorg-git:HDDS-16371

Conversation

@fmorg-git

Copy link
Copy Markdown
Contributor

Please describe your PR in detail:

  • This ticket addresses two issues:
  1. If the wrong endpoint path is used (for example having /invalidPath at the end instead of the root path), then the aws client returns an opaque "Unknown" error. This ticket updates to give a more user-friendly message.
  2. If a valid session token is created, and a user uses a session token that is the concatenation of the session token with itself, it is considered valid and should not be. This ticket fixes this issue as well.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-16371

How was this patch tested?

unit and smoke tests

try {
token.decodeFromUrlString(encodedToken);
final String canonical = token.encodeToUrlString();
if (!canonical.equals(encodedToken)) {

@ChenSammi ChenSammi Sep 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. Is heading and trailing blank space allowed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants