Re: Wicket authentication: how to store user?

2012-03-12 Thread Dan Retzlaff
As long as your shopping cart state is in your Wicket Session (not the HTTP session) you should be okay. Session#replaceSession() invalidates the HTTP session, but immediately binds the Wicket Session object to the new HTTP session. Happy shopper, unhappy attacker. :) On Mon, Mar 12, 2012 at 12:23

Re: Wicket authentication: how to store user?

2012-03-12 Thread Thomas Götz
That's not always feasible - in respect to user experience. Just think of some order process where e.g. you are asked to log in when doing a "checkout" (of your shopping cart). -Tom Hielke Hoeve wrote: > Webapplications should always invalidate the wicket session before > authenticating.

Re: Wicket authentication: how to store user?

2012-03-12 Thread Dan Retzlaff
alidate the wicket session before > >> authenticating. (use Session.get().replaceSession() ) > >> > >> See also: http://www.owasp.org/index.php/Session_Fixation > >> > >> Hielke > >> > >> -Original Message- > >> From: Dan Re

Re: Wicket authentication: how to store user?

2012-03-12 Thread Alec Swan
henticating. (use Session.get().replaceSession() ) >> >> See also: http://www.owasp.org/index.php/Session_Fixation >> >> Hielke >> >> -Original Message- >> From: Dan Retzlaff [mailto:dretzl...@gmail.com] >> Sent: maandag 5 maart 2012 3:53 >&g

Re: Wicket authentication: how to store user?

2012-03-12 Thread Dan Retzlaff
n > > Hielke > > -Original Message- > From: Dan Retzlaff [mailto:dretzl...@gmail.com] > Sent: maandag 5 maart 2012 3:53 > To: users@wicket.apache.org > Subject: Re: Wicket authentication: how to store user? > > Paolo, sessions are accessed with a JSESSIONID cook

RE: Wicket authentication: how to store user?

2012-03-12 Thread Hielke Hoeve
@wicket.apache.org Subject: Re: Wicket authentication: how to store user? Paolo, sessions are accessed with a JSESSIONID cookie or query parameter supplied with each request. It's not possible for one user to guess another user's session ID, so the approach Martin describes is inherently secure

Re: Wicket authentication: how to store user?

2012-03-07 Thread Dan Retzlaff
I mean that if you accept identifiers of external resources as parameters (e.g. database primary keys), it is your responsibility to verify that the authenticated user is authorized to access/modify that external resource. Frameworks protect session data, but not such external resources. On Wed, M

Re: Wicket authentication: how to store user?

2012-03-07 Thread Paolo
Alle lunedì 05 marzo 2012, Dan Retzlaff ha scritto: > Paolo, sessions are accessed with a JSESSIONID cookie or query parameter > supplied with each request. It's not possible for one user to guess another > user's session ID, so the approach Martin describes is inherently secure. Ok, thank you and

Re: Wicket authentication: how to store user?

2012-03-04 Thread Dan Retzlaff
Paolo, sessions are accessed with a JSESSIONID cookie or query parameter supplied with each request. It's not possible for one user to guess another user's session ID, so the approach Martin describes is inherently secure. (Just be careful with your authentication code and form/query parameter vali

Re: Wicket authentication: how to store user?

2012-03-03 Thread Paolo
Alle sabato 03 marzo 2012, Martin Grigorov ha scritto: > Hi, > > Save the logged in user id in the Session. > > MySession.java: > > private long userId; > > public User getUser() { > return userService.getUserById(userId); > } > > > AnyPage.java: > user = MySession.get().getUser(); > Thank

Re: Wicket authentication: how to store user?

2012-03-03 Thread Martin Grigorov
Hi, Save the logged in user id in the Session. MySession.java: private long userId; public User getUser() { return userService.getUserById(userId); } AnyPage.java: user = MySession.get().getUser(); On Fri, Mar 2, 2012 at 9:38 PM, Paolo wrote: > I use this code as base: > > http://wicketst

Wicket authentication: how to store user?

2012-03-02 Thread Paolo
I use this code as base: http://wicketstuff.org/wicket14/authentication/ I added registration and user/password sign-in and checking with database, instead of simple "wicket" as user and password. All works ok, but now I need in AdminPage to known which user is logged in. How can I implement it