Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Redhat AUTHORIZATION SERVICES

Istio Sample External Authorization BlogServer with Istio

Working example

  1. To use keycloak authoriztion services start by creating a confidential client.
  2. Set "Authoriztion  Enabled" to on.
  3. Create 2 roles rapp_admin and rapp_user and assigned them to the service account.
  4. Click on the authoriztion tab for the client  to setup your authoriztion policies.
  5. Start by creating 4 scopes (create,edit, delete and view) in the "Authoriztion scopes" section
  6. Next create a resource "Rapp resource", set the URI to /api/resources/* and set the scopes to create,edit, delete and view.
  7. Next create a policy "View Policy", select the "rapp_user" role and set required to on.
  8. Create an "Admin policy", select the "rapp_admin" role and set required to on.
  9. In the permission section, create a "Scope Based" permission -  for resouce choose the "Rapp resource" created earlier, scope should be set to view and select the "View Policy" for policy.
  10. Create another "Scope Based" permission -  for resouce choose the "Rapp resource" created earlier, scope should be set to create, edit and delete and select the "Admin Policy" for policy.

...

The Open Policy Agent (OPA) is an open source, general-purpose policy engine that unifies policy enforcement across the stack. OPA provides a high-level declarative language that lets you specify policy as code and simple APIs to offload policy decision-making from your software.

...

Introducing Policy As Code: The Open Policy Agent (OPA)

Sample Istio External Authorization Server with IstioOPA