All jobs / Mobile developer / Security
Mobile developer interview question · 0–1 years
A partner API needs a secret key, and a teammate puts it in a constants file in the app. What do you say?
The strongest answer
Anything shipped inside the app can be read out of it, so that key is public the day we release. Call the partner from our own backend and let the app talk to our server instead
Why it works
Exactly — the client is not a place secrets can live, so the fix is architectural: the secret stays server-side.
What a good answer covers
- Anything shipped is public.
- Secrets live on the server.
- Proxy the partner call through your backend.
- Obfuscation is not protection.
Answers that fall short
- Close, but not the strongest: Move it out of source control into a build-time configuration value or an environment variable
That keeps it out of the repository, which is worth doing, but a build-time value still ships in the binary. - Weak: Obfuscate the string so it cannot be found by someone looking through the binary
Obfuscation slows someone down for an afternoon; the key still has to be in memory to be used. - Red flag: It is fine — the app is compiled, and nobody is going to pull our app apart for it
Pulling strings out of an app is routine, and a leaked partner key is usually billed to us.
Who gets asked this
More Security questions
- You will pin your API. What else ships in the same change?
- Camera grant rate is poor and denied-forever is high. How do you work it?
- A pin mismatch will brick the app on a bad deploy. What is your break-glass?
- You need to prove the device still holds a user key after a biometric. Where does the key live?
- A support engineer pastes a crash log into a ticket. It contains a user’s full address and part of a card…
- A security review asks what you assume about a rooted / jailbroken phone. What is a sane answer?
- When does the org require certificate pinning?
- Growth wants a new attribution SDK that wants IDFA, a full photo dump, and its own WebView. What is the bar?