I am interested in the best practice in authentication in Vaadin I think there is mainly two option here:
Which one do you prefer and why? (Security issues, easy development, other factors)
Vaadin Flow is a server-side framework, where all the application state, business model, and UI logic reside on the server. A Flow application never exposes its internals to the browser, where vulnerabilities could be abused by an attacker. This makes the development model inherently secure.
The security key is used for CSRF protection. Session timeout should cause a session timeout notification box, but I guess it could also result in a security key notification if the server-side application is reinitialized. (Server log should get a "Invalid security key received" message.)
Much like building a traditional desktop application, you compose the UI from components, connect it to a data source and react to user events. The UI runs on the JVM without the need to expose REST services or come up with other ways to move data to the browser. Flow apps are rendered in the browser as standard HTML.
A Java developer can easily develop a website, simply by having idea of Vaadin classes and its uses. Vaadin provides plug-in supports and it is very easy to learn and integrate with other web frameworks.
There are a lot of different ways for authentication in Vaadin.
LoginForm
. LoginForm
first available as a Add-On, then later built into Vaadin 7.7.LoginForm
.I recommend you to select 1 or 2 if you want make it easy or 4 if you want power security system.
Not quite to your question, but two mentions:
New Persona for Vaadin "add-on"
Uses the promising Persona authentication system invented by Mozilla. By Leif Åstrand. New, still at experimental stage.
UPDATE Mozilla has abandoned this project.
Stormpath
A company dedicated to providing a user login management API and service for developers. There are some other companies that seem to dabble in this new area of authentication-as-a-service, but Stormpath is the only one I know of that is dedicated to it.
I've not used either of these, but they are on my To-Do list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With