beveiliging en rest services
DESCRIPTION
Beveiliging en REST services tijdens Engineering World 2012.TRANSCRIPT
Beveiliging en REST services
Maurice de Beijer
Waar gaan we het over hebbenWaarom beveiligen we REST servicesHTTP SecurityToken based security
Wie ben ikMaurice de Beijer.The Problem Solver.Microsoft CSD MVP.DevelopMentor instructor.Twitter: @mauricedb of @HTML5SupportNLBlog: http://msmvps.com/blogs/
theproblemsolver/default.aspxWeb:http://www.HTML5Support.nlE-mail: [email protected]
Authentication
Authentication is the act of confirming the truth of an
attribute of a datum or entity.
Authorization
Authorization is the function of specifying access rights to
resources
Confidentiality
Confidentiality is an ethical principle. In ethics some types of communication between a person and one of these professionals are
"privileged" and may not be discussed or divulged to third
parties.
HTTP SecurityHTTPS en SSL/TLSBasic AuthenticationForms AuthenticationIntegrated Windows Authentication
HTTPS en SSL/TLSZorgt er alleen voor dat het transport veilig is
Point to PointZegt niets over de client of server
Hoe veilig is https://ƤayƤal.com?
Basic AuthenticationEen van de meest eenvoudige HTTP
standaardsMaar wel effectief!
Usernaam en wachtwoord staat in de header van het request Base64 encoded => gebruik HTTPS!
GET /private/index.html HTTP/1.1Host: localhostAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Forms AuthenticationWerkt met een Forms Authentication Cookie
Het cookie gaat mee met elk HTTP requestHou rekening met HTTP Session hijacking
Gebruik HTTPS bij elk request!Niet alleen bij het inloggen
Integrated Windows AuthenticationSingle Sign On
Werkt net als in een websitePerfect voor gebruik binnen een AD domain
Maar lastig met gebruikers daar buiten
Token based securityOAuthAmazon's S3 AuthenticationFederated security
Three legged OAuthPopulair bij veel consumer sites
TwitterGoogleFacebook
Er zijn 3 entiteiten bijbetrokken
Zelden nuttig bij B2B
Three legged Oauth flow
Two legged Oauth flow
Amazon's S3 AuthenticationGebruikt een HMAC
Hash Message Authentication CodeWordt berekend over het request met een
secret keyDe server berekent dezelfde HMAC
Zowel voor authentication als message tamperingGebruik HTTPS voor confidentiality
GET /photos/puppy.jpg HTTP/1.1Host: johnsmith.s3.amazonaws.comDate: Mon, 26 Mar 2007 19:37:58 +0000
Authorization: AWS AKIAIOSFODNN7EXAMPLE:frJIUN8DYpKDtOLCwo//yllqDzg=
S3 Authentication - Client
S3 Authentication - Server
Federated securityMaakt gebruik van Security Token Service
(STS)De STS doet de authenticatie van de gebruikerDe service ziet alleen de tokens van de STS
Kan bv met Windows Azure Access Control ServiceEr worden Simple Web Tokens (SWT) gebruikt
Werkt prima samen met Windows Identity Foundation (WIF)
Federated security
ConclusieHTTP Security
Eenvoudig en in veel gevallen voldoendeWerkt samen met de beveiliging van een
websiteToken based security
OAuth is vaak niet nodig bij B2BFederated security kan met SWT tokens
Bijvoorbeeld via ACS en WIF