Spring Security 로그인 인증 구현 개요 Spring Security에서 인증 사용할때 최상위 인터페이스 AuthenticationProviderManager Interface를 사용한다. 이인터페이스는 단순하게 아래와같이 정의 되어있다. public interface authenticationManager{ Authentication authenticate(Authentication authetication) throws AuthenticationException; } 이 인터페이스는 로그인을 시도하는 유저의 비밀번호가 일치하는지를 비교해서 인증에 성공하게 되면 Aunthetication 객체를 리턴해주는것을 구현해야하는 인터페이스이다. 그리고 일반적으로 Srping 에서 authentica..
JDBC, Connection, ConnectionPool, Datasource, JdbcTemplate이란 ? 먼저 위 타이틀을 알아보기전에 아래소스를 보자. 왜 위 API들이 우리에게 필요한지 알아보자. 우리가 자바를 사용해서 디비에서 List형태의 데이터를 불러오려면 아래와같이 복잡한 소스를 작성해야한다. 하지만 자바와 스프링에서 제공해주는 API DataSource, JdbcTemplate등을 이용하면 훨씬 더 깔끔하고 안정적이 구조로 데이터를 조회할 수 있다. 먼저 DataSource와 JdbcTemplate을 알아보기전에 자바에서 어떻게 데이터베이스에 접근하는지 알아볼것이다. public class jdbcTest { public static void main(String[] args) { t..
Spring Security 암호화 개요 단순히 Spring-security을 이용해 DaoAuthenticationProvider와 UserDetailsService을 이용해 인증기능(로그인기능)을 구현하게되면 한가지 문제점이 존재한다. 보안사고가 발생할경우 비밀번호가 평문으로 되어있다는것이다. Spring에서는 plaintext, sha, sha256, md4, md5의 암호화 기능을 지원한다. Spring-security에서 DaoAuthenticationProviderClass는 암호화기능을 지원한다. 일반적으로 설정을 하지않을경우에는 PlaintextPasswordEncoder를 사용한다. PlaintextPasswordEncoderclass는 단순 문자열로 비교해서 비밀번호 일치여부를 판단한다..
Spring Security 구조 먼저 Spring Security에서 유저 인증을 구현할 때 최상위 인터페이스로는 아래 그림 같이 Authentication Manager Interface가 존재한다. 그리고 authenticationManager Interface를 통해 유저 인증 구현 한다. [이미지 1] 위 그림과 같이 authenticationManager 의 구현체로 ProviderManager 가 존재한다. ProviderManager 는 인증구현을 AuthenticationProvider Interface 에게 위임한다. 일반적으로 AuthenticationProvider 을 커스터마이징해서 인증을 구현한다. AuthenticationProvider 구현체는 3개가 있고, 이것에 인증에 성..
- Total
- Today
- Yesterday
- https
- Github
- eslint
- Jenkins
- network
- OAuth
- Angular
- #linux
- Quasar
- OS
- java
- HMAC
- aws
- Chache
- SSH
- IntelliJ
- tobi
- kotlin
- Collection
- Infra
- Gradle
- batch
- Spring
- jenkins #mac방화벽
- JPA
- vue
- Linux
- javascript
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |