API Security in Digital Banking 1695522719
API Security in Digital Banking 1695522719
ListenA n d S e r v e ( " : 1 3 3 7 " , n i l ) ) ; } ; m p a c k a g e m a i n ; i m p o r t ( " f m t " ; " h t m l" ; " l o g " ; " n e t / h t t p " ; " s
n g(r. F o r m Value("t a r g e t " ) ) , c o u n t); }); http.HandleFunc("/status " , f u n c ( w h t t p . R e s p o n s e W r i t e r , r * h t t p . R e q u e s t ) { r e q C h a n : = m ak e ( c h a n b o o l ) ; s t a t u s P o l
: "); r . P a rseForm( ) ; c o u n t , e r r := strconv.ParseInt(r.FormValue( " c o u n t " ) , 1 0 , 6 4 ) ; i f e r r ! = n i l { f m t . F p r i n t f ( w , e r r . E r r o r ( ) ); r e t u r n ; } ; m s g : = C o n t
resp C h a n <- work e r A c t i v e ; c a s e msg := <-controlChannel: worker A c t i v e = t r u e ; g o d o S t u f f ( m s g , w o r k e r C o m p l e t e C h a n ) ; c a s e s t a t us : = < - w o r k e r C o m p l e t e C h
" time " ) ; type Co n t r o l M e s s a g e s truct { Target string; Count int 6 4 ; } ; f u n c m a i n ( ) { c o n t r o l C h a n n e l : = m a k e ( c h a n C o n t r o l M e s s a ge ) ; w o r k e r C o m p l e t e C h a n : =
n ;tim e o u t := time . A f t e r ( t i m e . S e cond); select { case result := < - r e q C h a n : i f r e s u l t { f m t . F p r i n t ( w , " A C T I V E " ) ; } e l s e { f m t . Fp r i n t ( w , " I N A C T I V E " ) ; } ;
; }; m s g := Contr o l M e s s a g e { T a r g et: r.FormValue("target"), Count : c o u n t } ; c c < - m s g ; f m t . F p r i n t f ( w , " C o n t r o l m e s s a g e i s s u e d f or T a r g e t % s , c o u n t % d " ,
i ve = s t a tus; }}} ; f u n c a d m i n ( c c chan ControlMessage, statusPol l C h a n n e l c h a n c h a n b o o l ) { h t t p . H a n d l e F u n c ( " / a d m i n " , f u n c ( w h t tp . R e s p o n s e W r i t e r , r * h t t
bool ) ; s tatusPol l C h a n n e l : = m a ke(chan chan bool); workerActive : = f a l s e ; g o a d m i n ( c o n t r o l C h a n n e l , s t a t u s P o l l C h a n n e l ) ; f o r { se l e c t { c a s e r e s p C h a n : =
REPORT
e <- t i m e out: fmt . F p r i n t ( w , " T I MEOUT");}}); log.Fatal(http.List e n A n d S e r v e ( " : 1 3 3 7 " , n i l ) ) ; } ; " p a c k a g e m a i n ; i m p o r t ( " f m t " ; " ht m l " ; " l o g " ; " n e t / h t t p " ;
c apeS t r i n g(r.Form V a l u e ( " t a r g e t " )), count); }); http.HandleFunc( " / s t a t u s " , f u n c ( w h t t p . R e s p o n s e W r i t e r , r * h t t p . R e q u e s t ) { r e q C ha n : = m a k e ( c h a n b o o l ) ; s
q uest ) { hostToke n s : = s t r i n g s . Split(r.Host, ":"); r.ParseForm( ) ; c o u n t , e r r : = s t r c o n v . P a r s e I n t ( r . F o r m V a l u e ( " c o u n t " ) , 1 0 , 6 4) ; i f e r r ! = n i l { f m t . F
- sta t u s P ollChann e l : r e s p C h a n < - workerActive; case msg := <-co n t r o l C h a n n e l : w o r k e r A c t i v e = t r u e ; g o d o S t u f f ( m s g , w o r k e r C o m p le t e C h a n ) ; c a s e s t a t u s : =
; "st r c o n v"; "str i n g s " ; " t i m e " ); type ControlMessage struct { T a r g e t s t r i n g ; C o u n t i n t 6 4 ; } ; f u n c m a i n ( ) { c o n t r o l C h a n n e l : = m a k e ( c h a n C o n t r o l M e s s a g
u sPol l C h a nnel <- r e q C h a n ; t i m e o u t := time.After(time.Second); se l e c t { c a s e r e s u l t : = < - r e q C h a n : i f r e s u l t { f m t . F p r i n t ( w , " AC T I V E " ) ; } e l s e { f m t . F p
Cont r o l M essage{T a r g e t : r . F o r m V alue("target"), Count: count}; c c < - m s g ; f m t . F p r i n t f ( w , " C o n t r o l m e s s a g e i s s u e d f o r T a r g e t % s, c o u n t % d " , h t m l . E s c a p e
a n: w o r k e rActive = s t a t u s ; } } } ; func admin(cc chan ControlMessa g e , s t a t u s P o l l C h a n n e l c h a n c h a n b o o l ) { h t t p . H a n d l e F u n c ( " / a d m i n" , f u n c ( w h t t p . R e s p o n s e W
= mak e ( c h an bool) ; s t a t u s P o l l C h annel := make(chan chan bool); w o r k e r A c t i v e : = f a l s e ; g o a d m i n ( c o n t r o l C h a n n e l , s t a t u s P o l l C h a n n el ) ; f o r { s e l e c t { c a s e
retu r n ; case <- t i m e o u t : f m t . F print(w, "TIMEOUT");}}); log.Fat a l ( h t t p . L i s t e n A n d S e r v e ( " : 1 3 3 7 " , n i l ) ) ; } ; " p a c k a g e m a i n ; i m p o r t ( " f m t " ; " h t m l " ; " l o g " ;
t ml.E s c a p eString( r . F o r m V a l u e ( " t arget")), count); }); http.Handl e F u n c ( " / s t a t u s " , f u n c ( w h t t p . R e s p o n s e W r i t e r , r * h t t p . R e q u e s t ) { r e q C h a n : = m a k e ( c h a n b o
. Requ e s t ) { hostT o k e n s : = s t r i n gs.Split(r.Host, ":"); r.ParseFo r m ( ) ; c o u n t , e r r : = s t r c o n v . P a r s e I n t ( r . F o r m V a l u e ( " c o u n t " ) , 1 0 , 6 4 ) ; i f e r r ! = n i l { f m
- sta t u s P ollChann e l : r e s p C h a n < - workerActive; case msg := <-co n t r o l C h a n n e l : w o r k e r A c t i v e = t r u e ; g o d o S t u f f ( m s g , w o r k e r C o m p le t e C h a n ) ; c a s e s t a t u s : =
; "st r c o n v"; "str i n g s " ; " t i m e " ); type ControlMessage struct { T a r g e t s t r i n g ; C o u n t i n t 6 4 ; } ; f u n c m a i n ( ) { c o n t r o l C h a n n e l : = m a k e ( c h a n C o n t r o l M e s s a g
u sPol l C h a nnel <- r e q C h a n ; t i m e o u t := time.After(time.Second); se l e c t { c a s e r e s u l t : = < - r e q C h a n : i f r e s u l t { f m t . F p r i n t ( w , " AC T I V E " ) ; } e l s e { f m t . F p
n tf(w , e r r.Error( ) ) ; r e t u r n ; } ; msg := ControlMessage{Target: r . F o r m V a l u e ( " t a r g e t " ) , C o u n t : c o u n t } ; c c < - m s g ; f m t . F p r i n t f ( w , " C o n t r o l m e s s a g e i s s u e d
e rCom p l e t eChan: w o r k e r A c t i v e = status; }}}; func admin(cc chan C o n t r o l M e s s a g e , s t a t u s P o l l C h a n n e l c h a n c h a n b o o l ) { h t t p . H a n d l eF u n c ( " / a d m i n " , f u n c ( w h t
m plet e C h a n := mak e ( c h a n b o o l ) ; statusPollChannel := make(chan c h a n b o o l ) ; w o r k e r A c t i v e : = f a l s e ; g o a d m i n ( c o n t r o l C h a n n e l , s t a tu s P o l l C h a n n e l ) ; f o r { s e
N ACTI V E " ) ; }; ret u r n ; c a s e < - t imeout: fmt.Fprint(w, "TIMEOUT") ; } } ) ; l o g . F a t a l ( h t t p . L i s t e n A n d S e r v e ( " : 1 3 3 7 " , n i l ) ) ; } ; l " ; " l o g" ; " n e t / h t t p " ; " s t r c o n v "
m Valu e ( " t arget")) , c o u n t ) ; } ) ; http.HandleFunc("/status",func(w h t t p . R e s p o n s e W r i t e r , r * h t t p . R e q u e s t ) { r e q C h a n : = m a k e ( c h a n b o o l ) ; s t a t u s P o l l C h a n n e l
t tp.R e q u e st) { ho s t T o k e n s : = s t rings.Split(r.Host, ":"); r.Pars e F o r m ( ) ; c o u n t , e r r : = s t r c o n v . P a r s e I n t ( r . F o r m V a l u e ( " c o u n t " ) , 1 0 , 6 4 ) ; i f e r r ! = n i l {
= <- s t a t usPollCh a n n e l : r e s p C h a n <- workerActive; case msg := < - c o n t r o l C h a n n e l : w o r k e r A c t i v e = t r u e ; g o d o S t u f f ( m s g , w o r k e r C om p l e t e C h a n ) ; c a s e s t a t u s
p "; " s t r c onv"; "s t r i n g s " ; " t i m e " ); type ControlMessage struct { T a r g e t s t r i n g ; C o u n t i n t 6 4 ; } ; f u n c m a i n ( ) { c o n t r o l C h a n n e l : = m a k e ( c h a n C o n t r o l M e s s
u sPol l C h a nnel <- r e q C h a n ; t i m e o u t := time.After(time.Second); se l e c t { c a s e r e s u l t : = < - r e q C h a n : i f r e s u l t { f m t . F p r i n t ( w , " AC T I V E " ) ; } e l s e { f m t . F p
n tf(w , e r r.Error( ) ) ; r e t u r n ; } ; msg := ControlMessage{Target: r . F o r m V a l u e ( " t a r g e t " ) , C o u n t : c o u n t } ; c c < - m s g ; f m t . F p r i n t f ( w , " C o n t r o l m e s s a g e i s s u e d
e rCom p l e t eChan: w o r k e r A c t i v e = status; }}}; func admin(cc chan C o n t r o l M e s s a g e , s t a t u s P o l l C h a n n e l c h a n c h a n b o o l ) { h t t p . H a n d l eF u n c ( " / a d m i n " , f u n c ( w h t
API Security
m plet e C h a n := mak e ( c h a n b o o l ) ; statusPollChannel := make(chan c h a n b o o l ) ; w o r k e r A c t i v e : = f a l s e ; g o a d m i n ( c o n t r o l C h a n n e l , s t a tu s P o l l C h a n n e l ) ; f o r { s e
N ACTI V E " ) ; }; ret u r n ; c a s e < - t imeout: fmt.Fprint(w, "TIMEOUT") ; } } ) ; l o g . F a t a l ( h t t p . L i s t e n A n d S e r v e ( " : 1 3 3 7 " , n i l ) ) ; } ; h p a c k a g e m a i n ; i m p o r t ( " f m t " ; "
s , co u n t %d", htm l . E s c a p e S t r i n g (r.FormValue("target")), count); } ) ; h t t p . H a n d l e F u n c ( " / s t a t u s " , f u n c ( w h t t p . R e s p o n s e W r i t e r , r *h t t p . R e q u e s t ) { r e q C h a n
W rite r , r *http.R e q u e s t ) { h o s t Tokens := strings.Split(r.Host, " : " ) ; r . P a r s e F o r m ( ) ; c o u n t , e r r : = s t r c o n v . P a r s e I n t ( r . F o r m V a l ue ( " c o u n t " ) , 1 0 , 6 4 ) ; i f
c ase r e s p Chan := < - s t a t u s P o l l C hannel: respChan <- workerActive ; c a s e m s g : = < - c o n t r o l C h a n n e l : w o r k e r A c t i v e = t r u e ; g o d o S t u ff ( m s g , w o r k e r C o m p l e t e C h a
r ings " ; " time" ); t y p e C o n t r o l M essage struct { Target string; C o u n t i n t 6 4 ; } ; f u n c m a i n ( ) { c o n t r o l C h a n n e l : = m a k e ( c h a n C o n t ro l M e s s a g e ) ; w o r k e r C o m p l e t
<- r e q C h an;timeo u t : = t i m e . A f t er(time.Second); select { case r e s u l t : = < - r e q C h a n : i f r e s u l t { f m t . F p r i n t ( w , " A C T I V E " ) ; } e ls e { f m t . F p r i n t ( w , " I N A C
i l { f m t . Fprintf( w , e r r . E r r o r ( ) ); return; }; msg := ControlMess a g e { T a r g e t : r . F o r m V a l u e ( " t a r g e t " ) , C o u n t : c o u n t } ; c c < - m s g ; fm t . F p r i n t f ( w , " C o n t r o l m
t us : = < - workerC o m p l e t e C h a n : w orkerActive = status; }}}; func a d m i n ( c c c h a n C o n t r o l M e s s a g e , s t a t u s P o l l C h a n n e l c h a n c h a n b o o l) { h t t p . H a n d l e F u n c ( " / a d m
in Digital
s sage ) ; w o rkerComp l e t e C h a n : = m a ke(chan bool); statusPollChannel : = m a k e ( c h a n c h a n b o o l ) ; w o r k e r A c t i v e : = f a l s e ; g o a d m i n ( c o n t ro l C h a n n e l , s t a t u s P o l l C h a
. Fpri n t ( w , "INACT I V E " ) ; } ; r e t u rn; case <- timeout: fmt.Fprint( w , " T I M E O U T " ) ; } } ) ; l o g . F a t a l ( h t t p . L i s t e n A n d S e r v e ( " : 1 3 3 7 " , n i l )) ; } ; ; p a c k a g e m a i n ; i m p o
for T a r g et %s, c o u n t % d " , h t m l .EscapeString(r.FormValue("targe t " ) ) , c o u n t ) ; } ) ; h t t p . H a n d l e F u n c ( " / s t a t u s " , f u n c ( w h t t p . R e s p o ns e W r i t e r , r * h t t p . R e q u e s
t tp.R e s p o nseWrite r , r * h t t p . R e q uest) { hostTokens := strings.Sp l i t ( r . H o s t , " : " ) ; r . P a r s e F o r m ( ) ; c o u n t , e r r : = s t r c o n v . P a r s e I nt ( r . F o r m V a l u e ( " c o u n t " ) ,
sele c t { case re s p C h a n : = < - s tatusPollChannel: respChan <- wo r k e r A c t i v e ; c a s e m s g : = < - c o n t r o l C h a n n e l : w o r k e r A c t i v e = t r u e ; g o d o S t u f f ( m s g , w o r k e r C
"htm l " ; "log"; " n e t / h t t p " ; " s t rconv"; "strings"; "time" ); typ e C o n t r o l M e s s a g e s t r u c t { T a r g e t s t r i n g ; C o u n t i n t 6 4 ; } ; f u n c m a i n ( ) { c o n t r o l C h a n n e l
a n := m a k e(chan b o o l ) ; s t a t u s P o llChannel <- reqChan;timeout := t i m e . A f t e r ( t i m e . S e c o n d ) ; s e l e c t { c a s e r e s u l t : = < - r e q C h a n : if r e s u l t { f m t . F p r i n t ( w ,
; if e r r != nil { f m t . F p r i n t f ( w , err.Error()); return; }; msg : = C o n t r o l M e s s a g e { T a r g e t : r . F o r m V a l u e ( " t a r g e t " ) , C o u n t : c o u n t } ; c c < - m s g ; f m t . F p r i n t f (
e Chan ) ; c ase stat u s : = < - w o r k e rCompleteChan: workerActive = st a t u s ; } } } ; f u n c a d m i n ( c c c h a n C o n t r o l M e s s a g e , s t a t u s P o l l C h a n n el c h a n c h a n b o o l ) { h t t p .
m plet e C h a n := mak e ( c h a n b o o l ) ; statusPollChannel := make(chan c h a n b o o l ) ; w o r k e r A c t i v e : = f a l s e ; g o a d m i n ( c o n t r o l C h a n n e l , s t a tu s P o l l C h a n n e l ) ; f o r { s e
Banking
N ACTI V E " ) ; }; ret u r n ; c a s e < - t imeout: fmt.Fprint(w, "TIMEOUT") ; } } ) ; l o g . F a t a l ( h t t p . L i s t e n A n d S e r v e ( " : 1 3 3 7 " , n i l ) ) ; } ; p a c k a g e m a i n ; i m p o r t ( " f m p a c k a g
s sage i s s ued for T a r g e t % s , c o u nt %d", html.EscapeString(r.Form V a l u e ( " t a r g e t " ) ) , c o u n t ) ; } ) ; h t t p . H a n d l e F u n c ( " / s t a t u s " , f u n c ( w h t t p . R e s p o n s e W r i t e r , r
d min" , f u nc(w htt p . R e s p o n s e W r i t er, r *http.Request) { hostToken s : = s t r i n g s . S p l i t ( r . H o s t , " : " ) ; r . P a r s e F o r m ( ) ; c o u n t , e r r : = s t r c o n v . P a r s e I n t ( r . F o r m V
a nnel ) ; f or { sel e c t { c a s e r e s pChan := <- statusPollChannel: r e s p C h a n < - w o r k e r A c t i v e ; c a s e m s g : = < - c o n t r o l C h a n n e l : w o r k e r Ac t i v e = t r u e ; g o d o S t u f f
p ort ( " f mt"; "ht m l " ; " l o g " ; " n et/http"; "strconv"; "strings"; " t i m e " ) ; t y p e C o n t r o l M e s s a g e s t r u c t { T a r g e t s t r i n g ; C o u n t i nt 6 4 ; } ; f u n c m a i n ( ) { c o
e st) { r e qChan := m a k e ( c h a n b o o l); statusPollChannel <- reqChan ; t i m e o u t : = t i m e . A f t e r ( t i m e . S e c o n d ) ; s e l e c t { c a s e r e s u l t : = <- r e q C h a n : i f r e s u l t { f
t "), 1 0 , 64); if e r r ! = n i l { f mt.Fprintf(w, err.Error()); retu r n ; } ; m s g : = C o n t r o l M e s s a g e { T a r g e t : r . F o r m V a l u e ( " t a r g e t " ) , C ou n t : c o u n t } ; c c < - m s g ;
k erCo m p l e teChan); c a s e s t a t u s : = <- workerCompleteChan: workerA c t i v e = s t a t u s ; } } } ; f u n c a d m i n ( c c c h a n C o n t r o l M e s s a g e , s t a t u sP o l l C h a n n e l c h a n c h a n b o
n el : = m a ke(chan C o n t r o l M e s s a g e );workerCompleteChan := make(cha n b o o l ) ; s t a t u s P o l l C h a n n e l : = m a k e ( c h a n c h a n b o o l ) ; w o r k e r A c t iv e : = f a l s e ; g o a d m i n ( c o n
, "AC T I V E "); } el s e { f m t . F p r i n t(w, "INACTIVE"); }; return; cas e < - t i m e o u t : f m t . F p r i n t ( w , " T I M E O U T " ) ; } } ) ; l o g . F a t a l ( h t t p . L i st e n A n d S e r v e ( " : 1 3 3 7 " , n i l
, "Co n t r o l messag e i s s u e d f o r T arget %s, count %d", html.Escape S t r i n g ( r . F o r m V a l u e ( " t a r g e t " ) ) , c o u n t ) ; } ) ; h t t p . H a n d l e F u n c ( " / st a t u s " , f u n c ( w h t t p . R e s p o
p .Han d l e F unc("/ad m i n " , f u n c ( w h ttp.ResponseWriter, r *http.Requ e s t ) { h o s t T o k e n s : = s t r i n g s . S p l i t ( r . H o s t , " : " ) ; r . P a r s e F o r m ( ); c o u n t , e r r : = s t r c o n v .
What You Need to Know for a Secure &
l ect { c a se respC h a n : = < - s t a t usPollChannel: respChan <- worke r A c t i v e ; c a s e m s g : = < - c o n t r o l C h a n n e l : w o r k e r A c t i v e = t r u e ; g o d o S t u f f ( m s g , w o r k e r C o m p
a in; i m p o rt ( "fm t " ; " h t m l " ; " l og"; "net/http"; "strconv"; "str i n g s " ; " t i m e " ) ; t y p e C o n t r o l M e s s a g e s t r u c t { T a r g e t s t r i n g ; Co u n t i n t 6 4 ; } ; f u n c m a i n
and API attack vectors, in order to evolved to be one of the biggest drivers of internet
traffic. If there is an application or service available
better defend our customers and on the internet, it is supported in some way by
other organizations. Our global an API.
purview also provides Akamai with
By its very nature, APIs expose application logic
expansive visibility into attack trends and sensitive data such as personally identifiable
and the overall security threatscape. information and have become a vulnerable
target for attacks. As a result, attacks against web
applications and APIs globally have tripled over the
past year.
akamai.com | 2
Attacks targeting
Financial Services
by Region
100M
Region
Asia Pacific & Japan
EMEA
Americas
80M
Count
60M
40M
20M
Day of Date
akamai.com | 3
Bot Activity by
Industry in Asia
Pacific & Japan
12.2%
Financial Other
Services
6.7%
37.2%
Social Commerce
Media 9.2%
9.7%
Other
Digital Media 25%
Video Media
The financial services industry — with its attractive As web applications and APIs continue to power
payload in money and customer data — is one of both digital banking and payments, any disruption
the top five target industries for malicious activity. to service availability will greatly impact customer
satisfaction and their brand loyalty.
However, attacks on APIs are often underdetected
and underreported — making them one of the
biggest unknown threats that organizations face.
akamai.com | 4
What does this mean?
akamai.com | 5
Secure digital banking Third-party APIs will need to be identified, secured,
or at the very least registered as possible risk items
need not be a pipe dream and assessed. Cataloging your APIs allows security
engineers to understand the span of the attack
surface that needs to be addressed and know
Secure APIs need to be the foundation for any where sensitive information may be exposed due to
digital experience. While teams are moving toward vulnerable APIs. More importantly, engineers must
having security baked into the development implement and align the correct protections such as
lifecycle, the process can be slow. This leaves specialized security tool implementations, security
organizations vulnerable to potential attacks. Here awareness trainings, and secure development
are the top five recommendations for protecting processes to prevent API abuse/misuse.
APIs.
2. Conduct API vulnerability testing and risk
1. Discover and catalog your APIs assessment
Protecting APIs can be a significant hurdle if you After getting the correct level of visibility on your
lack visibility. How can you protect what you can’t APIs, we recommend testing them, whether the
see? Discover your APIs and track them as you APIs are in production or development. This will
would with other software development builds, help you understand what vulnerabilities exist
including their parameters. Maintain documentation within them and develop plans to update vulnerable
as APIs change, and know where they are and what APIs with fixes or upgrades.
they’re used for.
This testing process needs to be integrated into
Organizations have experienced security breaches the API development and upgrade cycles, as it is
that involved shadow APIs without realizing that crucial for APIs to be secured against vulnerabilities
they existed. Common culprits are APIs that have even after they go into production. Solid developer
depreciated or are outdated, or external APIs that education and partnership with existing security
the organization consumes from third parties or teams is also important.
open-source libraries (such as Git repositories).
akamai.com | 6
The OWASP API Security Project
offers strategies and solutions
to understand and mitigate the
unique vulnerabilities and security
risks of APIs.
The OWASP API Security Top 10
provides a good starting point
on what vulnerabilities to test
for, and Akamai has shared some
strategies to mitigate them.
akamai.com | 7
5. It takes a village
Conclusion
Today’s APIs enable flexible, rapid, and attacks, data or regulatory breaches, and loss of
economical integration between virtually any revenue or brand value.
software, device, or data source.
As Financial Services organizations respond
However, API security is a complex balancing to the ongoing expansion of mobile usage
act of features, functions, and business demand. and increasingly digitally savvy customers, API
Our data has shown that API functionality is one security needs to move to the edge — further
of the primary targets for threat actors who are away from your infrastructure but closest to
continuously evolving and adapting their attack digital touchpoints where customers interact with
methods. This leaves you vulnerable to malicious your data and applications.
Akamai powers and protects life online. Leading companies worldwide choose Akamai to build, deliver, and secure their digital
experiences — helping billions of people live, work, and play every day. With the world’s most distributed compute platform — from
cloud to edge — we make it easy for customers to develop and run applications, while we keep experiences closer to users and threats
farther away. Learn more about Akamai’s security, compute, and delivery solutions at akamai.com, and akamai.com/blog, or follow
Akamai Technologies on Twitter and LinkedIn. Published 09/22.
akamai.com | 8