際際滷

際際滷Share a Scribd company logo
??? ???? ?? ??
(? ?????? ??)
?? ?????, ???, 2014-07-09
??
¢ ??? ????? ?? ??? ?? ?? ?
?
$ ?? ?? ?????? ??? ??!
?? ?? ??
?? ?? 3??
¢ ?? ??(Principal)
$ ??? ??? ???? ???
¢ ??(Authenticate)
$ ?? ???? ???? ???? ??
$ ????? ???/??? ???? ??? ??
¢ ??(Authorize)
$ ?? ???? ?? ??(URL, ?? ?)? ??(??)
? ??? ??? ???? ?
??? ????? ?? 3??? ??
?? ??
??
??
Authentication
Authentication
Manager
Security
Interceptor
Authentication? SecurityContext
¢ Authentication? ??
$ ?? ?? ?? ??? ?? ??
$ ?? ??? ?, ?? ??? ?? ??
¢ SecurityContext
$ Authentication? ??
$ ??? ????? ?? ???? ??
Authentication ??? ?? ? SecurityContext??
? ??
SecurityContextHolder
¢ SecurityContext? ??
$ ??: ?????? SecurityContext? ??
¢ ???? SecurityContext ?? ??
Authentication auth = someMethodForGettingAuth(req, resp);
try {
SecurityContextHolder.getContext().setAuthentication(auth);
chain.doFilter(request, response); // ?? ???? ?? SecurityContext ??
} finally {
SecurityContextHolder.clearContext();
}
??? ????? ??? ?? ?? ??
??, Authentication? ?? ???
¢ Authentication? ?? ???
$ String getName(): ???? ??
$ Object getCredential(): ?? ? (???? ?)
$ Object getPrincipal(): ?? ?? ??
$ boolean isAuthenticated(): ?????? ??
$ Collection<GrantedAuthority) getAuthorities(): ??
???? ?? ??(GrantedAuthority)
AuthenticationManager
¢ ??? ???
public interface AuthenticationManager {
Authentication authenticate(Authentication authentication)
throws AuthenticationException;
}
¢ ??? ???? ?? ??? ?? ?? Authentication ?? ??
$ ??? ????? ??? Authentication ??? SecurityContext?
?? ? ?? ??? ???? ?? ??? ??
¢ ?? ??? AuthenticationException? ????
(Abstract)SecurityInterceptor
¢ ??? ??
$ ?? ?? FilterSecurityInterceptor ?? ??
$ AccessDecisionManager? ?? ?? ??
public interface AccessDecisionManager {
void decide(Authentication authentication, // ???
Object object, // ?? ??
Collection<ConfigAttribute> configAttributes) // ?? ??
throws AccessDeniedException, InsufficientAuthenticationException;
boolean supports(ConfigAttribute attribute);
boolean supports(Class<?> clazz);
}
¢ ???? ??? ?? ?? ????, ?? ??? ?? ?? ??? ??
SecurityFilterChain
? ?????? ?? ??
¢ ?? ?? ??? ??? ?? ??
FilterChainProxy
?? ?? ??
?? ??
?? ?? ??? ??
- Authentication ?? ??
- ?? ?? ??
- ?? ?? ??
<sec:http use-expressions="true">
<sec:intercept-url pattern="/admin/**"
access="hasAuthority('ROLE_ADMIN')" />
<sec:intercept-url pattern="/manager/**"
access="hasRole('ROLE_MANAGER')" />
<sec:intercept-url pattern="/member/**"
access="isAuthenticated()" />
<sec:intercept-url pattern="/**"
access="permitAll"/>
<sec:form-login />
<sec:logout />
</sec:http>
??
??
??? ??? ??? ??
(springSecurityFilterChain)
? ??? FilterChainProxy ??
<filter>
<filter-name>
springSecurityFilterChain
</filter-name>
<filter-class>
o...filter.DelegatingFilterProxy
</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
FilterChainProxy
?? ?? ??
DelegatingFilterProxy
?? ?? ??
?? ?? ??? ?? ?? ??
SecurityContextPersistenceFilter
LogoutFilter
UsernamePasswordAuthenticationFilter
DefaultLoginPageGeneratingFilter
AnonymousAuthenticationFilter
ExceptionTranslationFilter
FilterSecurityInterceptor?? ?? ??
??? ??
??? ? ??
?? ?? ??
???? ?? ??
Authentication ?? ¢ ?? ??? ???? ?
?
¢ ??? ?? ??? ??
?? ?? ??? ???
? ?
?? ??? ??
?? ?? ?? ? ??, ?? ?
?? ?? ??
SecurityContextPersistenceFilter
LogoutFilter
UsernamePasswordAuthenticationFilter
DefaultLoginPageGeneratingFilter
AnonymousAuthenticationFilter
ExceptionTranslationFilter
FilterSecurityInterceptor
1. ??
Access
Decision
Manager 2. ?? ??
??
4. ??? ??
Authentication
EntryPoint
5. ?? ?
? ?? ?
?
<sec:form-login
login-page="/user/loginform"
/>
?? ?? ?? ? ??, ?? ??
?? ?? ??
SecurityContextPersistenceFilter
LogoutFilter
UsernamePasswordAuthenticationFilter
DefaultLoginPageGeneratingFilter
AnonymousAuthenticationFilter
ExceptionTranslationFilter
FilterSecurityInterceptor
1. ??
Access
Decision
Manager 3. ?? ??
??
4. ??? ??
AccessDenied
Handler
5. ?? ??
?? ??
<sec:access-denied-handler
error-page="/accessDenied"/>
SecurityContext
Repository
2. ??? SecurityContext?
??
?? ??? ? ??
?? ?? ??
SecurityContextPersistenceFilter
LogoutFilter
UsernamePasswordAuthenticationFilter
DefaultLoginPageGeneratingFilter
AnonymousAuthenticationFilter
ExceptionTranslationFilter
FilterSecurityInterceptor
1. /spring_security_login ?
? ??
2. ??? ?
?? ??
?? ?? ?? ?? (???)
?? ?? ??
SecurityContextPersistenceFilter
LogoutFilter
UsernamePasswordAuthenticationFilter
DefaultLoginPageGeneratingFilter
AnonymousAuthenticationFilter
ExceptionTranslationFilter
FilterSecurityInterceptor
1. ?? ??
Authentication
Manager
2. ?? ??
SecurityContext
3. Authentication ??
Authentication
SuccessHandler
4. ?? ???
SecurityContext
Repository
5. SecurityContext ??
<sec:form-login
login-processing-url="/user/login"
username-parameter="userid"
password-parameter="password"
default-target-url="/index"
/>
?? ?? ?? ?? (???)
?? ?? ??
SecurityContextPersistenceFilter
LogoutFilter
UsernamePasswordAuthenticationFilter
DefaultLoginPageGeneratingFilter
AnonymousAuthenticationFilter
ExceptionTranslationFilter
FilterSecurityInterceptor
1. ?? ??
Authentication
Manager
2. ?? ??
Authentication
FailureHandler
3. ?? ???
<sec:form-login
...
authentication-failure-url="/user/loginform?error=true"
/>
???? ?? ?? ??
?? ?? ??
SecurityContextPersistenceFilter
LogoutFilter
UsernamePasswordAuthenticationFilter
DefaultLoginPageGeneratingFilter
AnonymousAuthenticationFilter
ExceptionTranslationFilter
FilterSecurityInterceptor
1. ?? ??
??
LogoutSuccess
Handler
3. ???? ?
??
LogoutHandler
2. ???? ?
?
<sec:logout logout-url="/user/logout"
logout-success-url= ̄/ ̄
/>
AuthenticationManager
AuthenticationManager ??1
<sec:authentication-manager>
<sec:authentication-provider>
...
</sec:authentication-provider>
</sec:authentication-manager>
??? ?? ????? ?? ??
AuthenticationProvider? ??
AuthenticationManager ??2
<sec:authentication-provider>
<sec:user-service>
<sec:user name="bkchoi" password="1234"
authorities="ROLE_USER" />
</sec:user-service>
</sec:authentication-provider>
<sec:authentication-provider>
<sec:jdbc-user-service
data-source-ref="dataSource"
id="jdbcUserService" />
</sec:authentication-provider>
??? ?? ??
<sec:authentication-manager >
<!-- AuthenticationProvider? ??? ?? ?? -->
<sec:authentication-provider ref="customAuthenticationProvider" />
<!-- DaoAuthenticationProvider ?? ?? ★
<!-- UserDetailsService? ??? ?? ?? -->
<sec:authentication-provider
user-service-ref="customUserDetailsService" />
</sec:authentication-manager>
FilterSecurityInterceptor
&
AccessDecisionManager
FilterSecurityInterceptor
<sec:http use-expressions="true">
<sec:intercept-url pattern="/user/loginform" access="permitAll" />
<sec:intercept-url pattern="/user/login" access="permitAll" />
<sec:intercept-url pattern="/admin/usermanager/**"
access="hasAuthority('USER_MANAGER')" />
...
</sec:http>
AccessDecisionManager
<sec:http use-expressions="true">
...
</sec:http>

More Related Content

What's hot (20)

Node js introduction
Node js introductionNode js introduction
Node js introduction
Joseph de Castelnau
?
Naver???, ??? ??, ??? ?? ??DB (??? ?????? ??DB) [Naver]
Naver???, ??? ??, ??? ?? ??DB (??? ?????? ??DB) [Naver]Naver???, ??? ??, ??? ?? ??DB (??? ?????? ??DB) [Naver]
Naver???, ??? ??, ??? ?? ??DB (??? ?????? ??DB) [Naver]
MongoDB
?
??? ?? ??? MSA ?? ?? ? API Gateway? ?? ??? ?? ??
??? ?? ??? MSA ?? ?? ? API Gateway? ?? ??? ?? ????? ?? ??? MSA ?? ?? ? API Gateway? ?? ??? ?? ??
??? ?? ??? MSA ?? ?? ? API Gateway? ?? ??? ?? ??
if kakao
?
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Edureka!
?
Spring Boot
Spring BootSpring Boot
Spring Boot
Jiayun Zhou
?
??? ?? ?? ???? ?? ??
??? ?? ?? ???? ?? ????? ?? ?? ???? ?? ??
??? ?? ?? ???? ?? ??
Arawn Park
?
Kotlin coroutines ?????????
Kotlin coroutines ?????????Kotlin coroutines ?????????
Kotlin coroutines ?????????
Taewoo Kim
?
Spring Boot
Spring BootSpring Boot
Spring Boot
Pei-Tang Huang
?
[Golang] 參 Mobile App 垢殻叔ァ低M秘 Golang 議弊順 (Introduction of GoLang)
[Golang] 參 Mobile App 垢殻叔ァ低M秘 Golang 議弊順 (Introduction of GoLang) [Golang] 參 Mobile App 垢殻叔ァ低M秘 Golang 議弊順 (Introduction of GoLang)
[Golang] 參 Mobile App 垢殻叔ァ低M秘 Golang 議弊順 (Introduction of GoLang)
Johnny Sung
?
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
Apaichon Punopas
?
Massive service basic
Massive service basicMassive service basic
Massive service basic
DaeMyung Kang
?
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
Edureka!
?
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jest
pksjce
?
Introducing Swagger
Introducing SwaggerIntroducing Swagger
Introducing Swagger
Tony Tam
?
webservice scaling for newbie
webservice scaling for newbiewebservice scaling for newbie
webservice scaling for newbie
DaeMyung Kang
?
?? ??? ? ?? ?? ??: Pull Requests vs. Stacked Changes
?? ??? ? ?? ?? ??: Pull Requests vs. Stacked Changes?? ??? ? ?? ?? ??: Pull Requests vs. Stacked Changes
?? ??? ? ?? ?? ??: Pull Requests vs. Stacked Changes
Jiyeon Seo
?
[Devil's camp 2019] ?? Elixir ????? ?.?.?.?.?.?.?.?
[Devil's camp 2019] ?? Elixir ????? ?.?.?.?.?.?.?.?[Devil's camp 2019] ?? Elixir ????? ?.?.?.?.?.?.?.?
[Devil's camp 2019] ?? Elixir ????? ?.?.?.?.?.?.?.?
KWON JUNHYEOK
?
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
Jeevesh Pandey
?
??? - ???? ??? ?? ??
??? - ???? ??? ?? ????? - ???? ??? ?? ??
??? - ???? ??? ?? ??
Hyung Lee
?
Introduction Node.js
Introduction Node.jsIntroduction Node.js
Introduction Node.js
Erik van Appeldoorn
?
Naver???, ??? ??, ??? ?? ??DB (??? ?????? ??DB) [Naver]
Naver???, ??? ??, ??? ?? ??DB (??? ?????? ??DB) [Naver]Naver???, ??? ??, ??? ?? ??DB (??? ?????? ??DB) [Naver]
Naver???, ??? ??, ??? ?? ??DB (??? ?????? ??DB) [Naver]
MongoDB
?
??? ?? ??? MSA ?? ?? ? API Gateway? ?? ??? ?? ??
??? ?? ??? MSA ?? ?? ? API Gateway? ?? ??? ?? ????? ?? ??? MSA ?? ?? ? API Gateway? ?? ??? ?? ??
??? ?? ??? MSA ?? ?? ? API Gateway? ?? ??? ?? ??
if kakao
?
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Edureka!
?
??? ?? ?? ???? ?? ??
??? ?? ?? ???? ?? ????? ?? ?? ???? ?? ??
??? ?? ?? ???? ?? ??
Arawn Park
?
Kotlin coroutines ?????????
Kotlin coroutines ?????????Kotlin coroutines ?????????
Kotlin coroutines ?????????
Taewoo Kim
?
[Golang] 參 Mobile App 垢殻叔ァ低M秘 Golang 議弊順 (Introduction of GoLang)
[Golang] 參 Mobile App 垢殻叔ァ低M秘 Golang 議弊順 (Introduction of GoLang) [Golang] 參 Mobile App 垢殻叔ァ低M秘 Golang 議弊順 (Introduction of GoLang)
[Golang] 參 Mobile App 垢殻叔ァ低M秘 Golang 議弊順 (Introduction of GoLang)
Johnny Sung
?
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
Edureka!
?
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jest
pksjce
?
Introducing Swagger
Introducing SwaggerIntroducing Swagger
Introducing Swagger
Tony Tam
?
webservice scaling for newbie
webservice scaling for newbiewebservice scaling for newbie
webservice scaling for newbie
DaeMyung Kang
?
?? ??? ? ?? ?? ??: Pull Requests vs. Stacked Changes
?? ??? ? ?? ?? ??: Pull Requests vs. Stacked Changes?? ??? ? ?? ?? ??: Pull Requests vs. Stacked Changes
?? ??? ? ?? ?? ??: Pull Requests vs. Stacked Changes
Jiyeon Seo
?
[Devil's camp 2019] ?? Elixir ????? ?.?.?.?.?.?.?.?
[Devil's camp 2019] ?? Elixir ????? ?.?.?.?.?.?.?.?[Devil's camp 2019] ?? Elixir ????? ?.?.?.?.?.?.?.?
[Devil's camp 2019] ?? Elixir ????? ?.?.?.?.?.?.?.?
KWON JUNHYEOK
?
??? - ???? ??? ?? ??
??? - ???? ??? ?? ????? - ???? ??? ?? ??
??? - ???? ??? ?? ??
Hyung Lee
?

Similar to ??????? ???????? ???? ???? (20)

Spring Security
Spring SecuritySpring Security
Spring Security
ymtech
?
01.windows ??(?????? ??) 2016.05.25
01.windows ??(?????? ??)   2016.05.2501.windows ??(?????? ??)   2016.05.25
01.windows ??(?????? ??) 2016.05.25
InGuen Hwang
?
Spring camp ?????????
Spring camp ?????????Spring camp ?????????
Spring camp ?????????
?? ?
?
Spring Security
Spring SecuritySpring Security
Spring Security
ETRIBE_STG
?
[???D2SF] ??? ??? ??? ?? Ncloud ????
[???D2SF] ??? ??? ??? ?? Ncloud ????[???D2SF] ??? ??? ??? ?? Ncloud ????
[???D2SF] ??? ??? ??? ?? Ncloud ????
NAVER D2 STARTUP FACTORY
?
????????? : ????? ????
????????? : ????? ???? ????????? : ????? ????
????????? : ????? ????
??????
?
201412 ??????? ??
201412 ??????? ??201412 ??????? ??
201412 ??????? ??
??????
?
OWASP TOP 10 in 2007
OWASP TOP 10 in 2007OWASP TOP 10 in 2007
OWASP TOP 10 in 2007
Samsung Electronics
?
IoT ?? ?????
IoT ?? ?????IoT ?? ?????
IoT ?? ?????
?? ?
?
?????????? ??? ?? ??? - Fluentd? ??? ?????????? Object Storage ?? ????(??? ??...
?????????? ??? ?? ??? - Fluentd? ??? ?????????? Object Storage ?? ????(??? ??...?????????? ??? ?? ??? - Fluentd? ??? ?????????? Object Storage ?? ????(??? ??...
?????????? ??? ?? ??? - Fluentd? ??? ?????????? Object Storage ?? ????(??? ??...
NAVER CLOUD PLATFORM???? ???? ???
?
Spring Security
Spring SecuritySpring Security
Spring Security
DataUs
?
?? ?? ???
?? ?? ????? ?? ???
?? ?? ???
NAVER D2
?
???? ??? ?? ??? ?? AWS ??? C ??? AWS ???? ???? ????, ??? AWS ???? ???? ???:: ...
???? ??? ?? ??? ?? AWS ??? C ??? AWS ???? ???? ????, ??? AWS ???? ???? ???:: ...???? ??? ?? ??? ?? AWS ??? C ??? AWS ???? ???? ????, ??? AWS ???? ???? ???:: ...
???? ??? ?? ??? ?? AWS ??? C ??? AWS ???? ???? ????, ??? AWS ???? ???? ???:: ...
Amazon Web Services Korea
?
REST API ??
REST API ??REST API ??
REST API ??
Terry Cho
?
[????] Vault ???? (??) Nov2021
[????] Vault ???? (??) Nov2021[????] Vault ???? (??) Nov2021
[????] Vault ???? (??) Nov2021
Jin Sol Kim ???
?
Openstack security(2018)
Openstack security(2018)Openstack security(2018)
Openstack security(2018)
Gasida Seo
?
[??? '15.11.27]???? ??? ??? new(??_???)
[??? '15.11.27]???? ??? ??? new(??_???)[??? '15.11.27]???? ??? ??? new(??_???)
[??? '15.11.27]???? ??? ??? new(??_???)
james yoo
?
????? ???? DB ???? ??? '????(QueryPie) DAC'
????? ???? DB ???? ??? '????(QueryPie) DAC'????? ???? DB ???? ??? '????(QueryPie) DAC'
????? ???? DB ???? ??? '????(QueryPie) DAC'
Softwide Security
?
[Devfest Campus Korea 2021]??? ?? ?? ??, ?????
[Devfest Campus Korea 2021]??? ?? ?? ??, ?????[Devfest Campus Korea 2021]??? ?? ?? ??, ?????
[Devfest Campus Korea 2021]??? ?? ?? ??, ?????
GDGCampusKorea
?
Spring Security
Spring SecuritySpring Security
Spring Security
ymtech
?
01.windows ??(?????? ??) 2016.05.25
01.windows ??(?????? ??)   2016.05.2501.windows ??(?????? ??)   2016.05.25
01.windows ??(?????? ??) 2016.05.25
InGuen Hwang
?
Spring camp ?????????
Spring camp ?????????Spring camp ?????????
Spring camp ?????????
?? ?
?
????????? : ????? ????
????????? : ????? ???? ????????? : ????? ????
????????? : ????? ????
??????
?
201412 ??????? ??
201412 ??????? ??201412 ??????? ??
201412 ??????? ??
??????
?
IoT ?? ?????
IoT ?? ?????IoT ?? ?????
IoT ?? ?????
?? ?
?
?????????? ??? ?? ??? - Fluentd? ??? ?????????? Object Storage ?? ????(??? ??...
?????????? ??? ?? ??? - Fluentd? ??? ?????????? Object Storage ?? ????(??? ??...?????????? ??? ?? ??? - Fluentd? ??? ?????????? Object Storage ?? ????(??? ??...
?????????? ??? ?? ??? - Fluentd? ??? ?????????? Object Storage ?? ????(??? ??...
NAVER CLOUD PLATFORM???? ???? ???
?
Spring Security
Spring SecuritySpring Security
Spring Security
DataUs
?
???? ??? ?? ??? ?? AWS ??? C ??? AWS ???? ???? ????, ??? AWS ???? ???? ???:: ...
???? ??? ?? ??? ?? AWS ??? C ??? AWS ???? ???? ????, ??? AWS ???? ???? ???:: ...???? ??? ?? ??? ?? AWS ??? C ??? AWS ???? ???? ????, ??? AWS ???? ???? ???:: ...
???? ??? ?? ??? ?? AWS ??? C ??? AWS ???? ???? ????, ??? AWS ???? ???? ???:: ...
Amazon Web Services Korea
?
[????] Vault ???? (??) Nov2021
[????] Vault ???? (??) Nov2021[????] Vault ???? (??) Nov2021
[????] Vault ???? (??) Nov2021
Jin Sol Kim ???
?
Openstack security(2018)
Openstack security(2018)Openstack security(2018)
Openstack security(2018)
Gasida Seo
?
[??? '15.11.27]???? ??? ??? new(??_???)
[??? '15.11.27]???? ??? ??? new(??_???)[??? '15.11.27]???? ??? ??? new(??_???)
[??? '15.11.27]???? ??? ??? new(??_???)
james yoo
?
????? ???? DB ???? ??? '????(QueryPie) DAC'
????? ???? DB ???? ??? '????(QueryPie) DAC'????? ???? DB ???? ??? '????(QueryPie) DAC'
????? ???? DB ???? ??? '????(QueryPie) DAC'
Softwide Security
?
[Devfest Campus Korea 2021]??? ?? ?? ??, ?????
[Devfest Campus Korea 2021]??? ?? ?? ??, ?????[Devfest Campus Korea 2021]??? ?? ?? ??, ?????
[Devfest Campus Korea 2021]??? ?? ?? ??, ?????
GDGCampusKorea
?

More from beom kyun choi (20)

?? ? ???? ?? ?? Vue.js ??
?? ? ???? ?? ?? Vue.js ???? ? ???? ?? ?? Vue.js ??
?? ? ???? ?? ?? Vue.js ??
beom kyun choi
?
DDD? ??? ???
DDD? ??? ???DDD? ??? ???
DDD? ??? ???
beom kyun choi
?
TDD ?????????? @ ?????
TDD ?????????? @ ?????TDD ?????????? @ ?????
TDD ?????????? @ ?????
beom kyun choi
?
keras ?? ????(intro)
keras ?? ????(intro)keras ?? ????(intro)
keras ?? ????(intro)
beom kyun choi
?
DDD ?? ???
DDD ?? ???DDD ?? ???
DDD ?? ???
beom kyun choi
?
Tensorflow regression ????? ??
Tensorflow regression ????? ??Tensorflow regression ????? ??
Tensorflow regression ????? ??
beom kyun choi
?
Ddd start ????? ????????&ksug
Ddd start ????? ????????&ksugDdd start ????? ????????&ksug
Ddd start ????? ????????&ksug
beom kyun choi
?
MVP ?? ??
MVP ?? ??MVP ?? ??
MVP ?? ??
beom kyun choi
?
??? ?? ??
??? ?? ????? ?? ??
??? ?? ??
beom kyun choi
?
????? KSUG 20151128
????? KSUG 20151128????? KSUG 20151128
????? KSUG 20151128
beom kyun choi
?
Event source ?????? ????? ?????
Event source ?????? ????? ?????Event source ?????? ????? ?????
Event source ?????? ????? ?????
beom kyun choi
?
Spring Boot ??
Spring Boot ??Spring Boot ??
Spring Boot ??
beom kyun choi
?
???????? ?????? ??
???????? ?????? ?????????? ?????? ??
???????? ?????? ??
beom kyun choi
?
Ji ?? ?? (???????)
Ji ?? ?? (???????)Ji ?? ?? (???????)
Ji ?? ?? (???????)
beom kyun choi
?
?????? ????? ????
?????? ????? ?????????? ????? ????
?????? ????? ????
beom kyun choi
?
??8 ??? API ??
??8 ??? API ????8 ??? API ??
??8 ??? API ??
beom kyun choi
?
????8 ???????? ????
????8 ???????? ????????8 ???????? ????
????8 ???????? ????
beom kyun choi
?
Zookeeper ??
Zookeeper ??Zookeeper ??
Zookeeper ??
beom kyun choi
?
??2 YARN ?? ??
??2 YARN ?? ????2 YARN ?? ??
??2 YARN ?? ??
beom kyun choi
?

??????? ???????? ???? ????

  • 1. ??? ???? ?? ?? (? ?????? ??) ?? ?????, ???, 2014-07-09
  • 2. ?? ¢ ??? ????? ?? ??? ?? ?? ? ? $ ?? ?? ?????? ??? ??!
  • 4. ?? ?? 3?? ¢ ?? ??(Principal) $ ??? ??? ???? ??? ¢ ??(Authenticate) $ ?? ???? ???? ???? ?? $ ????? ???/??? ???? ??? ?? ¢ ??(Authorize) $ ?? ???? ?? ??(URL, ?? ?)? ??(??) ? ??? ??? ???? ?
  • 5. ??? ????? ?? 3??? ?? ?? ?? ?? ?? Authentication Authentication Manager Security Interceptor
  • 6. Authentication? SecurityContext ¢ Authentication? ?? $ ?? ?? ?? ??? ?? ?? $ ?? ??? ?, ?? ??? ?? ?? ¢ SecurityContext $ Authentication? ?? $ ??? ????? ?? ???? ?? Authentication ??? ?? ? SecurityContext?? ? ??
  • 7. SecurityContextHolder ¢ SecurityContext? ?? $ ??: ?????? SecurityContext? ?? ¢ ???? SecurityContext ?? ?? Authentication auth = someMethodForGettingAuth(req, resp); try { SecurityContextHolder.getContext().setAuthentication(auth); chain.doFilter(request, response); // ?? ???? ?? SecurityContext ?? } finally { SecurityContextHolder.clearContext(); } ??? ????? ??? ?? ?? ??
  • 8. ??, Authentication? ?? ??? ¢ Authentication? ?? ??? $ String getName(): ???? ?? $ Object getCredential(): ?? ? (???? ?) $ Object getPrincipal(): ?? ?? ?? $ boolean isAuthenticated(): ?????? ?? $ Collection<GrantedAuthority) getAuthorities(): ?? ???? ?? ??(GrantedAuthority)
  • 9. AuthenticationManager ¢ ??? ??? public interface AuthenticationManager { Authentication authenticate(Authentication authentication) throws AuthenticationException; } ¢ ??? ???? ?? ??? ?? ?? Authentication ?? ?? $ ??? ????? ??? Authentication ??? SecurityContext? ?? ? ?? ??? ???? ?? ??? ?? ¢ ?? ??? AuthenticationException? ????
  • 10. (Abstract)SecurityInterceptor ¢ ??? ?? $ ?? ?? FilterSecurityInterceptor ?? ?? $ AccessDecisionManager? ?? ?? ?? public interface AccessDecisionManager { void decide(Authentication authentication, // ??? Object object, // ?? ?? Collection<ConfigAttribute> configAttributes) // ?? ?? throws AccessDeniedException, InsufficientAuthenticationException; boolean supports(ConfigAttribute attribute); boolean supports(Class<?> clazz); } ¢ ???? ??? ?? ?? ????, ?? ??? ?? ?? ??? ??
  • 12. ? ?????? ?? ?? ¢ ?? ?? ??? ??? ?? ?? FilterChainProxy ?? ?? ?? ?? ?? ?? ?? ??? ?? - Authentication ?? ?? - ?? ?? ?? - ?? ?? ?? <sec:http use-expressions="true"> <sec:intercept-url pattern="/admin/**" access="hasAuthority('ROLE_ADMIN')" /> <sec:intercept-url pattern="/manager/**" access="hasRole('ROLE_MANAGER')" /> <sec:intercept-url pattern="/member/**" access="isAuthenticated()" /> <sec:intercept-url pattern="/**" access="permitAll"/> <sec:form-login /> <sec:logout /> </sec:http> ?? ?? ??? ??? ??? ?? (springSecurityFilterChain)
  • 13. ? ??? FilterChainProxy ?? <filter> <filter-name> springSecurityFilterChain </filter-name> <filter-class> o...filter.DelegatingFilterProxy </filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> FilterChainProxy ?? ?? ?? DelegatingFilterProxy
  • 14. ?? ?? ?? ?? ?? ??? ?? ?? ?? SecurityContextPersistenceFilter LogoutFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter AnonymousAuthenticationFilter ExceptionTranslationFilter FilterSecurityInterceptor?? ?? ?? ??? ?? ??? ? ?? ?? ?? ?? ???? ?? ?? Authentication ?? ¢ ?? ??? ???? ? ? ¢ ??? ?? ??? ?? ?? ?? ??? ??? ? ? ?? ??? ??
  • 15. ?? ?? ?? ? ??, ?? ? ?? ?? ?? SecurityContextPersistenceFilter LogoutFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter AnonymousAuthenticationFilter ExceptionTranslationFilter FilterSecurityInterceptor 1. ?? Access Decision Manager 2. ?? ?? ?? 4. ??? ?? Authentication EntryPoint 5. ?? ? ? ?? ? ? <sec:form-login login-page="/user/loginform" />
  • 16. ?? ?? ?? ? ??, ?? ?? ?? ?? ?? SecurityContextPersistenceFilter LogoutFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter AnonymousAuthenticationFilter ExceptionTranslationFilter FilterSecurityInterceptor 1. ?? Access Decision Manager 3. ?? ?? ?? 4. ??? ?? AccessDenied Handler 5. ?? ?? ?? ?? <sec:access-denied-handler error-page="/accessDenied"/> SecurityContext Repository 2. ??? SecurityContext? ??
  • 17. ?? ??? ? ?? ?? ?? ?? SecurityContextPersistenceFilter LogoutFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter AnonymousAuthenticationFilter ExceptionTranslationFilter FilterSecurityInterceptor 1. /spring_security_login ? ? ?? 2. ??? ? ?? ??
  • 18. ?? ?? ?? ?? (???) ?? ?? ?? SecurityContextPersistenceFilter LogoutFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter AnonymousAuthenticationFilter ExceptionTranslationFilter FilterSecurityInterceptor 1. ?? ?? Authentication Manager 2. ?? ?? SecurityContext 3. Authentication ?? Authentication SuccessHandler 4. ?? ??? SecurityContext Repository 5. SecurityContext ?? <sec:form-login login-processing-url="/user/login" username-parameter="userid" password-parameter="password" default-target-url="/index" />
  • 19. ?? ?? ?? ?? (???) ?? ?? ?? SecurityContextPersistenceFilter LogoutFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter AnonymousAuthenticationFilter ExceptionTranslationFilter FilterSecurityInterceptor 1. ?? ?? Authentication Manager 2. ?? ?? Authentication FailureHandler 3. ?? ??? <sec:form-login ... authentication-failure-url="/user/loginform?error=true" />
  • 20. ???? ?? ?? ?? ?? ?? ?? SecurityContextPersistenceFilter LogoutFilter UsernamePasswordAuthenticationFilter DefaultLoginPageGeneratingFilter AnonymousAuthenticationFilter ExceptionTranslationFilter FilterSecurityInterceptor 1. ?? ?? ?? LogoutSuccess Handler 3. ???? ? ?? LogoutHandler 2. ???? ? ? <sec:logout logout-url="/user/logout" logout-success-url= ̄/ ̄ />
  • 23. AuthenticationManager ??2 <sec:authentication-provider> <sec:user-service> <sec:user name="bkchoi" password="1234" authorities="ROLE_USER" /> </sec:user-service> </sec:authentication-provider> <sec:authentication-provider> <sec:jdbc-user-service data-source-ref="dataSource" id="jdbcUserService" /> </sec:authentication-provider>
  • 24. ??? ?? ?? <sec:authentication-manager > <!-- AuthenticationProvider? ??? ?? ?? --> <sec:authentication-provider ref="customAuthenticationProvider" /> <!-- DaoAuthenticationProvider ?? ?? ★ <!-- UserDetailsService? ??? ?? ?? --> <sec:authentication-provider user-service-ref="customUserDetailsService" /> </sec:authentication-manager>
  • 26. FilterSecurityInterceptor <sec:http use-expressions="true"> <sec:intercept-url pattern="/user/loginform" access="permitAll" /> <sec:intercept-url pattern="/user/login" access="permitAll" /> <sec:intercept-url pattern="/admin/usermanager/**" access="hasAuthority('USER_MANAGER')" /> ... </sec:http>