Atilla Tanrikulu

I am an experienced software engineer and architect living in Germany. I’m passionate about distributed scalable enterprise web-based microservices/applications and delivering great user experiences. I have created some amazing enterprise-level applications that many people have used and hopefully enjoyed.

Articles

Java Quick Reference Apache Kafka Tutorial Guvenli Kod Gelistirme Making an Enterprise Scale Angular Project Step by Step Nightly SQL Server Database Backup with command line batch file and windows scheduler AOP Framework without proxy pattern IdentityServer Nedir Middleware Pattern With Csharp And Javascript Docker most used commands Online Proje Dokumantasyonu, Docker, Nginx, mdwiki How to use Github Pages for static websites Inheritance with JavaScript, EC6 (ECMAScript 6, ECMAScript 2015) Object oriented javascript and Inheritance Singleton Pattern with Javascript Factory Pattern with Javascript Open terminal here mac os x service IdentityServer4-Angular-6-integration JMater notlari, kurulum ve kullanim Learn Jekyll in 12 Steps Make Mac Application with Automater from sh script Make spotlight index markdown or code files OAuth 2.0 Nedir (RFC6749) Using Custom CSS and Custom JavaScript to an Angular Project Cross Platform Desktop Application With .Net Core 2x and Angular 6x front-end projects with nodejs gulp bower yeoman and angularjs Host Asp.Net Core on Linux with Apache Redis kurulumu ve ayarlari Useful Mac OS Apps Choosing internet connection on multiple interface windows Name Server Kurulumu How to define domain name for your dynamic IP SQL table data compare, and prepare insert satements Useful Git Commands TFS ile Otomatik deployment yapmak Spring Boot Tutorial Sql server icin maliyetli sorgularin tespit edilmesi Arama Motoru Optimizasyonu (SEO) My installed mac apps

OAuth 2.0 Nedir (RFC6749)

  • OAuth2.0, bir yazilim, yada yazilim kutuphanesi degildir, IETF tarafindan standartlari belirlenen bir protokoldur.
  • OAuth2.0, Bir Http sevise, disardaki bir uygulamanin erisimini denetlemeyi mumkun kilar.
  • OAuth2.0, Resource owner (Kaynak sahibi) adina, http servise erisimin denetlenmesi kurallarini standartlastirmistir.,
  • OAuth2.0, Http servis ve dis uygulama arasindaki yetki duzenlemesini standartlastiran bir spesifikasyondur.
  • OAuth2.0, Bir onceki surumu OAuth 1.0 dir (RFC5849)

  • OAuth, client ile resource owner katmanlarini birbirinden ayirir. araya bir kimlik dogrulama katmani sokar.
  • Geleneksel yontemde oldugu gibi, resource owner’un saglamis oldugu kimlik bilgileri ile resource server’a erisim saglanmaz, bunun yerine Authorization server’un saglamis oldugu token ile erisim saglanir.

    OAuth 2.0 da Roller

  • Resource Owner: Yetkilendirilen bilginin sahibidir, yetki verme islemini yapar.
  • Resource Server: Yetkilendirilen bilgiyi sunan
  • Client : Yetkilendirilen bilgiye erism isteyen
  • Authorization Server: Yetkilendirme anahtarlarini uretir.

Resource server ve Authorization server. rolleri arasinda gecen etkilesim bu spesifikasyonun disinda kalir.
bu etkilesim ister ayni application icinde, isterse farkli applicationlar olarak gelistirilebilir.

Protokol Akisi

+--------+                               +---------------+
|        |--(A)- Authorization Request ->|   Resource    |
|        |                               |     Owner     |
|        |<-(B)-- Authorization Grant ---|               |
|        |                               +---------------+
|        |
|        |                               +---------------+
|        |--(C)-- Authorization Grant -->| Authorization |
| Client |                               |     Server    |
|        |<-(D)----- Access Token -------|               |
|        |                               +---------------+
|        |
|        |                               +---------------+
|        |--(E)----- Access Token ------>|    Resource   |
|        |                               |     Server    |
|        |<-(F)--- Protected Resource ---|               |
+--------+                               +---------------+
  • (A) Client, Resource owner dan yetkilendirilme isteginde bulunur. resource owner yetkilendirme istegine yukarida oldugu gibi direk olarak cevap verebilir, fakat Authorization server’un araci olmasi de tercih edilebilir.

  • (B) Client, yetkilendirme cevabini alir, bu cevap icinde resource owner’in izni bulunur bu izin, OAuth2 standartlarinda 4 farkli tip ile tanimlanabilir, bunun yaninda Authorization server in destekledigi ek tanimlamalar da eklenebilir.
  • (C) Client, yetkilendirme iznini kullanarak, Authorization server a giris yapar (authentication), ve Authorization server dan token isteginde bulunur.
  • (D) Authorization server, client i kimlik dogrulamasindan gecirir, yetkilendirme iznini dogrular ve token verir.
  • (E) Client, token i kullanarak, Resource server dan yetkilendirilmis icerigi ister.
  • (F) Resource server, token i dogrular ve icerigi verir.

  • Authorization server in araci olarak kullanilmasi yontemdir
       +----------+
       | Resource |
       |   Owner  |
       |          |
       +----------+
            ^
            |
           (B)
       +----|-----+          Client Identifier      +---------------+
       |         -+----(A)-- & Redirection URI ---->|               |
       |  User-   |                                 | Authorization |
       |  Agent  -+----(B)-- User authenticates --->|     Server    |
       |          |                                 |               |
       |         -+----(C)-- Authorization Code ---<|               |
       +-|----|---+                                 +---------------+
         |    |                                         ^      v
        (A)  (C)                                        |      |
         |    |                                         |      |
         ^    v                                         |      |
       +---------+                                      |      |
       |         |>---(D)-- Authorization Code ---------'      |
       |  Client |          & Redirection URI                  |
       |         |                                             |
       |         |<---(E)----- Access Token -------------------'
       +---------+       (w/ Optional Refresh Token)
    

Authorization grant (yetkilendirme izni)

Yetkilendirme izni icinde, resource owner in verdigi izin belirtilir. Bu izin token almak icin kullanilir. OAuth2 4 farkli izin tipi tanimlar,

  • 1- Authorization code
  • 2- Implicit
  • 3- Resouce owner password credentials
  • 4- Client credentials

  • OAuth2, standarlarina uygun bir web uygulamasi gelistirilir ise, OAuth2 destekleyen tum servislerle entegrasyon yapilabilir.

Authorization Code

Authorization’un client tarafindan direk olarak resource owner dan istenmesi yerine, Authorization server araci olarak kullanilarak resource owner dan elde edilir. client bu kodu Authorization server dan elde eder

Date: 2017-10-23 10:20:00 +0000