Skip to content

Add stateful introspection checking for front-end tokens#47

Open
jonathanmelitski wants to merge 5 commits intomasterfrom
jon0/platform-introspect
Open

Add stateful introspection checking for front-end tokens#47
jonathanmelitski wants to merge 5 commits intomasterfrom
jon0/platform-introspect

Conversation

@jonathanmelitski
Copy link
Contributor

Platform supports token introspection. This means that, given a stateful token granted by platform, we can verify the validity of this token against platform. Further, since mobile backend requires tokens to have the introspection scope, this does not require a separate Platform application. In other words, tokens can be used to authenticate a request used to verify themselves.

This is valuable because access tokens are not yet stateless. This PR checks first to see if the token given to analytics can be verified as a B2B token, then checks if Platform can validate the token. This makes it so frontend applications, like Penn Mobile iOS/Android, can use analytics by passing in their access token.

Concern: we were loosely concerned about giving clients free reign over analytics. We could consider the use of Apple's DeviceCheck framework (or Android's Play Integrity framework) to verify that these requests are actually coming from a verified source (not Postman lol).

@jonathanmelitski jonathanmelitski requested review from dr-Jess and removed request for dr-Jess September 27, 2025 07:04
@jonathanmelitski jonathanmelitski marked this pull request as draft September 28, 2025 23:17
@jonathanmelitski jonathanmelitski marked this pull request as ready for review September 29, 2025 18:59
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.

1 participant