All jobs / Solutions / cloud architect / Identity & Security
Solutions / cloud architect interview question · 1–3 years
A single-page app, a mobile app and a nightly batch job all need to call your API. Which OAuth flows fit?
The strongest answer
Authorisation code with PKCE for the browser and mobile apps, client credentials for the batch job; no long-lived secrets in anything a user can download
Why it works
Exactly. Public clients use code plus PKCE; machines use client credentials; secrets stay server-side.
What a good answer covers
- Public clients: code + PKCE.
- Machines: client credentials.
- No secrets in downloadable apps.
- Password and implicit are legacy.
Answers that fall short
- Close, but not the strongest: Password grant for all three; it is the simplest
The password grant hands user credentials to the client and is deprecated for good reason. - Weak: Client credentials everywhere with the secret in the app bundle
A secret in a downloadable bundle is public within the hour. - Red flag: Implicit flow for the SPA because it was designed for browsers
Implicit leaks tokens in URLs and is superseded by code plus PKCE.
Who gets asked this
More Identity & Security questions
- How do you design the roles for a product’s permission system so it does not end up as one role per user?
- How should cloud permissions be granted to a new service?
- What does zero trust change about how services talk to each other inside the network?
- Design the key management for a platform that encrypts customer data at rest.
- How do you run a threat-modelling session on a new design?
- Enterprise customers ask to sign in with their own identity provider. What do you build?
- An internal certificate expired on a Sunday and took down service-to-service traffic. What do you change in…
- Design identity for a company with acquired subsidiaries, contractors and customers all needing access.