SLIDE 1 OPEN BANKING
TALES FROM THE FRONTIER
Jason Maude @jasonmaude Anca Zaharia @ancaleuca
SLIDE 2
What is open banking?
The legislation and associated technology that allow customers of financial institutions greater control of data that those institutions hold about them.
SLIDE 3 Who are Starling Bank?
- Tech start-up with a banking licence
- ~100% cloud-based, mobile-only
- All the features that you’d expect from
a current account and more
- Public APIs & developer platform
SLIDE 4 Public APIs
- Most actions that can be performed through
the mobile apps are available
- Allows individuals to connect up their bank
account to their own code
SLIDE 5 The Starling Bank marketplace
- Allows customers to securely connect to
selected partners via their Starling Bank account
- Providers of mortgages, pensions, savings and
investments etc
SLIDE 6
LESSON 1: UNDERSTAND OAUTH 2
SLIDE 7
OAuth 2 overview
Client Auth server User Resource server
SLIDE 8 Client authentication
Partner app Auth web app
1. Redirect https://oauth.starlingbank.com
client_id=$client_id
response_type=code
state=$state
redire rect_uri ri=$redirect_uri
SLIDE 9 Client authentication
Partner app Auth web app
1. Redirect
Starling app
SLIDE 10 Client authorisation
Partner app Auth web app
1. Redirect
Starling app
- 2. Send QR code
- 3. Login, review
permissions
SLIDE 11 Client authorisation
Partner app Auth web app
1. Redirect
Starling app
Starling API
- 4. Authorise
- 3. Login, review
permissions
SLIDE 12 Client authorisation
Partner app Auth web app
1. Redirect
Starling app
Starling API
permissions
auth code
SLIDE 13 Client authorisation
Partner app Auth web app
1. Redirect
Starling app
Starling API
permissions
auth code
/redirect_uri
state=$state
code=$auth_code
SLIDE 14 Exchange auth code for access token
Partner API Starling API
Request
code=$auth_code
client_id=$client_id
client_secr cret=$client_secret
- grant_type=authorization_code
- redirect_uri=$redirect_uri
Response
access_token
refre resh_token
expires_ es_in
scope POST https://api.starlingbank.com/oauth/access-token
SLIDE 15 Use access token
Partner API Starling API
- H "Authorization: Bearer $ac
access_token" https://api.starlingbank.com/api/v1/accounts/balance
SLIDE 16
Example screens for Wealthify using 2-way OAuth flow
SLIDE 17 Additional security
- Highly sensitive requests (e.g., payment
instructions) must be sig igned
SLIDE 18 Token storage
- Don’t forget to delete expired
tokens
SLIDE 19
LESSON 2: YOU CAN’T ALWAYS CONNECT
SLIDE 20
Things will go wrong
SLIDE 21 Losing requests and responses
Starling API Partner API
Request Request Response
SLIDE 22
DITTO architecture
The system must ensure that every instruction from a user is actioned at least once and at most once
SLIDE 23 Losing requests - at least once
Starling API Partner API
Request
SLIDE 24 Losing responses - at most once
Starling API Partner API
Request Response
SLIDE 25
LESSON 3: MAKE TESTING EASY
SLIDE 26
SLIDE 27 Personal access
Developer Portal account Starling Bank account
SLIDE 28
Personal access
$ curl -H “Authorization: Bearer <personal access token>” https://api.starlingbank.com/api/v1/tr ansactions
SLIDE 29
What if I want more?
SLIDE 30
Play in the sandbox
SLIDE 31
LESSON 4: WORK ON YOUR PERMISSIONS MODEL
SLIDE 32 Permission model v1
Tier 1 Read financial Tier 2 Read personal Tier 3 Write financial Tier 4 Create payees Tier 5 Make payments
SLIDE 33 Permission model v2
Create Payees Edit Metadata Create Local Payment Read Address Read Transactions Delete DD Mandates Read Balance Create Savings Goal
SLIDE 34
Displaying permissions
SLIDE 35
LESSON 5: MONITOR YOUR API
SLIDE 36 Elasticsearch Logstash Kibana Alertmanager Elastalert Pagerduty Prometheus Grafana Instana
Monitoring and observability stack
SLIDE 37
SLIDE 38
SLIDE 39
THE FUTURE
SLIDE 40
Open integration platform
Starling API Partner API Open integration platform
SLIDE 41 Share your identity confirmation
Starling API Partner API
KYC
SLIDE 42 Key takeaways
- Lesson 1: Understand OAuth
- Lesson 2: You can’t always connect
- Lesson 3: Make testing easy
- Lesson 4: Work on your permissions model
- Lesson 5: Monitor your API
SLIDE 43 Thank you!
Check out the Starling Developer Podcast!
https://developer.starlingbank.com
@ancaleuca @jasonmaude