태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.

롸이언의 인생이야기 @ Innovate yourself ™

출처 : http://joybox.tistory.com/181

요즘은 사실 CORBA나 DCOM과 같은 분산 네트워크 기술이 인기가 없다. 관련 기술들을 세팅하고 사용하는 지식과 비용이 만만치 않고, 또한 그 기술들이 시스템 종속적이며, 무엇보다도 이 화려한 기술들이 결국은 네트워크 방화벽을 뚫지 못한다는 치명적인 단점이 있기 때문이다.

그래서 HTTP(80 Port) 하나면 충분하고 유효하다. 그러나 인증 및 보안은 계속 이슈가 되고 있다.

일단, OMA 스펙에 따라 본 RFC 문서를 보면서 HTTP 인증을 대충 구현해볼 생각이다. (OMA DCD 스펙에서는 Digest 인증과 관련하여 RFC 2617을 참고하도록 명시하고 있다.)





다음은 HTTP 기본 인증의 예이다.
(출처: http://www.governmentsecurity.org/articles/OverviewofHTTPAuthentication.php)

less..

1. Client sends standard HTTP request for resource


GET /download/report.doc HTTP/1.1
Accept: application/msword, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Host: 10.0.0.5:81
Connection: Keep-Alive

2. Server reads configuration files and determines that resource falls within a protected directory.

Server can only allow access to known users.

3. Server Sends HTTP 401 Authorization Required Response

HTTP/1.1 401 Authorization Required
Date: Sat, 20 Oct 2001 19:28:06 GMT
Server: Apache/1.3.19 (Unix)
WWW-Authenticate: Basic realm="File Download Authorization"
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

[ html error page for browser to show if user hits cancel ]

3. Browser displays Username/ Password prompt displaying host name and authentication realm.
    [image auth.jpg]

5. Client Resubmits Request with Username/ Password

GET /download/report.doc HTTP/1.1
Accept: application/msword, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Host: 10.0.0.5:81
Connection: Keep-Alive
Authorization: Basic ZnJlZDp0aGF0cyBtZQ==

6. Server compares client information to its user/password list.

a. username : password is valid:  server sends requested content.
b. authorization fails:  server resends 401 Authorization Required header
c. Client hits cancel:  browser shows error message sent along with 401 message.

less..



다음은 HTTP 다이제스트 인증을 구현한 예제이다.

(출처: http://en.wikipedia.org/wiki/Digest_access_authentication

less..

Client request (no authentication):
GET /dir/index.html HTTP/1.0
Host: localhost

Server response:

HTTP/1.0 401 Unauthorised
Server: SokEvo/0.9
Date: Sun, 10 Apr 2005 20:26:47 GMT
WWW-Authenticate: Digest realm="testrealm@host.com",
qop="auth,auth-int",
nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093",
opaque="5ccc069c403ebaf9f0171e9517f40e41"
Content-Type: text/html
Content-Length: 311

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
<TITLE>Error</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
</HEAD>
<BODY><H1>401 Unauthorised.</H1></BODY>
</HTML>

Client request (user name "Mufasa", password "Circle Of Life"):

GET /dir/index.html HTTP/1.0
Host: localhost
Authorization: Digest username="Mufasa",
realm="testrealm@host.com",
nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093",
uri="/dir/index.html",
qop=auth,
nc=00000001,
cnonce="0a4f113b",
response="6629fae49393a05397450978507c4ef1",
opaque="5ccc069c403ebaf9f0171e9517f40e41"

Server response:

HTTP/1.0 200 OK
Server: SokEvo/0.9
Date: Sun, 10 Apr 2005 20:27:03 GMT
Content-Type: text/html
Content-Length: 7984

less..


다음은 HTTP 인증이 지니고 있는 근본적인 제약사항들에 대해 극복해보려는 사례 중 하나이다.
http://www.berenddeboer.net/rest/authentication.html
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by 롸이언
공부 이야기/컴퓨터 몽땅 l 2008/08/16 16:26
1  ... 16 17 18 19 20 21 22 23 24  ... 82 

카테고리

꼭대기 (82)
롸이언 이야기 (7)
가족 이야기 (0)
친구 이야기 (1)
공부 이야기 (51)
취미 이야기 (17)
노래 이야기 (1)

달력

«   2010/03   »
  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      
Statistics Graph
tistory!get rss Tistory Tistory 가입하기! DNS Powered by DNSEver.com