Spring5学习(二)-spring projects之Spring Security

Spring Security

Spring Security is a powerful and highly customizable(定制的) authentication(认证) and access-control framework. It is the de-facto(事实上的) standard(标准) for securing Spring-based applications.



Spring Security is a framework that focuses on providing both authentication(认证) and authorization(授权) to Java applications. Like all Spring projects, the real power of Spring Security is found in how easily it can be extended to meet custom requirements




Features

  • Comprehensive(全面的) and extensible(可扩展的) support for both Authentication and Authorization
  • Protection against attacks(防止攻击) like session fixation(会话固定), clickjacking(点击劫持), cross site request forgery(跨站请求伪造), etc
  • Servlet API integration
  • Optional integration with Spring Web MVC
  • Much more…




Quick Start
snapshot:5.0.1
maven:

    
        org.springframework.security
        spring-security-web
        5.0.1.BUILD-SNAPSHOT
    

    
        spring-snapshots
        Spring Snapshots
        https://repo.spring.io/libs-snapshot
        
            true
        
    
gradle:
dependencies {
    compile 'org.springframework.security:spring-security-web:5.0.1.BUILD-SNAPSHOT'
}repositories {
    maven {
        url 'https://repo.spring.io/libs-snapshot'
    }
}





附录:
1. session fixation:会话固定攻击。Session fixation attack(会话固定攻击)是利用服务器的session不变机制,借他人之手获得认证和授权,然后冒充他人。(参考:iteye)

2. clickjacking:点击劫持,clickjacking,也被称为UI-覆盖攻击。这个词首次出现在2008年,是由互联网安全专家罗伯特·汉森和耶利米·格劳斯曼首创的。它是通过覆盖不可见的框架误导受害者点击。虽然受害者点击的是他所看到的网页,但其实他所点击的是被黑客精心构建的另一个置于原网页上面的透明页面。这种攻击利用了HTML中