HTTP authentication을 기반한 Stateless, challenge-based 메카니즘을 이용하여 authentication 제공
"Digest" authentication 메카니즘
Security의 문제로 "Basic" authentication은 사용하지 않음
22.1 Framework#
Framework은 HTTP와 유사함
auth-scheme, auth-param, challenge, realm, realm-value, and credentials는 HTTP와 동일함
401 (Unauthorized) response : UAC에게 identity를 challenge, proxy를 사용 할 수 없음
407 (Proxy Authentication Required) response : Proxy가 authentication을 요청할 경우
realm string
- protection domain
- globally unique
- human-readable
default username : "anonymous", password : ""
ACK와 CANCEL에 대해서는 challege하면 안됨
UAC가 challenge를 받으면 credential을 보내야 함
- WWW-Authenticate header field or Proxy-Authenticate
UAC가 적당한 credential이라고 생각 한것이 유효하지 않을 수도 있음
- 서버는 다시 challenge하거나 403 (Forbidden) response로 보냄
- 같은 credential로는 재시도 하지 않음
22.2 User-to-User Authentication#
401 (Unauthorized) response
- UAS가 credential을 요청
- WWW-Authenticate response-header field는 반드시 포함되어야 함
401을 받은 UAC는 적당한 credential을 가지고 request를 다시 만들어야 함
- Authorization header field에 credential을 포함
401또는 407을 받아 resubmit할 경우, CSeq는 1증가
22.3 Proxy-to-User Authentication#
407 (Proxy Authentication Required) message
- Proxy가 request의 originator를 authenticate 할 수 있음
407 (Proxy Authentication Required)를 받았을 경우
- UAC 적당한 credential을 이용하여 request를 다시 생산
- Proxy-Authorization header field에 credential을 포함
- Proxy는 포워딩 함
credential cashing
- 한번 crendential을 보냈다면 같은 Call-ID의 request는 credential을 포함
forking 되었을 경우
- 모든 response의 WWW-Authenticate and Proxy-Authenticate의 challenge를 포함하여 response를 보냄
401 (Unauthorized) or 407 (Proxy Authentication Required) response에 multiple challenge가 있을 경우
- request에 해당 challenge에 대한 모든 credential을 포함하여야 함
22.4 The Digest Authentication Scheme#
SIP는 HTTP Digest authentication scheme를 수정하여 사용
SIP/2.0과 HTTP/1.1과 Digest 차이점은 다음과 같음
- URI = SIP-URI / SIPS-URI BNF를 포함
- Authorization header field의 'uri'는 quatation mark에 둘러 쌓여야 함
- digest-uri-value의 BNF는 digest-uri-value = Request-URI 임
- Etag를 기반으로 nonce를 선택하는 것은 SIP에서 동작하지 않음
- RFC 2617 [17]의 cache 동작은 SIP에 적용되지 않음
- request line URI와 Authorization header field의 리소스가 같지 않아도 실패가 아님
- empty string에 대한 MD5의 값은 "d41d8cd98f00b204e9800998ecf8427e" 로 정의
- WWW-Authenticate and Proxy-Authenticate header field values에 "qop" value가 있어야 함
challenge에 "qop"가 있었다면 authorization header field에도 "qop"가 있어야 함
'Protocol > SIP' 카테고리의 다른 글
| INFO (0) | 2013.09.25 |
|---|---|
| DTMF Event (0) | 2013.09.25 |
| 19. Common Message Components (0) | 2013.09.25 |
| 18. Transport (0) | 2013.09.25 |
| 17. Transactions (0) | 2013.09.25 |