Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AuthN & AuthZ with distributed systems

thanhgit
April 29, 2022

AuthN & AuthZ with distributed systems

- Understanding about AuthN & AuthZ
- Understanding about keycloak solution
- Demo AuthN & AuthZ with keycloak, gitlab, kong, backend apps

thanhgit

April 29, 2022
Tweet

More Decks by thanhgit

Other Decks in Technology

Transcript

  1. Why do you need authenticate and authorize ? - About

    user: - Protect your data (sensitive data) with user identity (authentication) - Ensure that your business operate in security way - About system: - Data don’t affect each other between tenants in application - Each user type have behaviours differently perspective roles - Interact service-to-service, user-to-service in security way ...
  2. Available solution - Self-built as a service or apart of

    software - Pros: full control - Cons: waste time - Using 3rd party such as Facebook, google+, … - Pros: quickly development - Cons: dependent to external organization - Buy enterprise solution: cisco, ibm, oracle, ... - Pros: full support, utility - Cons: high cost - Self-host open source based authorization server: keycloak, ory/hydra, … - Pros: can customize - Cons: have complexity to develop and operate
  3. Technical requirements - Single sign on (SSO) such as google,

    gitlab, sentry, … - Basic authentication - Authorize webs, apps
  4. Appropriate solution - Keycloak as IAM services - Keycloak support

    for integrate for kong api gateway, app, ... - Keycloak support for Single Sign-On with google for gitlab, sentry, mastermost, …
  5. Demo - Demo authN with Single Sign-On - Sequence diagram

    - Login gitlab with basic authentication (username / password) - Login gitlab with 3rd party (google) - Demo authZ - Sequence diagram - Designing roles - Assign user to role - Call api with postman
  6. Bonus: OAuth 2.0 pattern - Authorization code grant flow -

    Implicit grant flow - Resource owner password credentials grant flow - Client credentials grant flow