티스토리 뷰
Protocol Endpoints
Authorization server endpoints
- Authorization endpoint
- client가 user-agent rediraction을 통해 resource owner로부터 권한을 얻는 데 사용
- Token endpoint
- client가 client authentication을 통해 authorization code를 access token으로 교환하는 데 사용
Client endpoint
- Redirection endpoint
- authorization server가 resource owner의 user-agent를 통해 client로 authorization credentials를 포함한 응답을 반환하는 데 사용
Authorization Endpoint
resource owner와의 상호작용을 통해 authorization grant를 얻기 위한 endpoint이다.
authorization sever는 username/password 또는 session cookie 등을 통해 resource owner를 인증할 수 있다.
authorization server는 authorization endpoint를 위해 HTTP "GET" method를 제공해야 하며, "POST" method 또한 제공할 수 있다.
Response Type
authorization endpoint는 authorization code grant type과 implicit grant type flow에서 사용된다. client는 grant_type 파라미터를 통해 선호하는 grant type을 전달할 수 있다.
- response_type : grant type에 따라 "code" 또는 "token"이 될 수 있다.
extension response type은 space-delimited list를 포함할 수 있고, 순서는 중요하지 않다.
response_type 파라미터가 없거나 정의되지 않은 값인 경우 에러를 반환해야 한다.
Redirection Endpoint
authorization server가 resource owner와의 상호작용을 마치고 나서 resource owner의 user-agent를 client의 redirection endpoint로 리다이렉트한다. redireaction endpoint URI는 absolute URI여야 한다.
Endpoint Request Confidentiality
response type이 "code" 또는 "token"인 경우나 민감한 credentials가 전송되는 경우 redirection endpoint는 TLS를 사용해야 한다.
Registration Requirements
아래 클라이언트는 redirection endpoint를 authorization server에 등록해야 한다.
- Public clients.
- Confidential clients utilizing the implicit grant type.
redirection endpoint는 완전해야 하며, state를 통해 클라이언트는 동적인 로직을 구현할 수 있다.
클라이언트는 redirection endpoint은 multiple하게 등록할 수 있다.
Dynamic Configuration
authorization server는 등록된 redirect_uri인지 확인 후 리다이렉트 해야 한다.
Invalid Endpoint
redirection URI가 일치하지 않는 경우 resource owner에게 에러 상황을 알리고 user-agent를 리다이렉트 해서는 안된다.
Endpoint Content
클라이언트는 redirection endpoint 응답에 어떤 third-party script(예. third-party analytics, social plug-ins, ad networks)도 포함해서는 안된다. URI에서 credentials을 추출하고 user-agent를 다른 endpoint로 리디렉션해야 한다.
Token Endpoint
client가 authorization grant 또는 refresh token으로 access token을 얻기 위해 사용된다. implicit grant type을 제외한 모든 grant에서 사용된다.
HTTP "POST" method를 사용해야 한다.
Client Authentication
refresh token과 authorization code를 발급한 클라이언트와 바인딩한다.
refresh token 탈취가 의심되는 경우 해당 클라이언트를 비활성화 하거나 credentials를 변경하여 공격자의 남용을 방지한다.
BP는 credential rotation
클라이언트는 client_id 파라미터를 전달하여 다른 클라이언트가 발급 받은 code를 사용하지 않도록 방지해야 한다.
Access Token Scope
authorization과 token endpoint는 scope 요청 파라미터를 통해 scope을 특정할 수 있다.
authorization server는 scope 응답 파라미터를 통해 access token이 가진 권한을 client에 알려줄 수 있다.
scope 파라미터는 a list of space-delimited, case-sensitive strings 이다. (순서는 상관 없음)
그 값은 authorization server가 정의한다.
authorization sever는 정책 또는 resource owner의 뜻에 따라 scope을 무시할 수 있다. 발급된 access token의 scope과 요청된 scope이 다른 경우, scope 응답 파라미터를 통해 client에 알려야 한다.
만약 scope 요청 파라미터가 전달되지 않으면, 정의된 기본값을 사용하거나 invalid scope 에러를 발생시켜야 한다.
'공부 > 인증, 인가' 카테고리의 다른 글
RFC 6749 - 4장 Obtaining Authorization (0) | 2024.07.29 |
---|---|
RFC 6749 - 2장 Client Registration (0) | 2024.07.29 |
RFC 6749 - 1장 Introduction (0) | 2024.07.29 |
RFC 6749 정리 및 요약 (0) | 2024.07.29 |
- Total
- Today
- Yesterday