security

Configures Spring Security for Vaadin 25 apps with login, roles, and OAuth2.

6|1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/marcushellberg/vaadin-development-plugin --skill security-marcushellberg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security
Source: https://github.com/marcushellberg/vaadin-development-plugin/tree/main/skills/security
Command: npx skills add https://github.com/marcushellberg/vaadin-development-plugin --skill security-marcushellberg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Securing Vaadin 25 applications requires integrating Spring Security with Vaadin-specific configurations, annotations, and login/logout flows.

Core Features & Use Cases

  • Spring Security configuration with VaadinSecurityConfigurer to unify security concerns.
  • Login view handling with Vaadin's LoginForm, web security annotations (@AnonymousAllowed, @PermitAll, @RolesAllowed, @DenyAll), and AuthenticationContext for programmatic control.
  • OAuth2/OpenID Connect integration with providers like Google, Keycloak, GitHub for social/enterprise logins.
  • Logout handling, session management, and secure access control across views and layouts.

Quick Start

Create a SecurityConfig that wires VaadinSecurityConfigurer and provide a LoginView built with LoginForm to enable a secure form-based login.

Frequently Asked Questions about security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Spring Security authentication in a Vaadin application?

Spring Security authentication in Vaadin apps is configured using VaadinSecurityConfigurer within a SecurityFilterChain bean, integrating login views, role-based access, and logout flows.

How do I set up OAuth2 login with providers like Google or GitHub in Vaadin?

OAuth2 login for Vaadin apps is set up by configuring OAuth2 client properties and using VaadinSecurityConfigurer to enable social and enterprise provider integration.

Can I use @RolesAllowed and @PermitAll annotations to secure Vaadin views?

Yes, Vaadin views can be secured using web security annotations like @RolesAllowed, @PermitAll, @DenyAll, and @AnonymousAllowed to control access across public, user, and admin views.

What is needed to create a login view for a Vaadin Spring Security application?

A Vaadin Spring Security login view requires a LoginForm component and the @AnonymousAllowed annotation to ensure unauthenticated users can access the login screen.

Does this Spring Security configuration support programmatic logout and session management?

Yes, the configuration supports secure logout handling, session management, and programmatic access control via AuthenticationContext across Vaadin views and layouts.

Is VaadinSecurityConfigurer compatible with role-based access control for admin views?

VaadinSecurityConfigurer fully supports role-based access control, allowing you to restrict admin views using @RolesAllowed while keeping public views open with @PermitAll.