>> What is that allowCreation() ?
>>  when whould that be called?

>In the constructor of component.
Too late, it needs to be checked on class level before calling any
constructors. PageFactory would be a good start.

>What I think Wicket does great so far, as that it doesn't make too many
>assumptions on how people develop their applications.
But we make life so much easier if we provide a default that will be used by
90% of the people. And if you cant or won't use the default, it's just a
method overwrite away, or setting a flag, or whatever. Something simple.

>Imo, a model that has things like R/W/etc is too specific yet.
If you don't allow for fine-grained support it will be harder to add it by
those that do need it. If on the other hand you do allow this fine-grained
support it can easily be abstracted away in an additional layer on top of
it.

>Disagree. These are two separate things. Most security frameworks
>handle them separately too. If you are on the level of authorization,
>authentication is implicit. You can have an authorization that allow
>all, including not authorized. You can have an authorization
>implementation that uses the current Principal from the request (which
>is passed by your servlet contain), you can have such implementation
>using JAAS (like we did a lot at Topicus) or some completely different
>schema. So, yes the authorization implementation is probably tied to
>the authentication (or at least knows what enities to deal with and
>where to get it), but no, it shouldn't be in the same interface.
Making a universal login method would be difficult whether it is combined
with authorization or not, since we want to support more then just simple
username and password authentication. One way of doing it would be to use
callback handlers just like jaas does.
Another option is not defining a login method at all but let that be an
implementation detail.
What we do need is a check if the security system has an authenticated user.
The way I see it this would be mainly used by pages to check if we need to
redirect someone to a login page, but other usage is also possible.
For wicket it is not relevant if the right to read or write to a page comes
from an authenticated user or is granted to everybody.

>The point is too that we want to have something that is really good
>abstracted out instead of something that just works. We only have to
>do this once.
That's what we are trying to do here too. (you should have seen my first
attempt :)) And although we follow the KISS principle we do need to make a
solid foundation to build on.

Maurice

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eelco
Hillenius
Sent: woensdag 26 oktober 2005 18:15
To: [email protected]
Subject: Re: [Wicket-develop] integrating authorization

On 10/26/05, Johan Compagner <[EMAIL PROTECTED]> wrote:
> What is that allowCreation() ?
>  when whould that be called?

In the constructor of component.


>
>  With what method are we testing the models data for say a form that it
can
> READ it but not WRITE it?
>  (so all elements must be readonly or disabled)

That's a design specific for a type of applications. It is not what
you can define as the absolute core condition of a authorisation
model. You can build on top of it though. In this example, render
would be allowed, but execute not (again the point Maurice made).
Furthermore, I don't think it /has/ to be in the scope of a
authorisation model to know about how components can be rendered etc.
I'm trying to get to the basics first.

What I think Wicket does great so far, as that it doesn't make too
many assumptions on how people develop their applications. Imo, a
model that has things like R/W/etc is too specific yet.

>
>  It is not purely components it is also the data that we have to support
out
> of the box.


Maybe. Not super-sure yet. What would that mean. Do we have to check
whether a component may be:
* constructed (common use case: bookmarkable pages)
* rendered
* executed (called before the listener interface method is called,
which is /specific for web applications/ right now as that is the only
part where that can be enforced, and exectuing listener methods is not
part of the general component contract)
* it's model being updated (we don't need read, as that is the same as
the rendered check).

I'm not sure about the model check, as another way of putting it is
that it is kind of the same as executing. But maybe not. Maybe that is
too imposing.


 boolean allowCreation(Component c); was of course a stupid
suggestion. That should be  boolean allowCreation(Class c);


>
>  I do think that authorisation and authentication should be in 1
interface.
> Because most of the time (if not all) authorisation needs something from
>  authentication (like a User object or Subject) because how else can it do
> something??


Disagree. These are two seperate things. Most security frameworks
handle them seperately too. If you are on the level of authorisation,
authentication is implicit. You can have an authorisation that allow
all, including not authorised. You can have an authorisation
implementation that uses the current Principal from the request (which
is passed by your servlet contain), you can have such implementation
using JAAS (like we did a lot at Topicus) or some completely different
schema. So, yes the authorisation implementation is probably tied to
the authentication (or at least knows what enities to deal with and
where to get it), but no, it shouldn't be in the same interface.


>
>  if it are 2 methods then one can implement it how they like. So use X for
> authentication and Y for authorisation
>  For example if we have a JAAS impl for this but they want to override the
> authentication then they can just do that.
>  But remember in our implenentation the Login is not done in the
interface!
> That is something that is specific to an implementation.

The point is too that we want to have something that is really good
abstracted out instead of something that just works. We only have to
do this once.

Eelco


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to