Extending Oauth2.0 for Kerberos-Like Authentication to Avoid Internet Phishing Attacks
Total Page:16
File Type:pdf, Size:1020Kb
Anoop Vijayan Extending OAuth2.0 for Kerberos-like authentication to avoid Internet phishing attacks Master thesis in Mobile Technology and Business Faculty of Information Technology University of Jyvaskyla Department of Computer Science and Information Systems Author: Anoop Vijayan Contact Information: [email protected] Supervisor(s): Timo Hamäläinen Department of Computer Science and Information Systems University of Jyvaskyla Reviewer(s): Timo Hamäläinen Department of Computer Science and Information Systems University of Jyvaskyla Title: Extending OAuth2.0 for Kerberos-like authentication to avoid Internet phishing attacks Project: Master thesis in Mobile Technology and Business Page count: 72 I ABSTRACT The combined use of OpenID and OAuth for authentication and authorization is gaining popularity day by day in Internet. Because of its simplicity to understand, use and robustness, they are used in many domains in web, especially where the apps and user base are huge like social networking. Also it reduces the burden of typing the password every time for authentication and authorization especially in hand-held gadgets. After a simple problem scenario discussion, it is clear that the OpenID+OAuth combination has some drawbacks from the authentication perspective. The two major problems discussed here include problems caused due to transfer of user credentials over Internet and complexity in setting up of two protocols separately for authentication and authorization. Both the problems are addressed by extending OAuth2.0. By using Kerberos-like authentication, the user has the possibility of not passing the credentials over Internet. It is worth to note that, OAuth2.0 also uses some kind of tokens for authorizations similar to Kerberos. It could be seen that extending OAuth2.0 to perform authentication removes the need for OpenID and its problems completely. Keywords: OpenID, OAuth, Kerberos, Internet phishing, authentication II GLOSSARY OpenID Open standard authentication OAuth Open Authorization OP Open Identity Provider/OpenID provider/Identity Provider RP Relaying Party SP OAuth Service Provider TCP/IP Transmission Control Protocol/Internet Protocol HTTP Hypertext transfer protocol URL Uniform resource locator AS Authentication Server TGS Ticket Granting Server TGT Ticket Granting Ticket KDC Key Distribution Center REQ Kerberos based Request RES Kerberos based Response UCS Unicode character set MIT Massachusetts Institute of Technology K-OAuth Kerberos OAuth JSON JavaScript Object Notation AJAX Asynchronous JavaScript and XML UTF-8 Unicode Transformation Format – 8-bit AE Authentication and Authorization entity TLS Transport Later Security CC Combined Consumer (RP+OAuth consumer) CP Combined Provider (OP+SP) MAC Media Access Control XOR Exclusive OR III ACKNOWLEDGEMENTS During the course of this work, I have had assistance and support from many people. First and foremost, I wish to express my profound gratitude to Professor Timo Hamalainen for his highly proactive supervision of the research, decisive guidance, great attention and care, insightful comments, and extensive assistance. His reassuring approach permitted me to achieve the objectives which I set out for. I want to express special gratitude to Jari Kellokoski for his guidance and support during the write up. His encouragement and support enabled me to come up with a paper that expresses my ideas fluidly, appropriately and in style, while conforming to the conventions of the Faculty of Information Technology at the University of Jyvaskyla. I would like to thank the Faculty of Information Technology, especially the Mobile Technology and Business master programme coordinators and creators for giving me the opportunity to study at University of Jyvaskyla. Finally, an honourable mention goes to our families, especially my wife and friends for their understandings and supports on us in completing this project. Without whom I would have faced many difficulties. I am grateful to all the people of Faculty of Information Technology who either directly or indirectly enabled me to carry out this research. Anoop Vijayan Jyväskylä 2012 IV CONTENTS 1. Introduction .................................................................................................................. 1 1.1 Research Problem ...................................................................................................... 2 1.2 Related work ............................................................................................................. 3 2. OpenID and Authentication ............................................................................................ 5 2.1 Authentication in OpenID .......................................................................................... 6 2.2 OpenID in detail ........................................................................................................ 8 2.2.1 OpenID Data Formats ............................................................................................ 8 2.2.2 OpenID Communication Types ............................................................................... 9 2.2.3 Initiation and Discovery ....................................................................................... 11 2.2.4 Requesting Authentication .................................................................................... 12 2.2.5 Responding to Authentication Requests ................................................................. 14 2.2.6 Verifying Assertions ............................................................................................ 14 2.2.7 Problems with OpenID ......................................................................................... 15 3. OAuth and Authorization ............................................................................................. 18 3.1 OAuth Security ....................................................................................................... 18 3.2 OAuth 2.0 ............................................................................................................... 19 3.3 Authorization with OAuth2.0 ................................................................................... 20 3.3.1 Simplified explanation – three legged dance ........................................................... 20 3.4 OAuth in detail ........................................................................................................ 21 3.4.1 Registration ......................................................................................................... 22 3.4.2 Endpoints ............................................................................................................ 22 3.4.3 Obtaining Authorization ....................................................................................... 23 3.4.4 Issuing and refreshing an access token ................................................................... 29 3.4.5 Accessing protected resources ............................................................................... 31 3.4.6 Extensibility ........................................................................................................ 32 4. OpenID and OAuth combination .................................................................................. 34 4.1 Example case with OpenID+OAuth .......................................................................... 35 5. Problem Scenarios ...................................................................................................... 38 V 5.1 Scenario 1: Internet phishing in OpenID .................................................................... 38 5.2 Scenario 2: OpenID and OAuth complexity ............................................................... 41 6. Kerberos and authentication ......................................................................................... 42 6.1 Kerberos in detail .................................................................................................... 42 6.1.1 Kerberos Ticket ................................................................................................... 42 6.1.2 Kerberos principal ............................................................................................... 43 6.1.3 Kerberos Ticket management ................................................................................ 44 6.2 Kerberos negotiations .............................................................................................. 46 6.3 Kerberos limitations ................................................................................................ 47 7. Evolution of K-OAuth (Kerberos OAuth) ...................................................................... 48 7.1 Example case with K-OAuth .................................................................................... 49 7.2 K-OAuth in detail .................................................................................................... 51 7.2.1 K-OAuth Setup .................................................................................................... 51 7.2.2 K-OAuth slave .................................................................................................... 51 8. K-OAuth explained ..................................................................................................... 52 8.1 K-OAuth transaction ................................................................................................ 52 8.1.1 K-OAuth requests and responses ..........................................................................