Skip to content

Fix a bug in 'get-identities' text output#1277

Merged
sirosen merged 1 commit into
globus:mainfrom
sirosen:fix-get-identities-case-sensitivity
Jul 6, 2026
Merged

Fix a bug in 'get-identities' text output#1277
sirosen merged 1 commit into
globus:mainfrom
sirosen:fix-get-identities-case-sensitivity

Conversation

@sirosen

@sirosen sirosen commented Jul 6, 2026

Copy link
Copy Markdown
Member

Globus Auth identity usernames are always lowercase. And identity IDs are
36-char represented UUIDs (meaning they are case insensitive).
However, comparisons for text output printing were done without
lowercasing or casefolding, resulting in incorrect failures to match on
usernames like 'Abc@example.com' vs 'abc@example.com'.

The behavior is fixed both for IDs and usernames, and a new test confirms
simply that uppercased and lowercased inputs result in the same outputs.

Additionally, some small type annotation fixes are made: a str was
annotated incorrectly as a dict, and typing.cast was used where
isinstance can provide a better runtime guarantee.

Globus Auth identity usernames are always lowercase. And identity IDs are
36-char represented UUIDs (meaning they are case insensitive).
However, comparisons for text output printing were done without
lowercasing or casefolding, resulting in incorrect failures to match on
usernames like 'Abc@example.com' vs 'abc@example.com'.

The behavior is fixed both for IDs and usernames, and a new test confirms
simply that uppercased and lowercased inputs result in the same outputs.

Additionally, some small type annotation fixes are made: a `str` was
annotated incorrectly as a dict, and `typing.cast` was used where
`isinstance` can provide a better runtime guarantee.
@sirosen
sirosen merged commit 179330b into globus:main Jul 6, 2026
6 checks passed
@sirosen
sirosen deleted the fix-get-identities-case-sensitivity branch July 6, 2026 16:39
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