SlideShare a Scribd company logo
Best	
  Prac*ces	
  You	
  Must	
  Apply	
  to	
  
Secure	
  Your	
  APIs	
  	
  
K.	
  Sco7	
  Morrison	
  
SVP	
  and	
  Dis+nguished	
  Engineer	
  
	
  	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Here	
  Is	
  What	
  This	
  Talk	
  Is	
  About:	
  
§  The	
  new	
  API	
  threat	
  
–  …and	
  the	
  poten+al	
  rise	
  of	
  the	
  hacker-­‐robber-­‐baron	
  
§  Are	
  APIs	
  just	
  like	
  the	
  Web?	
  Or	
  are	
  they	
  different?	
  
–  Look	
  at	
  three	
  important	
  areas:	
  
1.  Parameteriza+on	
  
2.  Iden+ty	
  
3.  Cryptography	
  
§  How	
  to	
  apply	
  the	
  lessons	
  of	
  this	
  talk	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
What	
  is	
  an	
  API?	
  
Web	
  App	
  
API	
  Server	
  
Web	
  Client	
  
Mobile	
  App	
  
An	
  API	
  is	
  a	
  RESTful	
  
service	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
For	
  Example:	
  
GET	
  http://services.layer7.com/staff/Scott	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
For	
  Example:	
  
{	
  
	
  	
  	
  	
  	
  "firstName":	
  ”Sco^	
  ",	
  
	
  	
  	
  	
  	
  "lastName"	
  :	
  ”Morrison",	
  
	
  	
  	
  	
  	
  ”+tle"	
  	
  	
  	
  	
  	
  :	
  “CTO”,	
  
	
  	
  	
  	
  	
  "address"	
  	
  :	
  
	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  "streetAddress":	
  ”405-­‐1100	
  Melville",	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  "city"	
  	
  	
  	
  	
  	
  	
  	
  	
  :	
  ”Vancouver",	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  ”prov"	
  	
  	
  	
  	
  	
  	
  	
  :	
  ”BC",	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  "postalCode"	
  	
  	
  :	
  ”V6E	
  4A6"	
  
	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  "phoneNumber":	
  
	
  	
  	
  	
  	
  [	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "type"	
  	
  :	
  ”office",	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "number":	
  ”605	
  681-­‐9377"	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  },	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "type"	
  	
  :	
  ”home",	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "number":	
  ”604	
  555-­‐4567"	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  	
  ]	
  
	
  }	
  
http://services.layer7.com/staff/Scott	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
“Sounds	
  great.	
  So	
  what’s	
  the	
  problem?”	
  
API	
  Development	
  !=	
  	
  
Web	
  Development	
  
In	
  Par*cular:	
  	
  
We	
  need	
  to	
  be	
  wary	
  of	
  bad	
  web	
  
development	
  prac=ces	
  migra=ng	
  
to	
  APIs…	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Problem	
  Area	
  #1:	
  API	
  Parameteriza=on	
  
§  In	
  the	
  tradi+onal	
  web	
  world,	
  parameteriza+on	
  was	
  limited	
  
and	
  indirect	
  
–  Subject	
  to	
  the	
  capabili+es	
  of	
  URLs	
  and	
  forms	
  	
  
§  APIs	
  in	
  contrast	
  and	
  offer	
  much	
  more	
  explicit	
  
parameteriza+on 	
  	
  
–  The	
  full	
  power	
  of	
  RESTful	
  design:	
  GET,	
  POST,	
  PUT,	
  DELETE	
  	
  
§  (And	
  don’t	
  stop	
  there…	
  what	
  about	
  effects	
  of	
  HEAD,	
  etc)?	
  
§  This	
  creates	
  a	
  greater	
  poten+al	
  a^ack	
  surface	
  
–  Injec+on,	
  bounds,	
  correla+on,	
  and	
  so	
  on	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Good	
  Web	
  Apps	
  Constrain	
  	
  
HTTP	
  Server	
  
App	
  Server	
  
Database	
  
Web	
  Client	
  
Objects	
  
Pages	
  
Constraint	
  
Space	
  
Records	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
APIs	
  Are	
  A	
  More	
  Direct	
  Conduit	
  
HTTP	
  Server	
  
App	
  Server	
  
Database	
  
App	
  
Objects	
  
OIen:	
  
•  Self-­‐documen+ng	
  
•  Closely	
  mapped	
  to	
  object	
  space,	
  
data	
  structure,	
  etc	
  
APIs	
  can	
  leak	
  
informa*on	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
APIs	
  Also	
  Increase	
  
A7ack	
  Surface	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
A^acker	
  
Web	
  App	
  Server	
  
(browser+APIs)	
  
Vic+m:	
  Web	
  
Browser	
  
Client	
  
<SCRIPT	
  …>	
  
1.	
  API	
  injects	
  
script	
  in	
  
3.	
  Browser	
  loads	
  
content	
  with	
  
embedded	
  script	
  
2.	
  Server	
  fails	
  to	
  
perform	
  FIEO:	
  Filter	
  
Input,	
  Escape	
  Output	
  	
  	
  
API	
  
Script	
  Inser*on	
  is	
  Just	
  One	
  Poten*al	
  Exploit	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
SQL	
  Injec+on	
  is	
  Another	
  
Source:	
  h^ps://xkcd.com/327/	
  	
  
Exploits of a Mom
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Mi*ga*on	
  Strategy	
  
§  Rigorous	
  valida+on	
  of	
  consumer	
  supplied	
  inputs	
  –	
  and	
  API	
  
output!	
  
–  Stronger	
  typing	
  
–  Sets	
  and	
  ranges	
  
–  Avoid	
  auto-­‐generated	
  schemas	
  that	
  make	
  everything	
  a	
  string	
  
§  Use	
  schema	
  valida+on	
  
–  XML	
  Schema,	
  RELAX-­‐NG,	
  Schematron	
  –	
  Pick	
  your	
  poison	
  
§  Please	
  no	
  DTDs!	
  
–  JSON	
  schema	
  valida+on	
  
–  Return	
  of	
  IDLs:	
  WADL,	
  RAML,	
  Swagger,	
  etc	
  
Constrain	
  by	
  Default	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Mi*ga*on	
  Strategy	
  (cont.)	
  
§  Regex	
  scanning	
  for	
  signatures	
  	
  
§  Tune	
  pa^erns	
  for	
  the	
  API	
  
–  Some+mes	
  SELECT	
  is	
  OK 	
  	
  
§  Virus	
  scanning	
  of	
  a^achments	
  
–  Don’t	
  forget	
  B64’d	
  message	
  content	
  
§  Library,	
  service,	
  or	
  gateway	
  solu+ons	
  
–  Decoupled	
  security	
  
–  What	
  are	
  the	
  tradeoffs?	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Mi*ga*on	
  Strategy	
  (cont.)	
  
§  Whitelist	
  tags	
  if	
  you	
  can	
  (i.e.	
  where	
  the	
  valida+on	
  space	
  is	
  
small	
  and	
  concise)	
  
–  Not	
  always	
  prac+cal	
  
–  (Note	
  that	
  I’m	
  referring	
  to	
  whitelis+ng	
  tags	
  not	
  IPs.)	
  	
  
§  Blacklist	
  dangerous	
  tags	
  like	
  <SCRIPT>	
  
§  Always	
  perform	
  FIEO	
  (Filter	
  Input,	
  Escape	
  Output)	
  
§  Watch	
  for	
  fuzzing	
  
–  This	
  is	
  a	
  trend—not	
  an	
  event!	
  
§  Learn	
  more:	
  h^p://xssed.com	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Problem	
  Area	
  #2:	
  Iden=ty	
  
§  We	
  had	
  it	
  surprisingly	
  good	
  in	
  the	
  Web	
  world	
  
–  Browser	
  session	
  usually	
  +ed	
  to	
  human	
  
–  Dealing	
  with	
  one	
  iden+ty	
  is	
  not	
  so	
  tough	
  
§  Security	
  tokens	
  abound,	
  but	
  solu+ons	
  are	
  mature	
  
–  Username/pass,	
  x.509	
  certs,	
  mul+-­‐factor,	
  Kerberos,	
  SAML,	
  etc	
  
–  APIs	
  rapidly	
  becoming	
  more	
  difficult	
  
§  Non-­‐human	
  en++es	
  
§  Mul+ple	
  layers	
  of	
  relevant	
  iden++es	
  
–  Me,	
  my	
  a^ributes,	
  my	
  phone,	
  my	
  developer,	
  my	
  provider…	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
API	
  Keys	
  
“An	
  applica*on	
  programing	
  interface	
  key	
  (API	
  key)	
  is	
  a	
  code	
  
generated	
  by	
  websites	
  that	
  allow	
  users	
  to	
  access	
  their	
  
applica+on	
  programming	
  interface.	
  API	
  keys	
  are	
  used	
  to	
  track	
  
how	
  the	
  API	
  is	
  being	
  used	
  in	
  order	
  to	
  prevent	
  malicious	
  use	
  or	
  
abuse	
  of	
  the	
  terms	
  of	
  service.	
  
API	
  keys	
  are	
  based	
  on	
  the	
  UUID	
  system	
  to	
  ensure	
  they	
  will	
  be	
  
unique	
  to	
  each	
  user.”	
  
	
  
	
  
(Source:	
  wikipedia	
  h^p://en.wikipedia.org/wiki/Applica+on_programming_interface_key	
  )	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
For	
  Example:	
  
GET	
  http://example.layer7.com/services/staff	
  
?APIKey=15458617-­‐7813-­‐4a37-­‐94ac-­‐a8e6da6f6405	
  	
  
Seriously?	
  WTF.	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
How	
  Does	
  An	
  API	
  Key	
  Map	
  To	
  Iden+ty?	
  
15458617-­‐7813-­‐4a37-­‐94ac-­‐a8e6da6f6405	
  	
  
A
A	
  person?	
  
Or	
  an	
  app?	
  
It	
  is	
  en+rely	
  inconsistent	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
The	
  Iden+ty	
  Profile	
  
Increasingly	
  we	
  need	
  to	
  move	
  toward	
  large	
  number	
  of	
  claims	
  
(mul+ple	
  iden+ty	
  profile)	
  
	
  
•  appID	
  
•  userID	
  
•  deviceID	
  
	
  
•  User attributes
•  Roles
•  Geo location
•  IP
•  User agent
•  Time of day
•  etc
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Where	
  Did	
  API	
  Keys	
  Come	
  From?	
  
§  API	
  keys	
  came	
  from	
  Google	
  APIs	
  like	
  maps,	
  early	
  Yahoo	
  APIs,	
  
early	
  Twi^er	
  APIs	
  etc.	
  	
  
–  Originally	
  meant	
  for	
  loose,	
  non-­‐authorita+ve	
  tracking	
  
–  Rate	
  limits,	
  approximate	
  usage	
  profiling	
  
§  Google	
  geocoding	
  v3.0	
  API	
  deprecates	
  API	
  keys	
  
–  Uses	
  IP	
  instead	
  to	
  track	
  and	
  thro^le	
  
–  This	
  has	
  its	
  own	
  set	
  of	
  problems	
  
§  IP	
  address	
  spoofing	
  
§  Problems	
  with	
  legi+mate	
  clients	
  like	
  cloud	
  servers	
  
§  Google	
  Premier	
  used	
  a	
  public	
  client_id	
  and	
  requires	
  signed	
  
URLs	
  
–  (Strips	
  domain	
  leaving	
  only	
  path	
  and	
  query	
  parameters)	
  	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Bo^om	
  Line:	
  The	
  API	
  Key	
  Was	
  Never	
  Meant	
  To	
  Be	
  
Authorita+ve	
  
§  Strange	
  hybrid	
  of	
  HTTP’s	
  USER-­‐AGENT	
  and	
  session	
  
con+nuity	
  
§  OK	
  only	
  for	
  general	
  tracking	
  
§  Anything	
  that	
  ma^ers	
  should	
  use	
  real	
  security	
  tokens	
  
– Anywhere	
  where	
  iden+ty	
  is	
  important:	
  
§  APIs	
  that	
  provide	
  access	
  to	
  sensi+ve	
  data	
  
§  APIs	
  that	
  change	
  things	
  that	
  ma^er	
  
§  APIs	
  that	
  charge	
  for	
  use	
  
§  etc.	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Move	
  to	
  OAuth	
  For	
  People	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Mi+ga+on	
  
§  Protect	
  the	
  tokens!	
  
§  HTTPS	
  everywhere	
  
–  This	
  is	
  another	
  web	
  design	
  cultural	
  issue	
  
–  It’s	
  just	
  not	
  that	
  expensive	
  any	
  more	
  
§  OAuth	
  for	
  people	
  
§  APIKeys	
  for	
  apps	
  
–  Assume	
  this	
  is	
  non-­‐authorita+ve	
  
§  Consider	
  behavioral	
  iden+fica+on	
  of	
  apps	
  
–  Apps	
  are	
  rigid	
  in	
  their	
  API	
  flow	
  
Important!
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Problem	
  Area	
  #3:	
  Cryptography	
  and	
  PKI	
  
§  Cryptography	
  is	
  reasonably	
  mature	
  on	
  the	
  web	
  
–  Surprisingly	
  limited	
  use	
  pa^erns	
  
–  SSL/TLS	
  
–  Very	
  li^le	
  tough	
  PKI	
  (like	
  client-­‐side)	
  
§  So	
  what’s	
  wrong	
  with	
  APIs?	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
It’s	
  Like	
  We	
  Forgot	
  Everything	
  We	
  Knew	
  
§  Emailing	
  keys	
  
–  API,	
  shared	
  secrets,	
  etc.	
  
§  Bad	
  storage	
  schemes	
  
–  Security	
  through	
  obscurity	
  
–  Toy	
  ciphers	
  
§  No	
  life	
  cycle	
  management	
  
–  Limits	
  on	
  use	
  
–  Time	
  limits	
  
–  Revoca+on	
  
–  Audit	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
The	
  Issues	
  
§  Key	
  management	
  
–  Especially	
  across	
  farms	
  
§  Nobody	
  takes	
  web	
  PKI	
  seriously	
  
–  CRLs	
  and	
  OCSP	
  aren’t	
  much	
  good	
  in	
  the	
  browser	
  world	
  
§  Fail	
  open—seriously	
  	
  
§  CA	
  trust	
  breakdown	
  
–  Indian	
  NIC	
  issue	
  July	
  2014	
  
§  Subordinate	
  CA	
  issued	
  fraudulent	
  Google	
  and	
  Yahoo	
  certs	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
The	
  Issues	
  (cont.)	
  
§  Cipher	
  suite	
  restric+ons	
  
–  Avoiding	
  downgrades	
  
§  Client-­‐side	
  cer+ficate	
  authen+ca+on	
  is	
  hard	
  
§  The	
  alterna+ves	
  for	
  parameter	
  confiden+ality	
  and/or	
  integrity	
  
are	
  hard:	
  
–  XML	
  encryp+on	
  is	
  s+ll	
  there	
  
§  Not	
  for	
  the	
  faint	
  of	
  heart	
  
–  OAuth	
  1.0	
  gave	
  you	
  parameter	
  signing	
  
§  Only	
  op+onal	
  in	
  2.0	
  
–  JWT	
  signing	
  and	
  encryp+on	
  emerging	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
SSL	
  Everywhere	
  
(it’s	
  cheap)	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Mi+ga+ons	
  
§  SSL	
  everywhere	
  
§  Use	
  real	
  PKI	
  
–  I	
  know	
  it’s	
  painful	
  
§  Use	
  HSMs	
  to	
  protect	
  keys	
  that	
  really	
  ma^er	
  
§  Otherwise	
  use	
  real	
  key	
  material	
  protec+on	
  schemes	
  
–  PKCS	
  #12,	
  etc	
  
–  Libraries	
  abound	
  
§  You	
  must	
  do	
  CRLs	
  and	
  OCSP	
  for	
  APIs	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
Where	
  Does	
  This	
  All	
  Leave	
  Us?	
  
§  SOAP,	
  the	
  WS-­‐*	
  stack	
  dealt	
  with	
  much	
  of	
  this	
  very	
  rigorously	
  
–  But	
  it	
  was	
  just	
  too	
  hard.	
  	
  
§  We	
  need	
  to	
  learn	
  from	
  this,	
  but	
  make	
  it	
  easier	
  to	
  implement	
  
§  Here’s	
  how…	
  
©	
  2014	
  CA.	
  ALL	
  RIGHTS	
  RESERVED.	
  
How	
  Do	
  I	
  Apply	
  This	
  Today?	
  
§  Use	
  SSL	
  for	
  all	
  API	
  transac+ons	
  
–  Hides	
  many	
  sins	
  
§  Confiden+ality,	
  integrity,	
  replay,	
  binding	
  token+message,	
  server	
  
authen+ca+on,	
  etc.	
  
§  Use	
  real	
  PKI	
  
–  Yes,	
  it’s	
  hard	
  
–  But	
  you	
  can’t	
  skimp	
  here	
  
§  Use	
  OAuth	
  for	
  distributed	
  authen+ca+on	
  
§  Validate	
  all	
  data	
  going	
  in	
  and	
  out	
  of	
  an	
  API	
  
§  Use	
  real	
  frameworks,	
  don’t	
  reinvent	
  
SVP	
  and	
  Dis+nguished	
  Engineer	
  
Sco^.Morrison@ca.com	
  
@KSco^Morrison	
  
h^p://KSco^Morrison.com	
  
linkedin.com/KSco^Morrison	
  
	
  
ca.com	
  
K.	
  Sco7	
  Morrison	
  

More Related Content

What's hot (20)

PPTX
Workshop: Advanced Federation Use-Cases with PingFederate
Craig Wu
 
PPTX
API Security and Management Best Practices
CA API Management
 
PDF
Oracle API Gateway
Rakesh Gujjarlapudi
 
PPTX
Rest API Security - A quick understanding of Rest API Security
Mohammed Fazuluddin
 
PDF
The Ultimate Guide to Mobile API Security
Stormpath
 
PPTX
API Gateway - OFM Canberra October 2014
Joelith
 
ODP
Security components in mule esb
himajareddys
 
PDF
Delivering the Promise of SOA - Enterprise Integration Made Easy
WSO2
 
PDF
WSO2 Use Case - API Facade Pattern
WSO2
 
PPTX
The Business Value for Internal APIs in the Enterprise
Akana
 
PPTX
What is an API Gateway?
LunchBadger
 
PPTX
Secure API Services in Node with Basic Auth and OAuth2
Stormpath
 
PDF
APIs and Beyond
WSO2
 
PPT
APITalkMeetupSharable
Obaidur (OB) Rashid
 
PPTX
Gateway/APIC security
Shiu-Fun Poon
 
ODP
Security in mulesoft
akshay yeluru
 
PDF
Should I Make My Own API Gateway?
Nordic APIs
 
PPTX
API Security: Securing Digital Channels and Mobile Apps Against Hacks
Akana
 
PDF
API Security In Cloud Native Era
WSO2
 
PDF
Crafting Consumable APIs
WSO2
 
Workshop: Advanced Federation Use-Cases with PingFederate
Craig Wu
 
API Security and Management Best Practices
CA API Management
 
Oracle API Gateway
Rakesh Gujjarlapudi
 
Rest API Security - A quick understanding of Rest API Security
Mohammed Fazuluddin
 
The Ultimate Guide to Mobile API Security
Stormpath
 
API Gateway - OFM Canberra October 2014
Joelith
 
Security components in mule esb
himajareddys
 
Delivering the Promise of SOA - Enterprise Integration Made Easy
WSO2
 
WSO2 Use Case - API Facade Pattern
WSO2
 
The Business Value for Internal APIs in the Enterprise
Akana
 
What is an API Gateway?
LunchBadger
 
Secure API Services in Node with Basic Auth and OAuth2
Stormpath
 
APIs and Beyond
WSO2
 
APITalkMeetupSharable
Obaidur (OB) Rashid
 
Gateway/APIC security
Shiu-Fun Poon
 
Security in mulesoft
akshay yeluru
 
Should I Make My Own API Gateway?
Nordic APIs
 
API Security: Securing Digital Channels and Mobile Apps Against Hacks
Akana
 
API Security In Cloud Native Era
WSO2
 
Crafting Consumable APIs
WSO2
 

Viewers also liked (20)

PDF
JBoss Negotiation in AS7
Josef Cacek
 
PPTX
Jar signing
LearningTech
 
PPTX
Java Secure Coding Practices
OWASPKerala
 
PDF
Java Security Manager Reloaded - jOpenSpace Lightning Talk
Josef Cacek
 
PPTX
Security Architecture of the Java Platform (http://www.javaday.bg event - 14....
Martin Toshev
 
PPT
D4 Contentintegration CONET
Andreas Schulte
 
PPTX
Int'l dance festival 2012
friendsoftheartsinfo
 
PPTX
Emgoldex TEAM HATAW
kenniyhiel09
 
PPT
Thyrogen final market research by parthi ppt
Kripa Shanker Gupta
 
PDF
IBM Pureflex product brochure
Arrow ECS UK
 
PDF
Domiolo 1995-2012
domiolo
 
PDF
Open source spatial database for mobile devices
Alexander Decker
 
PDF
NFA Introduction
Northern Flyer Alliance, Inc.
 
PDF
Sears Look Book
katemoss
 
DOCX
Geopolítica del agua embotellada(NOTAS)
Ramón Copa
 
PPT
Java security
Ankush Kumar
 
PDF
primefaces cortesia del portal de java
Salvador Olivares
 
PPS
A cierta edad
Victorino Redondo Fidalgo
 
PDF
Propalms Centralized Computing Solution Document
Vijender Yadav
 
JBoss Negotiation in AS7
Josef Cacek
 
Jar signing
LearningTech
 
Java Secure Coding Practices
OWASPKerala
 
Java Security Manager Reloaded - jOpenSpace Lightning Talk
Josef Cacek
 
Security Architecture of the Java Platform (http://www.javaday.bg event - 14....
Martin Toshev
 
D4 Contentintegration CONET
Andreas Schulte
 
Int'l dance festival 2012
friendsoftheartsinfo
 
Emgoldex TEAM HATAW
kenniyhiel09
 
Thyrogen final market research by parthi ppt
Kripa Shanker Gupta
 
IBM Pureflex product brochure
Arrow ECS UK
 
Domiolo 1995-2012
domiolo
 
Open source spatial database for mobile devices
Alexander Decker
 
Sears Look Book
katemoss
 
Geopolítica del agua embotellada(NOTAS)
Ramón Copa
 
Java security
Ankush Kumar
 
primefaces cortesia del portal de java
Salvador Olivares
 
Propalms Centralized Computing Solution Document
Vijender Yadav
 
Ad

Similar to CIS14: Best Practices You Must Apply to Secure Your APIs (20)

PPTX
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
CA API Management
 
PDF
Protecting Your APIs Against Attack & Hijack
CA API Management
 
PPTX
Meetup callback
Wayne Scarano
 
PDF
apidays Australia 2023 - API Security Breach Analysis & Empowering Devs to M...
apidays
 
PDF
Checkmarx meetup API Security - API Security top 10 - Erez Yalon
Adar Weidman
 
PPTX
The Fantastic Voyage to PaaS - Are we there yet? (Cloud Foundry Summit 2014)
VMware Tanzu
 
PDF
Takeaways from API Security Breaches Webinar
CA API Management
 
PPT
Applciation footprinting, discovery and enumeration
Blueinfy Solutions
 
PDF
API SECURITY
Tubagus Rizky Dharmawan
 
PDF
Past, Present and Future of WebSocket - HTML5DevConf May 2014
Frank Greco
 
PDF
Protecting Microservices APIs with 42Crunch API Firewall
42Crunch
 
PDF
Secure RESTful Web Services for ASP.NET Web API
Rob Daigneau
 
PDF
Secure Web Services
Rob Daigneau
 
PPTX
2022 APIsecure_From Shift Left to Full Circle - A Pragmatic Approach to Catch...
APIsecure_ Official
 
PDF
Octo API-days 2015
Antoine CHANTALOU
 
PDF
Top 7 wrong common beliefs about Enterprise API implementation
OCTO Technology
 
PPTX
How Open Source Embiggens Salesforce.com
Salesforce Engineering
 
PPS
Hacking Client Side Insecurities
amiable_indian
 
PDF
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
apidays
 
PDF
5 step plan to securing your APIs
💻 Javier Garza
 
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
CA API Management
 
Protecting Your APIs Against Attack & Hijack
CA API Management
 
Meetup callback
Wayne Scarano
 
apidays Australia 2023 - API Security Breach Analysis & Empowering Devs to M...
apidays
 
Checkmarx meetup API Security - API Security top 10 - Erez Yalon
Adar Weidman
 
The Fantastic Voyage to PaaS - Are we there yet? (Cloud Foundry Summit 2014)
VMware Tanzu
 
Takeaways from API Security Breaches Webinar
CA API Management
 
Applciation footprinting, discovery and enumeration
Blueinfy Solutions
 
Past, Present and Future of WebSocket - HTML5DevConf May 2014
Frank Greco
 
Protecting Microservices APIs with 42Crunch API Firewall
42Crunch
 
Secure RESTful Web Services for ASP.NET Web API
Rob Daigneau
 
Secure Web Services
Rob Daigneau
 
2022 APIsecure_From Shift Left to Full Circle - A Pragmatic Approach to Catch...
APIsecure_ Official
 
Octo API-days 2015
Antoine CHANTALOU
 
Top 7 wrong common beliefs about Enterprise API implementation
OCTO Technology
 
How Open Source Embiggens Salesforce.com
Salesforce Engineering
 
Hacking Client Side Insecurities
amiable_indian
 
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
apidays
 
5 step plan to securing your APIs
💻 Javier Garza
 
Ad

More from CloudIDSummit (20)

PPTX
CIS 2016 Content Highlights
CloudIDSummit
 
PPTX
Top 6 Reasons You Should Attend Cloud Identity Summit 2016
CloudIDSummit
 
PDF
CIS 2015 Security Without Borders: Taming the Cloud and Mobile Frontier - And...
CloudIDSummit
 
PDF
Mobile security, identity & authentication reasons for optimism 20150607 v2
CloudIDSummit
 
PDF
CIS 2015 Mobile Security, Identity & Authentication: Reasons for Optimism - R...
CloudIDSummit
 
PDF
CIS 2015 Virtual Identity: The Vision, Challenges and Experiences in Driving ...
CloudIDSummit
 
PDF
CIS 2015 Deploying Strong Authentication to a Global Enterprise: A Comedy in ...
CloudIDSummit
 
PDF
CIS 2015 Without Great Security, Digital Identity is Not Worth the Electrons ...
CloudIDSummit
 
PDF
CIS 2015 Mergers & Acquisitions in a Cloud Enabled World - Brian Puhl
CloudIDSummit
 
PDF
CIS 2015 IoT and IDM in your Mobile Enterprise - Brian Katz
CloudIDSummit
 
PDF
CIS 2015 Practical Deployments Enterprise Cloud Access Management Platform - ...
CloudIDSummit
 
PDF
CIS 2015 What I Learned From Pitching IAM To My CIO - Steve Tout
CloudIDSummit
 
PDF
CIS 2015 How to secure the Internet of Things? Hannes Tschofenig
CloudIDSummit
 
PDF
CIS 2015 The IDaaS Dating Game - Sean Deuby
CloudIDSummit
 
PDF
CIS 2015 SSO for Mobile and Web Apps Ashish Jain
CloudIDSummit
 
PDF
The Industrial Internet, the Identity of Everything and the Industrial Enterp...
CloudIDSummit
 
PDF
CIS 2015 SAML-IN / SAML-OUT - Scott Tomilson & John Dasilva
CloudIDSummit
 
PDF
CIS 2015 Session Management at Scale - Scott Tomilson & Jamshid Khosravian
CloudIDSummit
 
PDF
CIS 2015 So you want to SSO … Scott Tomilson & John Dasilva
CloudIDSummit
 
PDF
CIS 2015 Identity Relationship Management in the Internet of Things
CloudIDSummit
 
CIS 2016 Content Highlights
CloudIDSummit
 
Top 6 Reasons You Should Attend Cloud Identity Summit 2016
CloudIDSummit
 
CIS 2015 Security Without Borders: Taming the Cloud and Mobile Frontier - And...
CloudIDSummit
 
Mobile security, identity & authentication reasons for optimism 20150607 v2
CloudIDSummit
 
CIS 2015 Mobile Security, Identity & Authentication: Reasons for Optimism - R...
CloudIDSummit
 
CIS 2015 Virtual Identity: The Vision, Challenges and Experiences in Driving ...
CloudIDSummit
 
CIS 2015 Deploying Strong Authentication to a Global Enterprise: A Comedy in ...
CloudIDSummit
 
CIS 2015 Without Great Security, Digital Identity is Not Worth the Electrons ...
CloudIDSummit
 
CIS 2015 Mergers & Acquisitions in a Cloud Enabled World - Brian Puhl
CloudIDSummit
 
CIS 2015 IoT and IDM in your Mobile Enterprise - Brian Katz
CloudIDSummit
 
CIS 2015 Practical Deployments Enterprise Cloud Access Management Platform - ...
CloudIDSummit
 
CIS 2015 What I Learned From Pitching IAM To My CIO - Steve Tout
CloudIDSummit
 
CIS 2015 How to secure the Internet of Things? Hannes Tschofenig
CloudIDSummit
 
CIS 2015 The IDaaS Dating Game - Sean Deuby
CloudIDSummit
 
CIS 2015 SSO for Mobile and Web Apps Ashish Jain
CloudIDSummit
 
The Industrial Internet, the Identity of Everything and the Industrial Enterp...
CloudIDSummit
 
CIS 2015 SAML-IN / SAML-OUT - Scott Tomilson & John Dasilva
CloudIDSummit
 
CIS 2015 Session Management at Scale - Scott Tomilson & Jamshid Khosravian
CloudIDSummit
 
CIS 2015 So you want to SSO … Scott Tomilson & John Dasilva
CloudIDSummit
 
CIS 2015 Identity Relationship Management in the Internet of Things
CloudIDSummit
 

Recently uploaded (20)

PPTX
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PDF
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
PDF
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PDF
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
PDF
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PDF
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
PDF
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PDF
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
PDF
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
Practical Applications of AI in Local Government
OnBoard
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 

CIS14: Best Practices You Must Apply to Secure Your APIs

  • 1. Best  Prac*ces  You  Must  Apply  to   Secure  Your  APIs     K.  Sco7  Morrison   SVP  and  Dis+nguished  Engineer      
  • 2. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Here  Is  What  This  Talk  Is  About:   §  The  new  API  threat   –  …and  the  poten+al  rise  of  the  hacker-­‐robber-­‐baron   §  Are  APIs  just  like  the  Web?  Or  are  they  different?   –  Look  at  three  important  areas:   1.  Parameteriza+on   2.  Iden+ty   3.  Cryptography   §  How  to  apply  the  lessons  of  this  talk  
  • 3. ©  2014  CA.  ALL  RIGHTS  RESERVED.   What  is  an  API?   Web  App   API  Server   Web  Client   Mobile  App   An  API  is  a  RESTful   service  
  • 4. ©  2014  CA.  ALL  RIGHTS  RESERVED.   For  Example:   GET  http://services.layer7.com/staff/Scott  
  • 5. ©  2014  CA.  ALL  RIGHTS  RESERVED.   For  Example:   {            "firstName":  ”Sco^  ",            "lastName"  :  ”Morrison",            ”+tle"            :  “CTO”,            "address"    :            {                    "streetAddress":  ”405-­‐1100  Melville",                    "city"                  :  ”Vancouver",                    ”prov"                :  ”BC",                    "postalCode"      :  ”V6E  4A6"            },            "phoneNumber":            [                    {                        "type"    :  ”office",                        "number":  ”605  681-­‐9377"                    },                    {                        "type"    :  ”home",                        "number":  ”604  555-­‐4567"                    }            ]    }   http://services.layer7.com/staff/Scott  
  • 6. ©  2014  CA.  ALL  RIGHTS  RESERVED.   “Sounds  great.  So  what’s  the  problem?”   API  Development  !=     Web  Development   In  Par*cular:     We  need  to  be  wary  of  bad  web   development  prac=ces  migra=ng   to  APIs…  
  • 7. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Problem  Area  #1:  API  Parameteriza=on   §  In  the  tradi+onal  web  world,  parameteriza+on  was  limited   and  indirect   –  Subject  to  the  capabili+es  of  URLs  and  forms     §  APIs  in  contrast  and  offer  much  more  explicit   parameteriza+on     –  The  full  power  of  RESTful  design:  GET,  POST,  PUT,  DELETE     §  (And  don’t  stop  there…  what  about  effects  of  HEAD,  etc)?   §  This  creates  a  greater  poten+al  a^ack  surface   –  Injec+on,  bounds,  correla+on,  and  so  on  
  • 8. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Good  Web  Apps  Constrain     HTTP  Server   App  Server   Database   Web  Client   Objects   Pages   Constraint   Space   Records  
  • 9. ©  2014  CA.  ALL  RIGHTS  RESERVED.   APIs  Are  A  More  Direct  Conduit   HTTP  Server   App  Server   Database   App   Objects   OIen:   •  Self-­‐documen+ng   •  Closely  mapped  to  object  space,   data  structure,  etc   APIs  can  leak   informa*on  
  • 10. ©  2014  CA.  ALL  RIGHTS  RESERVED.   APIs  Also  Increase   A7ack  Surface  
  • 11. ©  2014  CA.  ALL  RIGHTS  RESERVED.   A^acker   Web  App  Server   (browser+APIs)   Vic+m:  Web   Browser   Client   <SCRIPT  …>   1.  API  injects   script  in   3.  Browser  loads   content  with   embedded  script   2.  Server  fails  to   perform  FIEO:  Filter   Input,  Escape  Output       API   Script  Inser*on  is  Just  One  Poten*al  Exploit  
  • 12. ©  2014  CA.  ALL  RIGHTS  RESERVED.   SQL  Injec+on  is  Another   Source:  h^ps://xkcd.com/327/     Exploits of a Mom
  • 13. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Mi*ga*on  Strategy   §  Rigorous  valida+on  of  consumer  supplied  inputs  –  and  API   output!   –  Stronger  typing   –  Sets  and  ranges   –  Avoid  auto-­‐generated  schemas  that  make  everything  a  string   §  Use  schema  valida+on   –  XML  Schema,  RELAX-­‐NG,  Schematron  –  Pick  your  poison   §  Please  no  DTDs!   –  JSON  schema  valida+on   –  Return  of  IDLs:  WADL,  RAML,  Swagger,  etc   Constrain  by  Default  
  • 14. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Mi*ga*on  Strategy  (cont.)   §  Regex  scanning  for  signatures     §  Tune  pa^erns  for  the  API   –  Some+mes  SELECT  is  OK     §  Virus  scanning  of  a^achments   –  Don’t  forget  B64’d  message  content   §  Library,  service,  or  gateway  solu+ons   –  Decoupled  security   –  What  are  the  tradeoffs?  
  • 15. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Mi*ga*on  Strategy  (cont.)   §  Whitelist  tags  if  you  can  (i.e.  where  the  valida+on  space  is   small  and  concise)   –  Not  always  prac+cal   –  (Note  that  I’m  referring  to  whitelis+ng  tags  not  IPs.)     §  Blacklist  dangerous  tags  like  <SCRIPT>   §  Always  perform  FIEO  (Filter  Input,  Escape  Output)   §  Watch  for  fuzzing   –  This  is  a  trend—not  an  event!   §  Learn  more:  h^p://xssed.com  
  • 16. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Problem  Area  #2:  Iden=ty   §  We  had  it  surprisingly  good  in  the  Web  world   –  Browser  session  usually  +ed  to  human   –  Dealing  with  one  iden+ty  is  not  so  tough   §  Security  tokens  abound,  but  solu+ons  are  mature   –  Username/pass,  x.509  certs,  mul+-­‐factor,  Kerberos,  SAML,  etc   –  APIs  rapidly  becoming  more  difficult   §  Non-­‐human  en++es   §  Mul+ple  layers  of  relevant  iden++es   –  Me,  my  a^ributes,  my  phone,  my  developer,  my  provider…  
  • 17. ©  2014  CA.  ALL  RIGHTS  RESERVED.   API  Keys   “An  applica*on  programing  interface  key  (API  key)  is  a  code   generated  by  websites  that  allow  users  to  access  their   applica+on  programming  interface.  API  keys  are  used  to  track   how  the  API  is  being  used  in  order  to  prevent  malicious  use  or   abuse  of  the  terms  of  service.   API  keys  are  based  on  the  UUID  system  to  ensure  they  will  be   unique  to  each  user.”       (Source:  wikipedia  h^p://en.wikipedia.org/wiki/Applica+on_programming_interface_key  )  
  • 18. ©  2014  CA.  ALL  RIGHTS  RESERVED.   For  Example:   GET  http://example.layer7.com/services/staff   ?APIKey=15458617-­‐7813-­‐4a37-­‐94ac-­‐a8e6da6f6405     Seriously?  WTF.  
  • 19. ©  2014  CA.  ALL  RIGHTS  RESERVED.   How  Does  An  API  Key  Map  To  Iden+ty?   15458617-­‐7813-­‐4a37-­‐94ac-­‐a8e6da6f6405     A A  person?   Or  an  app?   It  is  en+rely  inconsistent  
  • 20. ©  2014  CA.  ALL  RIGHTS  RESERVED.   The  Iden+ty  Profile   Increasingly  we  need  to  move  toward  large  number  of  claims   (mul+ple  iden+ty  profile)     •  appID   •  userID   •  deviceID     •  User attributes •  Roles •  Geo location •  IP •  User agent •  Time of day •  etc
  • 21. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Where  Did  API  Keys  Come  From?   §  API  keys  came  from  Google  APIs  like  maps,  early  Yahoo  APIs,   early  Twi^er  APIs  etc.     –  Originally  meant  for  loose,  non-­‐authorita+ve  tracking   –  Rate  limits,  approximate  usage  profiling   §  Google  geocoding  v3.0  API  deprecates  API  keys   –  Uses  IP  instead  to  track  and  thro^le   –  This  has  its  own  set  of  problems   §  IP  address  spoofing   §  Problems  with  legi+mate  clients  like  cloud  servers   §  Google  Premier  used  a  public  client_id  and  requires  signed   URLs   –  (Strips  domain  leaving  only  path  and  query  parameters)    
  • 22. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Bo^om  Line:  The  API  Key  Was  Never  Meant  To  Be   Authorita+ve   §  Strange  hybrid  of  HTTP’s  USER-­‐AGENT  and  session   con+nuity   §  OK  only  for  general  tracking   §  Anything  that  ma^ers  should  use  real  security  tokens   – Anywhere  where  iden+ty  is  important:   §  APIs  that  provide  access  to  sensi+ve  data   §  APIs  that  change  things  that  ma^er   §  APIs  that  charge  for  use   §  etc.  
  • 23. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Move  to  OAuth  For  People  
  • 24. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Mi+ga+on   §  Protect  the  tokens!   §  HTTPS  everywhere   –  This  is  another  web  design  cultural  issue   –  It’s  just  not  that  expensive  any  more   §  OAuth  for  people   §  APIKeys  for  apps   –  Assume  this  is  non-­‐authorita+ve   §  Consider  behavioral  iden+fica+on  of  apps   –  Apps  are  rigid  in  their  API  flow   Important!
  • 25. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Problem  Area  #3:  Cryptography  and  PKI   §  Cryptography  is  reasonably  mature  on  the  web   –  Surprisingly  limited  use  pa^erns   –  SSL/TLS   –  Very  li^le  tough  PKI  (like  client-­‐side)   §  So  what’s  wrong  with  APIs?  
  • 26. ©  2014  CA.  ALL  RIGHTS  RESERVED.   It’s  Like  We  Forgot  Everything  We  Knew   §  Emailing  keys   –  API,  shared  secrets,  etc.   §  Bad  storage  schemes   –  Security  through  obscurity   –  Toy  ciphers   §  No  life  cycle  management   –  Limits  on  use   –  Time  limits   –  Revoca+on   –  Audit  
  • 27. ©  2014  CA.  ALL  RIGHTS  RESERVED.   The  Issues   §  Key  management   –  Especially  across  farms   §  Nobody  takes  web  PKI  seriously   –  CRLs  and  OCSP  aren’t  much  good  in  the  browser  world   §  Fail  open—seriously     §  CA  trust  breakdown   –  Indian  NIC  issue  July  2014   §  Subordinate  CA  issued  fraudulent  Google  and  Yahoo  certs  
  • 28. ©  2014  CA.  ALL  RIGHTS  RESERVED.   The  Issues  (cont.)   §  Cipher  suite  restric+ons   –  Avoiding  downgrades   §  Client-­‐side  cer+ficate  authen+ca+on  is  hard   §  The  alterna+ves  for  parameter  confiden+ality  and/or  integrity   are  hard:   –  XML  encryp+on  is  s+ll  there   §  Not  for  the  faint  of  heart   –  OAuth  1.0  gave  you  parameter  signing   §  Only  op+onal  in  2.0   –  JWT  signing  and  encryp+on  emerging  
  • 29. ©  2014  CA.  ALL  RIGHTS  RESERVED.   SSL  Everywhere   (it’s  cheap)  
  • 30. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Mi+ga+ons   §  SSL  everywhere   §  Use  real  PKI   –  I  know  it’s  painful   §  Use  HSMs  to  protect  keys  that  really  ma^er   §  Otherwise  use  real  key  material  protec+on  schemes   –  PKCS  #12,  etc   –  Libraries  abound   §  You  must  do  CRLs  and  OCSP  for  APIs  
  • 31. ©  2014  CA.  ALL  RIGHTS  RESERVED.   Where  Does  This  All  Leave  Us?   §  SOAP,  the  WS-­‐*  stack  dealt  with  much  of  this  very  rigorously   –  But  it  was  just  too  hard.     §  We  need  to  learn  from  this,  but  make  it  easier  to  implement   §  Here’s  how…  
  • 32. ©  2014  CA.  ALL  RIGHTS  RESERVED.   How  Do  I  Apply  This  Today?   §  Use  SSL  for  all  API  transac+ons   –  Hides  many  sins   §  Confiden+ality,  integrity,  replay,  binding  token+message,  server   authen+ca+on,  etc.   §  Use  real  PKI   –  Yes,  it’s  hard   –  But  you  can’t  skimp  here   §  Use  OAuth  for  distributed  authen+ca+on   §  Validate  all  data  going  in  and  out  of  an  API   §  Use  real  frameworks,  don’t  reinvent  
  • 33. SVP  and  Dis+nguished  Engineer   Sco^[email protected]   @KSco^Morrison   h^p://KSco^Morrison.com   linkedin.com/KSco^Morrison     ca.com   K.  Sco7  Morrison