SFDC Gateway (api + app)
Problem
Teams that needed to call Salesforce each held their own Salesforce credentials and went through manual onboarding tickets.
Solution
A proxy that holds the Salesforce credentials, plus a self-service onboarding UI.
Workflow
A requester submits an access request. An admin approves it. PingID then grants the scope acoe:sfdcgateway:<org>:<operation>:<env>. The caller sends a PingID JWT to /sfdc/**, and the gateway resolves the integration user and forwards the request unchanged.
Auth
- Gateway: PingID JWT validated against the JWKS. The scope in the token is the proof of approval.
- App: PingFederate OAuth2 authorization-code flow (
form_post), with admin access gated by an AD group.
Data
- App: PostgreSQL via async SQLAlchemy.
- Gateway: cached Salesforce tokens per integration user. Org config lives in properties.
UI
React 19 + Vite.
Platform
- Gateway: Spring Boot, Java 17.
- App: FastAPI, Python 3.13, containerized.
Impact
Callers never hold Salesforce secrets. Adding an org or operation is a properties change, not a code change. Onboarding is self-service.
The fun challenge
- Authorization lives in the token. PingID only issues scopes granted during onboarding, so the gateway needs no per-request approval lookup.
- The
form_postauth flow pins a fixedredirect_uri(VitestrictPort) and has no offline or mock login path (ADR-004). - The backend was reworked from Spring Boot to FastAPI mid-project.