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

Admin Identity & SSO: WIP Demo

Admin Identity & SSO: WIP Demo

Sergey Ponomarev

September 30, 2020
Tweet

More Decks by Sergey Ponomarev

Other Decks in Programming

Transcript

  1. Admin Identity & SSO GOALS: RECAP Stronger security requirements for

    internal actors (HR, IT, OPS, etc) Federated authorisation through SSO 3
  2. Admin Identity & SSO PRINCIPLES Operations interruption is not acceptable

    Any change requires a rollback plan Changes in small incremental chunks 4
  3. Admin Identity & SSO HIGH-LEVEL PLAN Phase 1. Decouple internal

    actors from User model aka “Admin Identity MVP” Phase 2. Implement SSO for Admins with Okta 5
  4. Admin Identity & SSO PLAN Auth: Introduce Admin entity +

    CRUD Auth: Enforce stronger security (during the interim period) preserving email/password authentication Auth: Admin becomes an actor in the Auth Admin Area Monolith: Decouple Admin Portal actors from User data 8
  5. Admin Identity & SSO Cover all OAuth flows with tests.

    100% code path coverage required. 10 AUTH SERVICE: CHALLENGES
  6. Admin Identity & SSO Stronger security requirements 11 AUTH SERVICE:

    CHALLENGES Required @chowbus.com account // AR validation Password complexity // devise-security gem Mandatory password rotation // devise-security gem Session expiration // devise’s Timeoutable JWT expiration // Doorkeeper magic
  7. Admin Identity & SSO Support flexible JWT expiration 12 AUTH

    SERVICE: CHALLENGES now incorporated as Application#token_expires_in setting Make sure all OAuth clients send client_id for refresh_token flow Web iOS Android
  8. Admin Identity & SSO Decouple Admin Portal for persisted User

    14 MONOLITH: CHALLENGES current_admin becomes ephemeral. Everything is coming from JWT data. Current Administered Region is stored in Rails session Migrate a bunch of references (approx. 8) to the Admin Portal actor, previously User. Store actor email instead of the DB reference.
  9. Admin Identity & SSO Internal actors become Admins. Old Users

    are still legit Chowbus customers. Not @chowbus.com actors will be skipped Old password preserved, but on the first login it will require to set a new stronger one Auth Service Admin Area signs out after 6 hours of inactivity * Monolith Admin Portal: refresh_token flow will proceed more often 16
  10. Admin Identity & SSO PROGRESS ✅ Auth: Introduce Admin entity

    + CRUD ✅ Auth: Enforce stronger security (during the migration period) preserving email/password authentication ⏸ Auth: Admin becomes an actor in the Auth Admin Area Monolith: Decouple Admin Portal actors from User data 18
  11. Admin Identity & SSO HIGH-LEVEL PLAN Phase 1. Decouple internal

    actors from User model aka “Admin Identity MVP” Phase 2. Implement SSO for Admins with Okta 19
  12. Admin Identity & SSO RESPONSIBILITIES Single source of truth for

    internal actors Provisioning & Deprovisioning in internal services Keeping security requirements 2FA Password policies for complexity and rotation Firewall whitelistening (e.g requiring VPN) 22
  13. Admin Identity & SSO DATA PROPAGATION 26 { "uuid": "c2a66d94-f471-11ea-97ad-2f8850418bae",

    "published": "2020-09-11T21:00:02.239Z", "eventType": "user.account.update_profile", "version": "0", "displayMessage": "Update user profile for Okta", "severity": "INFO", "outcome": { "result": "SUCCESS" }, "target": [ { "id": "00uvqmujhlxYt39444x6", "type": "User", "alternateId": "[email protected]", "displayName": "Sergey Ponomarev" } ] }
  14. Admin Identity & SSO 29 ROLES MANAGEMENT What are roles

    in Okta? How to expose them in OIDC and API? Roles has scopes
  15. Admin Identity & SSO 32 REGIONAL OPS ADMIN Scopes synchronisation:

    •Production is a single source of truth •Once a region is created, corresponding custom attribute values are propagated to Okta
  16. Admin Identity & SSO Internal actors starts login through Okta

    Okta is a single source of truth for Admin data 37