Hi All,
Asked Bill for some feedback about AuthZ docs [1] and would like to share with you.
@Bill, my initial comments inline.
[1]
https://keycloak.gitbooks.io/authorization-services-guide/content/
----- Original Message -----
From: "Bill Burke" <bburke(a)redhat.com>
To: "Pedro Igor Silva" <psilva(a)redhat.com>
Sent: Wednesday, June 8, 2016 11:15:03 AM
Subject: Re: Feedback
* Example is too complex. Needs to be broken down and explained for
each policy that was created.
OK. By "broken down" you mean using sub-topics (pages) or just sections on the
same page ?
The "Hello World" one should be fine because it is just a single policy example.
The "Securing a Servlet Application" may have more details about each of those
policies, will work on that. Or even just point to their respective documentation, as we
also have doc for each policy type.
* Example should not use JSON import. It should walk through screen
shots to explain how to set up things.
The idea behind using JSON import is that it provides an easy and fast way to users get
started. After all, you just need to copy&paste configuration (or obtain from examples
dir) and import to KC. IMO, that makes the tutorial more easy to follow with focus on the
main concepts being explained.
I'm trying to keep documentation about UI on each topic, so you can see how to use
admin console to create/configure things.
* Need more screenshots throughout doc
Probably related with your previous feedback. I'm going to take some more screenshots
....
* Is Resource Server->Client always a one-to-one thing?
No, RS<->Client is not always a 1:1 mapping. Usually, they would be different
entities, where the client is acting on behalf of the RO to access protected resources on
a resource server. That is true for most API security use cases.
However, an app may use both hats. For instance, monolithic JEE apps.
Maybe Authorization should move under clients tab?
That is a good question. And my quick answer for that would be to keep it separated for
now.
I think changes like that may involve more discussions around UI design. For instance,
today clients and resource servers are managed in the same space (Clients in left menu
bar). As you know, clients (entities accessing a RS on behalf of an user) and RSs are
different things and although they share a lot of things, I think we could have have them
*visually* separated somehow.
AuthZ includes more tabs and flows, so I don't think move under clients tab would be a
good idea. I'm not a UX expert, there is probably a way to do what you want nicely
...
* Looks like there is a bit of redundant config for adapters. How big is
authz at the adapter side?
From an adapter perspective, AuthZ code is pretty much straightforward
and small. The redundant config you are talking about is probably the "client"
property in keycloak-authz.json. So yes, it is.
Today, authz code is basically provided by a Servlet Filter. See Policy Enforcers.
Maybe this code should be merged with our
adapters so config for user becomes simpler?
Well, I was trying to avoid change adapters. At least for now.
We can get those changes merged with our OIDC adapters, for sure. So I could move that
*enforcer* property to a keycloak.json file.
The question is if we should just leave that way for now and release this stuff. It is
your call, if you want them merged I'll do it.
Something to think about
and look into. Really probably depends how many dependencies authz
brings in.
There is no additional deps ...
* Need to unify scripting and SPI objects. Authz should share SPI
objects (i.e. client IP address) with AuthenticationFlow SPI and other
things. Looks like you might have duplicate things.
Saw that you merged some scripting stuff to authentication flow recently. But I'm not
sure about have both authc and authz sharing the same SPI right now.
I don't think I'm replicating things. We are basically exposing a Evaluation API
(that should be as simple as possible) that users can use to build rule-based policyes
(eg.: JS, Drools, etc). Here are basically ABAC and policies can obtain
information using both identities and environment/runtime attributes.
For instance, whatever you put in a access token (eg.: using a protocol mapper) would be
available as an attribute. Thus, available to policies.
On 6/7/16 4:40 PM, Pedro Igor Silva wrote:
> Hey Bill !
>
> When you get some time, could you please take a quick look at
>
https://keycloak.gitbooks.io/authorization-services-guide/content/index.html.
>
> There you will find the documentation for AuthZ Services and what I've
> documented so far.
>
> Your feedback is really appreciated :)
>
> Thanks.
> Pedro Igor