Repository navigation
Conversation
sfoale
left a comment
There was a problem hiding this comment.
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.
|
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. |
455c556 to
8a8273d
Compare
sfoale
left a comment
There was a problem hiding this comment.
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 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.