Resource Server. Perancangan Dan Implementasi Resource Server Dan Authorization Server Menggunakan Teknologi Otentikasi Oauth 2

DESIGN AND IMPLEMENTATION OF RESOURCE SERVER AND AUTHORIZATION SERVER USING OAUTH 2 AUTHENTICATION TECHNOLOGY ABSTRACT OAuth is an entity that can grant access to a protected resource. With OAuth someone can share the data with others such as photos, videos and posts directly so as to identify and facilitate the process of recognition and information retrieval. The purpose of this research is to design and implement procedures work mechanism involving technology OAuth 2 authorization server is a server resource itself in the authentication and authorization of a client credential. In this study, the three applications that are single sign on, consisting of 3 pages sign in OAuth 2 authentication based on the owner of the resource resource owner by implementing OAuth 2 authentication work process. Authentication via OAuth 2 Authorization Server will validate the role of client credential after its existence on the basis of the data, in the process by issuing an authorization page Authorize app to be directed to the main page of any web application, respectively. Final authorization of a client credential truth is generated an access token that works on the url uniform resource locator on each web application. Keywords: Authentication and Authorization, Authorization Server, OAuth

2, Resource Server.

Universitas Sumatera Utara DAFTAR ISI Hal. PERSETUJUAN ii PERNYATAAAN iii PENGHARGAAN iv ABSTRAK vi ABSTRACT vii DAFTAR ISI viii DAFTAR TABEL x DAFTAR GAMBAR xi BAB 1 PENDAHULUAN 1.1 Latar Belakang 1 1.2 Rumusan Masalah 2 1.3 Batasan Masalah 2 1.4 Tujuan Penelitian 3 1.5 Manfaat Penelitian 3 1.6 Metode Penelitian 3 1.7 Sistematika Penulisan 4 BAB 2 TINJAUAN PUSTAKA 6 2.1 Pengenalan OAuth 6 2.2 OAuth 1.0 7 2.3 OAuth 2.0 11 2.4 Hibah Otorisasi Authorization Grant 13 2.4.1 Authorization Code 13 2.4.2 Implicit 13 2.4.3 Resource Owner Password Credential 14 2.4.4 Client Credential 14 2.5 Access Token dan Refresh Token 14 2.5.1 Access Token 14 2.5.2 Refresh Token 15 2.6 Jenis Client Profile 15 2.6.1 Server Side Web Application 15 2.6.2 Client Side User Agent Based Application 15 2.6.3 Resource Owner Password Flow 16 2.7 Workflow Client Profile 16 2.7.1 Server Side Web Application Flow 16 2.7.2 Client Side Web Application Flow 18 2.7.3 Resource Owner Password Flow 19 2.8 Proses Roles of Authetication 20 2.8.1 Web Server Application 20 2.8.2 Browser Based Application 24 2.9 Sistem Informasi 26 Universitas Sumatera Utara 2.9.1 Pengertian Sistem Informasi 26 2.9.2 Pengertian Informasi 26 2.9.3 Konsep Sistem Informasi 27 BAB 3 ANALISIS DAN PERANCANGAN SISTEM 28 3.1 Analisis Permasalahan 28 3.2 Analisis Kebutuhan Sistem 29 3.3 Analisis Teknologi OAuth 2 31 3.4 Perancangan Sistem 34 3.4.1 Deskripsi Sistem 34 3.4.1.1 Fungsi Utama 34 3.4.1.2 Batasan 35 3.4.2 DFD Data Flow Diagram 35 3.4.2.1 Diagram Konteks 35 3.4.2.2 Data Flow Diagram Level 1 37 3.4.2.3 Data Flow Diagram Level 2 39 3.4.3 Perancangan Basis Data 40 3.4.4 Flowchart Sistem 41 3.4.4.1 Flowchart Sistem Aplikasi Secara Umum 42 3.4.4.2 Flowchart Otentikasi OAuth 2 43 3.4.5 Perancangan Tampilan 44 3.4.5.1 Rancangan Halaman Tambah Client 45 3.4.5.2 Rancangan Halaman Sign-In 46 3.4.5.3 Rancangan Halaman Utama 47 3.4.5.4 Rancangan Halaman Menu dan Harga 48 3.4.5.5 Rancangan Halaman Reservasi 49 3.4.6 Pseudocode 50 BAB 4 IMPLEMENTASI DAN PENGUJIAN 4.1 Implementasi Sistem 56 4.1.1 Spesifikasi Perangkat Lunak dan Perangkat Keras 56 4.1.2 Implementasi Aktivitas Menambah Client Baru 56 4.1.3 Implementasi Aktivitas Sign In 57 4.1.4 Implementasi Proses Otentikasi Teknologi OAuth 2 58 4.1.5 Implementasi Reservasi Pada Web Aplikasi Cafe 60 4.2 Pengujian Sistem 61 4.2.1 Pengujian Black Box 61 4.2.2 Pengujian Tambah Client Baru 63 4.2.3 Pengujian Sign In dengan Otentikasi OAuth2 65 4.2.4 Pengujian Reservasi 72 BAB 5 KESIMPULAN DAN SARAN 75 5.1 Kesimpulan 75 5.2 Saran 76 Daftar Pustaka 77 Universitas Sumatera Utara DAFTAR TABEL Hal. 2.1 Tugas dan Fungsi 4 empat Komponen OAuth 12 2.2 Keterangan Server Side Web Application Flow 17 2.3 Keterangan Server Side Web Application Flow 18 2.4 Keterangan Resource Owner Password Flow 19 3.1 Keterangan Proses Kerja Teknologi OAuth 2 32 3.2 Keterangan Proses Schema Jaringan OAuth 2 33 3.5 Tabel Reservasi 40 3.6 Tabel Clients 40 3.7 Tabel Tokens 41 3.8 Kode Program Untuk Membuat Kode OAuth 2 48 4.1 Spesifikasi Perangkat Pada Aplikasi 56 4.2 Tahapan Pengujian Pada Sistem 61 4.3 Daftar Client ID dan Client Secret 66 4.4 Daftar Client ID dan Client Secret Dari Basis Data Clients 66 4.5 Akses Token Yang Dihasilkan Dari Beberapa Client Yang Berbeda 71 4.6 Data Akses Token Yang Berasal Dari Basis Data Tokens 71 Universitas Sumatera Utara DAFTAR GAMBAR Hal. 2.1 Tiga Peran Aktif pada OAuth 1.0 8 2.2 Otorisasi Akses Layanan bit.ly Menggunakan Account Twitter.com 9 2.3 Lalu Lintas Transaksi OAuth 1.0 10 2.4 Antar Muka Layanan Bit.ly 10 2.5 Mekanisme Kerja OAuth 2 12 2.6 Server Side Web Application Flow 16 2.7 Client Side User Web Application Flow 18 2.8 Resource Owner Password Flow 19 2.9 Proses Otentikasi Web Server Application 20 2.10 Proses Otentikasi Web Server Application -2 21 2.11 Proses Otentikasi Web Server Application- 3 22 2.12 Auth Code dari Google API 22 2.13 Halaman Auth Code dari Google API 23 2.14 Proses Otentikasi Web Server Application - 4 23 2.15 Proses Otentikasi Web Sever Application - 5 24 2.16 Proses Otentikasi Browser Based Application 25 2.17 Proses Otentikasi Browser Based Application- 2 25 2.18 Proses Otentikasi Browser Based Application- 3 26 2.19 Proses Otentikasi Browser Based Application - 4 26 3.1 Diagram Ishikawa Analisis Masalah 29 3.2 Proses Kerja Teknologi OAuth 2 Pada Aplikasi Web 31 3.3 Schema Jaringan OAuth 2 33 3.4 DFD Level 0 36 3.5 Data Flow Diagram Level 1 38 3.6 Data Flow Diagram Level 2 40 3.6 Flowchart Sistem Aplikasi Secara Umum 43 3.7 Flowchart Otentikasi OAuth 2 44 3.8 Rancangan Tampilan Halaman Tambah Client 46 3.9 Rancangan Tampilan Halaman Sign-In 47 3.10 Rancangan Tampilan Halaman Utama 48 3.11 Rancangan Tampilan Halaman Menu dan Harga 49 3.12 Rancangan Tampilan Halaman Reservasi 50 4.1 Form Pendaftaran Client Baru 57 4.2 Form Aktivitas Sign In Web SSO 57 4.3 Form Aktivitas Sign In Web 2 SSO 58 4.4 Form Aktivitas Sign In Web 3 SSO 58 4.5 Halaman Authorize App 59 4.6 Akses Token Dihasilkan 59 4.7 Halaman Form Reservasi 60 4.8 Halaman Tambah Client Baru 63 4.9 Pesan Error Halaman Tambah Client Baru 64 4.10 Pesan Sukses Halaman Tambah Client Baru 64 Universitas Sumatera Utara 4.11 Pengujian Tambah Client Baru Menggunakan Add-ons Firebug 65 4.12 Halaman Aktivitas Sign In 66 4.13 Pesan Error - 1 Halaman Aktivitas Sign In 67 4.14 Pesan Error - 2 Halaman Aktivitas Sign In 67 4.15 Pesan Error Menggunakan Add-ons Firebug 68 4.16 Form Sign In Diisi Dengan Benar 69 4.17 Halaman Authorize App Menggunakan Data Client-1 69 4.18 Pengujian Form Sign-in Menggunakan Add-ons Firebug 70 4.19 Akses Token Yang Dihasilkan Pada Halaman Utama 70 4.20 Form Aktivitas Reservasi 72 4.21 Form Aktivitas Reservasi Saat Diisi 73 4.22 Balasan Dari Aplikasi Sistem Perihal Reservasi 74 Universitas Sumatera Utara DAFTAR LAMPIRAN Hal. A. Listing Program A-1 B. Curriculum Vitae B-1 Universitas Sumatera Utara ABSTRAK OAuth adalah entitas yang dapat memberikan hak akses terhadap sumber yang dilindungi protected resource. Dengan OAuth seseorang dapat berbagi data dengan orang lain seperti foto, video dan tulisan secara langsung sehingga dapat mengidentifikasi dan memudahkan dalam proses pengenalan dan pencarian informasi. Tujuan penelitian ini adalah merancang dan menerapkan prosedur mekanisme kerja teknologi OAuth 2 dengan melibatkan adanya otorisasi server yang merupakan sumber daya server itu sendiri dalam melakukan otentikasi dan otorisasi credential dari seorang client. Pada penelitian ini digunakan 3 tiga aplikasi yang bersifat single sign on, terdiri atas 3 halaman sign-in berbasis otentikasi OAuth 2 dari pemilik sumber daya Resource Owner dengan menerapkan proses kerja otentikasi OAuth 2. Otentikasi OAuth 2 lewat peran Authorization Server akan memvalidasi credential dari client seusai keberadaannya pada basis data, di proses dengan mengeluarkan sebuah halaman otorisasi Authorize App untuk diarahkan ke halaman utama setiap aplikasi web masing-masing. Otorisasi akhir dari kebenaran credential seorang client adalah di hasilkan sebuah akses token yang bekerja pada url uniform resource locator pada masing - masing aplikasi web. Kata Kunci: Authorization Server, OAuth 2, Otentikasi dan Otorisasi, Resource Server. Universitas Sumatera Utara DESIGN AND IMPLEMENTATION OF RESOURCE SERVER AND AUTHORIZATION SERVER USING OAUTH 2 AUTHENTICATION TECHNOLOGY ABSTRACT OAuth is an entity that can grant access to a protected resource. With OAuth someone can share the data with others such as photos, videos and posts directly so as to identify and facilitate the process of recognition and information retrieval. The purpose of this research is to design and implement procedures work mechanism involving technology OAuth 2 authorization server is a server resource itself in the authentication and authorization of a client credential. In this study, the three applications that are single sign on, consisting of 3 pages sign in OAuth 2 authentication based on the owner of the resource resource owner by implementing OAuth 2 authentication work process. Authentication via OAuth 2 Authorization Server will validate the role of client credential after its existence on the basis of the data, in the process by issuing an authorization page Authorize app to be directed to the main page of any web application, respectively. Final authorization of a client credential truth is generated an access token that works on the url uniform resource locator on each web application. Keywords: Authentication and Authorization, Authorization Server, OAuth

2, Resource Server.