Docs

Security

The best practices for securing applications, configuring security, authentication and role-based access control for views.

Hilla is a combined client and server programming model. As an application developer, you make a decision about how much of the application state is stored on the server and how much is stored in the user’s browser. The following sections describe the best practices for securing such applications.

Topics

Introduction
An introduction to the Hilla security architecture and how it works in practice.
Controlling endpoint access
How to specify the role-based access control rules as annotations for the endpoint class or its individual methods.
Auth with Spring Security
How to configure authentication with Spring Security.
Accessing auth data
Accessing authentication data such as username and roles on the server side, as well as transferring the data to the client.
Role-based access control
How to restrict access for selected Hilla views based on roles defined for the logged-in user.
Stateless authentication
Using stateless authentication to persist authentication on the client side between requests.
Offline authentication
Storing the authentication data in the browser for offline applications.
Session expiration
How to detect session expiration, for example to show a login view to the user.
Common vulnerabilities
Dealing with vulnerabilities, such as SQL injection, cross-site request forgery, and Java serialization.
Best practices
Best practices in authentication and authorization, data validation, and SSL and HTTPS.