The foundational Java framework for building enterprise applications, providing dependency injection, MVC, and infrastructure support for the wider Spring ecosystem.
spring-projects/spring-security
Spring Security is a Java security framework for authentication, authorization and protection against common attacks in Spring applications.
- Stars
- 9,667
- Forks
- 6,393
- Open issues
- 1,545
- Last commit
- 2 days ago
What is it?
Spring Security provides security services for applications built on the Spring platform. It covers authentication and authorization, letting developers control who can access which parts of an application.
The project targets Spring Framework 6.0 and later and requires Java 17. It is built with Gradle, and reference documentation and Javadoc are published on the Spring project website.
Developers add it to a Spring application through Maven or Gradle artifacts, and a quick-start guide walks through a basic "Hello, World" setup.
Key features
- 01Provides authentication and authorization for Spring applications.
- 02Integrates with the Spring Framework 6.x ecosystem.
- 03Requires Java 17 and Spring 6.0 or later.
- 04Distributed as Maven and Gradle artifacts.
- 05Includes reference documentation and Javadoc.
Use cases
- Securing a Java web application or REST API built with Spring.
- Restricting access to endpoints based on user roles or permissions.
- Adding login and identity handling to a Spring-based service.
Quick start
- 1
Check out the source code with git
git clone git@github.com:spring-projects/spring-security.git - 2
Install the JDK 17 build and set JAVA_HOME to the jdk-17 folder
- 3
Install all spring-*.jar files into your local Maven repository
./gradlew publishToMavenLocal - 4
Compile, test and build all JARs from the root of the source tree
./gradlew build
Things to know
- Requires Java 17 or newer and Spring 6.0 or newer.
- Building from source needs a JDK 17 install and the Gradle wrapper.
In collections
Topics
FAQ
- What is spring-security?
- Spring Security is a Java security framework for authentication, authorization and protection against common attacks in Spring applications. Spring Security provides security services for applications built on the Spring platform. It covers authentication and authorization, letting developers control who can access which parts of an application.
- Is spring-security free to use? What license does it have?
- spring-security is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is spring-security still maintained?
- Actively maintained. The last commit to spring-security was on Nov 6, 2026.
- What can I use spring-security for?
- Securing a Java web application or REST API built with Spring. Restricting access to endpoints based on user roles or permissions. Adding login and identity handling to a Spring-based service.
- How do I install spring-security?
- Check out the source code with git: git clone git@github.com:spring-projects/spring-security.git Install the JDK 17 build and set JAVA_HOME to the jdk-17 folder Install all spring-*.jar files into your local Maven repository: ./gradlew publishToMavenLocal Compile, test and build all JARs from the root of the source tree: ./gradlew build
- Where can I get spring-security?
- The source code and installation instructions are on GitHub: https://github.com/spring-projects/spring-security
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Keycloak extension that lets administrators restrict which users may log in to specific clients.
An opinionated Java framework for building production-grade, Spring-powered applications and services with minimal setup.
Spring Data JPA provides repository interfaces for JPA-based data access in Spring applications, generating implementations from method names and queries.
Open source identity and access management server that handles user federation, authentication, user management and fine-grained authorization for apps and services.
A framework-agnostic authentication and authorization framework for TypeScript, with a plugin system for features like 2FA and multi-tenancy.