Vaadin7 secure login/logout with MySQL

I’m a beginner and try to start developing with Vaadin…
My question here is related to securing a application, which should use a MySQL database to store data but also user information.

Is there any tutorial available, where I can build step-by-step an application with login/logout using mysql as database for user/passwd/role?
Or can you short post the steps to be done, to secure an vaadin-application by using user-credentials with mysql?

thanx, Martin

Hi again,
I have tried to get the dashboard with appfoundation working, but I dont know, what parts from the appfoundation example needs to be included into dashboard-demo.
it would be great, if someone can point me some links or docus, which can help me to get that working.

another question would be: how in general this is done for web-apps? Is there not any standard available which can be integrated into the Vaadin-app?

thanx, Martin

hi Martin, you can use Apache Shiro to secure your vaadin aplication. It will be adding on as a servlet filter to block out unauthentcated user. It work well with MySQL with JDBC Realm. For detail:


is there any VAADIN project avaiable for download, which uses Shiro or Spring-security and a database?
thanx, Martin

BTW. There is an article in the wiki that explains how to do this (though they use a fileRealm instead of a JDBCRealm) and it is vaadin 6.

In your case you would configure the realm as a JdbcRealm ( google it , there are many online articles on how to configure this ).

And put the security init checks in UI.init instead of Application.getNewApplication as in the wiki article.

The rest of it is the same.