Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagating the initial token could allow it to be replayed by a downstream service #1

Open
william-tran opened this issue Mar 17, 2017 · 0 comments

Comments

@william-tran
Copy link
Owner

william-tran commented Mar 17, 2017

In the presentation, I talk about how at the conclusion of an authcode flow for a confidential client (eg a server-side webapp), the webapp stores the token in session, and the session is now authenticated. The browser never sees the token, the browser just has a session cookie. If this webapp can only be invoked via an authenticated session (ie this session cookie), this is good, because the session cookie is never propagated, and is the only thing that can be used to invoke the webapp as that user.

Now lets say we're using the implicit grant from a JS SPA. The server side web-app is just a resource server, or a facade for other APIs, ie a BFF. This front door is now directly invokable by the token that the SPA got. If this token were to be propagated as the initial token, downstream services could act as the user by making requests against the front door.

The responsibilities of the front door (BFF, gateway, whatever you want to call it) need to be clear, in that the thing used to invoke it (the token or session cookie) cannot be propagated downstream. If only session cookie were used there's nothing more to do, but in the case of a token, we would need to propagate just the token's claims, and not the entire token. Downstream apps would then need to trust the front door enough to trust the claims its making about the user. An ID token could be propagated if available, as long as the ID token isn't usable on its own against the front door.

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

No branches or pull requests

1 participant