Журнал «Continuum. Математика. Информатика. Образование»
Выпуск №1 (5) (2017)
ОБЕСПЕЧЕНИЕ БЕЗОПАСНОСТИ ВЕБ-ПРИЛОЖЕНИЙ С ИСПОЛЬЗОВАНИЕМ ФРЕЙМВОРКА SPRING SECURITY
В развитии современных приложений наблюдается устойчивая тенденция к переходу к веб-технологиям и среди проблем, которые приходится решать разработчикам, особое место занимают вопросы обеспечения безопасности и контроля доступа. В данной статье рассматривается свободно распространяемый фреймворк Spring Security - самый мощный инструмент обеспечения безопасности веб-приложений, созданных с использованием технологий Java/JavaEE. Являясь частью общей экосистемы фреймворка Spring Framework, Spring Security в полной мере использует все его возможности и механизмы, такие как внедрение зависимостей и аспектно-ориентированное программирование. С помощью аспектов Spring Security позволяет декларативно обеспечивать безопасность веб-приложения на всех уровнях: на уровне запросов, на уровне вызова методов и на уровне представлений. Большое внимание в статье уделено описанию ключевых классов и интерфейсов, составляющих ядро фреймворка. Подробно рассматриваются имеющиеся в Spring Security механизмы аутентификации и авторизации пользователей. Дается пример настройки Spring Security с помощью аннотаций и классов Java, который может лечь в основу разработки системы безопасности любого современного веб-приложения.
Ключевые слова
JavaEE; Spring Framework; Spring Security; безопасность веб-приложений; аутентификация; авторизация; роли пользователей; безопасность запросов; безопасность методов; java config; JavaEE; Spring Framework; Spring Security; web application security; authentication
WEB APPLICATION SECURITY WITH THE HELP OF SPRING SECURITY FRAMEWORK
There is a steady trend toward web-based technologies in the development of advanced applications. Among the problems that must be solved by the developers a special place is occupied by the issues of security and access control. This article discusses a freeware framework Spring Security - the most powerful tool to ensure the security of web applications built using Java/JavaEE technologies. As a part of the overall ecosystem framework Spring Framework, Spring Security takes full advantage of all its capabilities and mechanisms, such as dependency injection and aspect-oriented programming. With the help of aspects Spring Security allows to provide Web application security in a declarative way at all levels: at the query level, at the level of calling methods on the level of ideas. Much attention is paid to the description of the key classes and interfaces that make up the core of the framework. Spring Security mechanisms of authentication and authorization are given in details. We give an example of configuring Spring Security using annotations and Java classes that can form the basis for the development of security systems of any modern web applications.
Список литературы
-
Mularien P. (2010) Spring Security 3. Packt Publishing.
-
Spring Security Reference [Электронный ресурс]. URL: http://docs.spring.io/spring-security/site/docs/4.1.x/reference/htmlsingle/.
-
Spring Security/Технический обзор Spring Security [Электронный ресурс]. URL: https://ru.wikibooks.org/wiki/Spring_Security/Технический_обзор_Spring_Security.
-
Уоллс К. Spring в действии. М.: ДМК Пресс, 2013.
-
Шефер К., Хо К., Харроп Р. Spring 4 для профессионалов, 4-е изд. : Пер. с англ. М.: ООО «И.Д. Вильямc», 2015.