Остання редакція: 2025-06-05
Анотація
Розроблено конфігураційний модуль авторизації HTTP-запитів для REST API з використанням Spring Security DSL. Досліджено особливості побудови ланцюга фільтрів безпеки, реалізації безстанової аутентифікації за допомогою JWT та застосування комбінованого підходу на основі ролей і привілеїв. Також розглянуто механізми маршрутизації доступу через MvcRequestMatcher та обробку винятків при несанкціонованому доступі. Проведене модульне тестування підтвердило коректність авторизації запитів і стабільну роботу всієї конфігурації безпеки.
IMPLEMENTATION OF HTTP REQUEST AUTHORIZATION FOR REST ENDPOINTS USING SPRING SECURITY DSL
Abstract
A configuration module for authorizing HTTP requests to a REST API was developed using the Spring Security DSL. The specifics of constructing the security filter chain, implementing stateless authentication with JWT, and applying a combined role-and-privilege-based approach were investigated. Mechanisms for routing access via MvcRequestMatcher and handling exceptions for unauthorized access were also examined. Module testing confirmed the correctness of request authorization and the stable operation of the entire security configuration.
Ключові слова
Посилання
- Spring Security Reference Documentation – Spring MVC Integration [Електронний ресурс] – Режим доступу: https://docs.spring.io/spring-security/reference/servlet/integrations/mvc.html (дата звернення: 26.05.2025).
- Spring Security Architecture. Spring Documentation [Електронний ресурс] – Режим доступу: https://docs.spring.io/spring-security/reference/servlet/architecture.html#servlet-securityfilterchain (дата звернення: 26.05.2025).
- Spring Security Reference Documentation – Authorize HttpServletRequests [Електронний ресурс] – Режим доступу: https://docs.spring.io/spring-security/reference/servlet/authorization/authorize-http-requests.html (дата звернення: 26.05.2025).
- Dikanski A., Steinegger R., Abeck S. Identification and Implementation of Authentication and Authorization Patterns in the Spring Security Framework [Електронний ресурс] // ResearchGate. – 2012. – Режим доступу: https://www.researchgate.net/publication/289782166_Identification_and_implementation_of_authentication_and_authorization_patterns_in_the_spring_security_framework (дата звернення: 26.05.2025).