Skip to content

Add smoke test to redirect facility - #1748

Open
Fingel wants to merge 1 commit into
devfrom
1720-redirect-smoke-test
Open

Fingel wants to merge 1 commit into
devfrom
1720-redirect-smoke-test

Conversation

@Fingel

@Fingel Fingel commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

This might catch a few cases where the TOM isn't configured with a correct API key for the portal at all, but attempts to use the redirect facility. Before this, the facility would happily redirect. The user then logs in to the portal, creates an observation, but then the tom can't pull it once they are redirected back to the tom because it doesn't have permissions.

It doesn't solve the more nefarious case where the API key configured for the TOM doesn't match the account the user logs into the portal with. Still not sure what to do about that one.

@Fingel
Fingel requested a review from jchate6 December 2, 2026 23:09
@jchate6 jchate6 moved this to Needs Review in TOM Toolkit Dec 2, 2026

@sfoale sfoale left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hope you don't me adding myself as a reviewer as part of my TOM ramp up.

I'm not convinced this is going to work as is because I think this smoke test will always pass. Your get sends no authorisation header and an anonymous get returns a 200. You could also check that the api key is set before calling the get to check another doomed path.

@Fingel

Fingel commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

Yea definitely not going to work! I assumed /requestgroups/ was authenticated, but I guess it returns public requests? I'll switch it to something like /profile maybe.

@Fingel
Fingel force-pushed the 1720-redirect-smoke-test branch from 455c556 to 8a8273d Compare December 3, 2026 18:38
@Fingel
Fingel requested a review from sfoale December 3, 2026 18:39

@sfoale sfoale left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks better but a valid key with no current proposal still passes this smoke test. Maybe also check for at least one current proposal in the profile response to make it more useful still?

This branch has not been deployed

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

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

3 participants