Given the following scenario:
[ My app ] [ Third party]
| /
[ API Gateway ]
| |
[ API app 1 ] [API app 2]
What kind of security would you apply for your own app and third parties? I currently consider using OpenID Connect + OAuth 2 and putting a proxy/API gateway in front of the apps to do authorization. This works well for third party cases, but has some quirks when it comes to my own web app. It seems strange to present "My app requests the following permissions: ..." (since its a trusted client, after all). Similarly, you don't see the official facebook/twitter/<insert app here> ask for this.
I haven't found any specifics in the specs about it, other than:
5.2.3.2. Require User Consent for Public Clients without Secret
Authorization servers should not allow automatic authorization for
public clients. The authorization server may issue an individual
client id but should require that all authorizations are approved by
the end user. For clients without secrets, this is a countermeasure
against the following threat:
o Impersonation of public client applications.
My interpretation is that public clients (implicit flow / native apps) should show a consent screen, but a server-side authorization grant flow may whitelist clients for skipping the user consent? If that's the case, then a OIDC / OAuth provider must implement this feature or I would have to do a custom implementation.
A alternative would be to use something else than OIDC / OAuth for my own apps, regular sessions for instance. This would require "my app" to produce a valid session after login (in its own login flow), and have the API gateway accept either a OAuth access token (coming from third parties) or a session cookie (coming from my own app).
I'm wondering how you would solve this? How have others solved it?