OAuth 2.0 & JWT Bearer Token Flow โ Interview Questions & Scenarios (2026)
Connected App setup, X.509 certificate generation, zero-downtime key rotation, and multi-environment setup.
๐ OAuth 2.0 & JWT Bearer Token Flow
Connected App setup, X.509 certificate generation, zero-downtime key rotation, and multi-environment setup.
Explain the Salesforce JWT Bearer authentication flow step by step.
username
No passwords stored anywhere โ survives Salesforce password policy changes
Token auto-renews every 1 hour โ no integration downtime
Audit logs show Connected App name, not a user login โ cleaner security audit
Project: Insurance โ Automated Headless Microservice Authentication.
Problem: Legacy integrations used hardcoded service account passwords that broke every 90 days due to corporate password expiration policies.
What I Did: Re-architected authentication to Salesforce Connected App using OAuth 2.0 JWT Bearer Token flow with a 2048-bit digital certificate stored in JKS keystore.
Result: Achieved 100% automated headless authentication with zero password maintenance outages and passed corporate SOC2 security audits.
How do you rotate the JWT signing key without downtime?
Salesforce supports multiple active certificates on a Connected App. Rotation process:
Zero downtime because Salesforce accepts tokens signed by ANY active certificate simultaneously.
Project: Aviation โ Automated Headless Microservice Authentication.
Problem: Legacy integrations used hardcoded service account passwords that broke every 90 days due to corporate password expiration policies.
What I Did: Re-architected authentication to Salesforce Connected App using OAuth 2.0 JWT Bearer Token flow with a 2048-bit digital certificate stored in JKS keystore.
Result: Achieved 100% automated headless authentication with zero password maintenance outages and passed corporate SOC2 security audits.
Can the same Connected App be used across multiple environments?
Technically yes โ but best practice is separate Connected Apps per environment (sandbox,
production). Reasons: different Salesforce orgs have different URLs; separate apps allow independent
key rotation and revocation; cleaner audit trails per environment.
In MuleSoft: use ${aws-s3::config:sf.consumerKey} in property files โ different value per
environment config YAML. Never hardcode the Consumer Key in flows.