KR20090035382A - Secure user session managing method and system under web environment, recording medium recorded program executing it - Google Patents
Secure user session managing method and system under web environment, recording medium recorded program executing it Download PDFInfo
- Publication number
- KR20090035382A KR20090035382A KR1020070100638A KR20070100638A KR20090035382A KR 20090035382 A KR20090035382 A KR 20090035382A KR 1020070100638 A KR1020070100638 A KR 1020070100638A KR 20070100638 A KR20070100638 A KR 20070100638A KR 20090035382 A KR20090035382 A KR 20090035382A
- Authority
- KR
- South Korea
- Prior art keywords
- client
- server
- session
- authentication value
- shared key
- Prior art date
Links
- 235000014510 cooky Nutrition 0.000 claims description 43
- 230000004048 modification Effects 0.000 claims description 30
- 238000006011 modification reaction Methods 0.000 claims description 30
- 238000000034 method Methods 0.000 claims description 21
- 238000007726 management method Methods 0.000 claims description 14
- 230000001131 transforming Effects 0.000 claims description 5
- 230000000875 corresponding Effects 0.000 claims description 4
- 238000004422 calculation algorithm Methods 0.000 abstract description 5
- 230000001702 transmitter Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 3
- 239000000969 carrier Substances 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 239000000243 solution Substances 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000002347 injection Methods 0.000 description 1
- 239000007924 injection Substances 0.000 description 1
- 230000003287 optical Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/08—Access security
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/30—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W80/00—Wireless network protocols or protocol adaptations to wireless operation
- H04W80/08—Upper layer protocols
- H04W80/10—Upper layer protocols adapted for application session management, e.g. SIP [Session Initiation Protocol]
Abstract
Description
본 발명은 웹 환경에서의 안전한 사용자 세션 관리 방법 및 시스템에 관한 것이다. The present invention relates to a method and system for secure user session management in a web environment.
일반적으로 웹 환경은 개방형 환경으로 불특정 다수의 사용자가 접속하여 웹 서비스를 받는다. 웹 서비스에서 세션이란 상태 정보를 유지하지 않는 HTTP(hypertext transfer protocol: 인터넷에서, 웹 서버와 사용자의 인터넷 브라우저 사이에 문서를 전송하기 위해 사용되는 통신 규약) 프로토콜에서 한 사용자가 연속적으로 요청하는 일련의 서비스 요구를 처리하기 위하여 서버(server)와 클라이언트(client)에서 저장하고 주고 받는 정보를 의미한다. In general, the web environment is an open environment in which a large number of unspecified users access and receive web services. In web services, a session is a series of consecutive requests from a user in the hypertext transfer protocol (HTTP) protocol, which is used to transfer documents between a web server and a user's Internet browser. Refers to information stored and exchanged between a server and a client in order to process a service request.
웹 환경에서 사용자의 세션을 관리하기 위하여 기존에는 클라이언트가 가진 쿠키(cookie)를 이용하여 사용자를 구분하거나 인증하였다. 일례로, 쿠키에 사용자 의 IP, 해쉬된 사용자의 패스워드, 전자 서명을 유지하는 방법이 있다. In order to manage a user's session in a web environment, the user has been previously identified or authenticated using a cookie of the client. For example, a cookie may contain a user's IP, a hashed user's password, and a digital signature.
하지만, 클라이언트가 가진 쿠키는 HTTP 요청(HTTP request) 때마다 서버에 평문 형태로 자동 전송되기 때문에 쿠키에 포함된 정보가 공격자(attacker)에게 노출되는 문제점이 있다. 그리고 IP 스푸핑(spoofing)이나 오프라인 사전단어 공격(offline dictionary attack)에 취약하여 쿠키를 이용하여 사용자의 세션을 보호하는데 근본적인 해결책이 될 수 없는 문제점이 있다. However, since the cookie of the client is automatically sent to the server in plain text every HTTP request, the information contained in the cookie is exposed to an attacker. In addition, there is a problem that cannot be a fundamental solution in protecting a user's session by using a cookie because it is vulnerable to IP spoofing or offline dictionary attack.
즉, 사용자의 세션 유지에 사용되는 쿠키는 도청(sniffing) 등을 통해 쉽게 노출될 수 있다. 이를 방지하기 위한 액티브X(ActiveX)는 사용자에게 부담이 되거나 편리성을 제공하지 못하는 문제점이 있다. 또한, 액티브X 자체의 설치에 문제가 발생하는 경우에는 웹 서비스에 접근조차 불가능한 경우도 발생한다. That is, the cookie used to maintain the session of the user can be easily exposed through sniffing or the like. ActiveX to prevent this has a problem that does not burden the user or provide convenience. Also, if you have a problem installing ActiveX itself, you may not even be able to access Web services.
본 발명은 시도-응답(challenge-response) 방식의 인증 알고리즘을 HTTP 프로토콜에 적용하여 사용자의 세션 보호가 가능한 사용자 세션 관리 방법 및 시스템, 이를 수행하는 프로그램이 기록된 기록매체를 제공한다. The present invention provides a user session management method and system capable of protecting a user's session by applying a challenge-response authentication algorithm to the HTTP protocol, and a recording medium having recorded thereon a program for performing the same.
또한, 본 발명은 웹 브라우저에서 비밀키를 저장하기 위하여 쿠키가 아닌 다른 저장 공간을 이용함으로써 평문 형태로 자동 전송되는 종래 쿠키의 단점을 극복한 사용자 세션 관리 방법 및 시스템, 이를 수행하는 프로그램이 기록된 기록매체를 제공한다. In addition, the present invention is a method and system for managing a user session that overcomes the shortcomings of conventional cookies that are automatically transmitted in plain text by using a storage space other than a cookie for storing a secret key in a web browser, and a program for performing the same. Provide a record carrier.
본 발명의 일 측면에 따르면, 웹 환경에서 네트워크를 통해 클라이언트와 연결된 서버에서 상기 클라이언트와의 사용자 세션을 관리하는 방법이 제공된다. According to an aspect of the present invention, a method for managing a user session with a client in a server connected to the client via a network in a web environment is provided.
사용자 세션 관리 방법은, 상기 서버가 상기 클라이언트로부터 쿠키(cookie)를 포함하는 제1 HTTP 요청(HTTP request)을 전송받는 단계-여기서, 상기 쿠키는 클라이언트 인증값을 포함하고, 상기 클라이언트 인증값은 상기 클라이언트에 저장된 공유키와 상기 클라이언트가 직전에 전송받은 제1 HTTP 응답(HTTP response)에 포함된 세션정보를 이용하여 계산됨-; 상기 쿠키에 포함된 클라이언트 인증값과 서버 인증값을 비교하는 단계-상기 서버 인증값은 상기 서버가 생성하여 상기 제1 HTTP 응답에 포함된 세션정보와 상기 서버에 저장된 공유키를 이용하여 계산됨-; 및 상기 비교 결과에 따라 상기 클라이언트의 송신자 인증 성공 또는 실패를 결정하는 단계를 포함한다. The user session management method, the server receiving a first HTTP request (HTTP request) including a cookie from the client, wherein the cookie includes a client authentication value, the client authentication value is the Calculated using a shared key stored in a client and session information included in a first HTTP response received immediately before the client; Comparing the client authentication value and the server authentication value included in the cookie, wherein the server authentication value is calculated using the session information generated by the server and included in the first HTTP response and the shared key stored in the server; ; And determining success or failure of sender authentication of the client according to the comparison result.
상기 서버는 상기 클라이언트로부터의 사용자 로그인 과정에서 상기 공유키를 상기 클라이언트와 공유할 수 있다. The server may share the shared key with the client during a user login process from the client.
한편, 상기 제1 HTTP 요청은 송신자 인증을 필요로 할 수 있다.Meanwhile, the first HTTP request may require sender authentication.
또한, 상기 송신자 인증 성공 또는 실패 결정 단계는, 상기 서버 인증값과 상기 클라이언트 인증값이 동일한 경우 상기 사용자 세션이 유효한 것으로 간주하여 상기 세션정보를 갱신하고, 상기 갱신한 세션정보에 상응하는 서버 인증값을 계산하며, 상기 제1 HTTP 요청에 대한 제2 HTTP 응답에 상기 갱신한 세션정보를 포함시켜 상기 클라이언트에 전송할 수 있다. 여기서, 상기 사용자 세션이 유효한 것으 로 간주하는 경우 상기 제2 HTTP 응답은 상기 클라이언트가 저장하고 있는 공유키와 상기 제2 HTTP 응답에 포함된 상기 세션정보를 이용하여 일방향 함수로 상기 클라이언트 인증값을 계산하고, 상기 클라이언트 인증값을 상기 쿠키에 포함시키도록 하는 실행코드를 포함할 수 있다. 그리고 상기 서버 인증값은 상기 클라이언트 인증값을 계산한 일방향 함수와 동일한 함수로 계산할 수 있다. In the determining of whether the sender authentication succeeds or fails, if the server authentication value and the client authentication value are the same, the sender authentication is regarded as valid and the session information is updated, and the server authentication value corresponding to the updated session information is updated. May be calculated and include the updated session information in a second HTTP response to the first HTTP request and transmit it to the client. Here, when the user session is regarded as valid, the second HTTP response calculates the client authentication value using a one-way function by using the shared key stored by the client and the session information included in the second HTTP response. And executable code for including the client authentication value in the cookie. The server authentication value may be calculated using the same function as the one-way function for calculating the client authentication value.
한편, 상기 인증 성공 또는 실패 결정 단계는, 상기 서버 인증값과 상기 클라이언트 인증값이 다른 경우 상기 사용자 세션이 유효하지 않은 것으로 간주하여 상기 서버는 상기 사용자 세션을 삭제할 수 있다. 상기 사용자 세션이 유효하지 않은 것으로 간주하는 경우 상기 서버는 상기 클라이언트의 상기 공유키, 상기 세션정보, 상기 클라이언트 인증값 및 상기 쿠키 중 적어도 하나를 NULL로 만드는 클라이언트측 스크립트(Client Side Script), 플래시(Flash) 또는 액티브X(ActiveX)를 상기 클라이언트에 전송할 수 있다. Meanwhile, in the authentication success or failure determination step, when the server authentication value and the client authentication value are different, the server may consider the user session invalid and delete the user session. If the user session is considered invalid, the server may generate at least one of the client's shared key, the session information, the client authentication value, and the cookie to NULL. Flash) or ActiveX can be sent to the client.
또한, 상기 서버는 상기 클라이언트와 상기 공유키를 공유하는 단계; 상기 클라이언트로부터 제2 HTTP 요청을 전송받는 단계; 상기 세션정보를 생성하는 단계; 및 상기 세션정보를 상기 제2 HTTP 요청에 대한 상기 제1 HTTP 응답에 포함시켜 상기 클라이언트에 전송하는 단계가 선행할 수 있다. The server may also share the shared key with the client; Receiving a second HTTP request from the client; Generating the session information; And including the session information in the first HTTP response to the second HTTP request and transmitting the session information to the client.
또한, 상기 서버는 웹 어플리케이션에서 제공하는 세션 또는 데이터베이스에 상기 공유키, 상기 세션정보와 상기 서버 인증값을 저장할 수 있다. The server may store the shared key, the session information, and the server authentication value in a session or database provided by a web application.
그리고 상기 서버는 상기 제1 HTTP 응답시 HTTP 내용 중 일부를 상기 공유키를 이용하여 암호화하고, 이를 복호화할 수 있는 클라이언트측 스크립트, 플래시 또는 액티브X를 포함하여 상기 클라이언트에 전송하는 단계를 더 포함함 수 있다.The server may further include encrypting a part of the HTTP content by using the shared key in the first HTTP response, and transmitting the same to the client, including a client-side script, flash, or ActiveX, which can decrypt the content. Can be.
한편, 상기 서버는 상기 제1 HTTP 응답시 상기 클라이언트가 HTTP 내용 중 일부를 암호화할 수 있도록 하는 암호 루틴을 포함하여 상기 클라이언트에 전송하는 단계를 더 포함하되, 상기 클라이언트는 상기 암호 루틴에 따라 상기 공유키를 이용하여 상기 HTTP 내용 중 일부가 암호화된 상기 제1 HTTP 요청을 상기 서버에 전송할 수 있다. On the other hand, the server further comprises the step of transmitting to the client including a cryptographic routine that allows the client to encrypt some of the HTTP content in the first HTTP response, wherein the client is the shared according to the cryptographic routine The first HTTP request in which a portion of the HTTP content is encrypted may be transmitted to the server using a key.
상기 세션정보는 난수(random number)일 수 있다.The session information may be a random number.
또는 상기 세션정보는 난수와 키 변형 인수를 포함할 수 있다. 상기 서버 인증값은 상기 서버에 저장된 상기 공유키 및 상기 키 변형 인수를 이용하여 계산한 서버 비밀키와, 상기 난수를 인수로 하는 일방향 함수로 계산될 수 있다. 상기 클라이언트 인증값은 상기 클라이언트에 저장된 상기 공유키 및 상기 클라이언트가 상기 서버로부터 전송받은 상기 제1 HTTP 응답에 포함된 상기 키 변형 인수를 이용하여 계산한 클라이언트 비밀키와, 상기 제1 HTTP 응답에 포함된 상기 난수를 인수로 하는 일방향 함수로 계산될 수 있다. Alternatively, the session information may include a random number and a key modification factor. The server authentication value may be calculated as a server secret key calculated using the shared key and the key modification factor stored in the server, and a one-way function having the random number as an argument. The client authentication value is included in the first HTTP response and the client secret key calculated using the shared key stored in the client and the key modification factor included in the first HTTP response received by the client from the server. It can be calculated as a one-way function taking the random number.
한편, 상술한 사용자 세션 관리 방법은 컴퓨터에 의하여 수행될 수 있으며, 컴퓨터에서 실행하기 위한 프로그램을 기록하는 컴퓨터 판독 가능한 기록매체에 기록되어 서버에서 수행될 수 있다. Meanwhile, the above-described user session management method may be performed by a computer, and may be recorded on a computer-readable recording medium for recording a program to be executed on the computer, and then performed by a server.
본 발명의 다른 측면에 따르면, 웹 환경에서 네트워크를 통해 서버와 연결된 클라이언트에서 사용자 세션을 관리하는 방법이 제공된다. According to another aspect of the present invention, a method for managing a user session in a client connected to a server via a network in a web environment is provided.
사용자 세션 관리 방법은, 상기 클라이언트가 상기 서버와 공유키를 공유하 는 단계; 상기 공유키를 웹 브라우저의 문서 객체 모델(DOM: Document Object Model)의 윈도우 객체의 속성 중 윈도우 이름(window.name), 플래시(Flash)의 지역 공유 객체(LSO: Local Shared Object) 또는 액티브X에 저장하는 단계; 상기 서버로부터의 HTTP 응답을 전송받는 단계-상기 HTTP 응답은 상기 서버에서 생성된 세션정보를 포함함-; 상기 세션정보와 상기 공유키를 이용하여 클라이언트 인증값을 계산하는 단계; 및 상기 클라이언트 인증값을 쿠키에 저장하는 단계를 포함한다. A user session management method includes the steps of: sharing a shared key with the server by the client; The shared key may be assigned to a window name (window.name), a local shared object (LSO) or ActiveX of a window object of a document object model (DOM) of a web browser. Storing; Receiving an HTTP response from the server, wherein the HTTP response includes session information generated at the server; Calculating a client authentication value using the session information and the shared key; And storing the client authentication value in a cookie.
송신자 인증이 필요한 HTTP 요청시 상기 쿠키를 포함하여 상기 서버에 전송하는 단계를 더 포함할 수 있다.The method may further include transmitting the cookie to the server in response to an HTTP request requiring sender authentication.
한편, 상기 클라이언트 인증값은 상기 세션정보와 상기 공유키를 이용하여 일방향 함수로 계산될 수 있다. The client authentication value may be calculated as a one-way function using the session information and the shared key.
상기 HTTP 응답은 상기 클라이언트가 HTTP 내용 중 일부를 암호화할 수 있도록 하는 암호 루틴을 포함하여 상기 클라이언트에 전송되되, 상기 클라이언트는 상기 암호 루틴에 따라 상기 공유키를 이용하여 상기 HTTP 내용 중 일부가 암호화된 HTTP 요청을 상기 서버에 전송하는 단계를 더 포함할 수 있다. The HTTP response is sent to the client including a cryptographic routine that allows the client to encrypt some of the HTTP content, wherein the client encrypts a portion of the HTTP content using the shared key according to the cryptographic routine. The method may further include transmitting an HTTP request to the server.
상기 세션정보는 난수일 수 있다.The session information may be a random number.
또는 상기 세션정보는 난수와 키 변형 인수를 포함할 수 있다. 상기 클라이언트 인증값은 상기 클라이언트에 저장된 상기 공유키 및 상기 키 변형 인수를 이용하여 계산한 클라이언트 비밀키와, 상기 HTTP 응답에 포함된 상기 난수를 인수로 하는 일방향 함수로 계산될 수 있다. Alternatively, the session information may include a random number and a key modification factor. The client authentication value may be calculated as a one-way function that takes a client secret key calculated using the shared key and the key modification factor stored in the client, and the random number included in the HTTP response.
한편, 상술한 사용자 세션 관리 방법은 컴퓨터에 의하여 수행될 수 있으며, 컴퓨터에서 실행하기 위한 프로그램을 기록하는 컴퓨터 판독 가능한 기록매체에 기록되어 클라이언트에서 수행될 수 있다. Meanwhile, the above-described user session management method may be performed by a computer, and may be recorded on a computer-readable recording medium for recording a program to be executed on the computer and executed by the client.
본 발명의 또 다른 측면에 따르면, 웹 환경에서 네트워크를 통해 연결된 클라이언트와 서버 간의 사용자 세션을 관리하는 시스템에 있어서, 상기 클라이언트와 상기 서버는 공유키를 공유하고, 상기 사용자 세션이 유효한 동안 상기 클라이언트로부터의 HTTP 요청이 시도-응답 프로토콜(challenge-response protocol) 중 응답(response) 과정에 해당하고, 상기 서버로부터의 HTTP 응답이 상기 시도-응답 프로토콜 중 시도(challenge) 과정에 해당하는 것을 특징으로 하는 사용자 세션 관리 시스템이 제공된다.According to another aspect of the present invention, in a system for managing a user session between a client and a server connected via a network in a web environment, the client and the server share a shared key, from the client while the user session is valid A user of an HTTP request corresponding to a challenge process among a challenge-response protocol, and an HTTP response from the server corresponds to a challenge process among the challenge-response protocols A session management system is provided.
여기서, 상기 서버는 상기 공유키를 이용하여 생성한 서버측 세션유지정보와, 상기 공유키를 이용하여 상기 클라이언트에서 생성한 상기 클라이언트측 세션유지정보-여기서, 상기 클라이언트측 세션유지정보는 상기 HTTP 요청에 포함됨-를 비교하여 상기 사용자 세션의 유효 여부를 결정할 수 있다. Here, the server is server-side session maintenance information generated using the shared key, and the client-side session maintenance information generated by the client using the shared key, wherein the client-side session maintenance information is the HTTP request Included in-may be compared to determine whether the user session is valid.
전술한 것 외의 다른 측면, 특징, 이점이 이하의 도면, 특허청구범위 및 발명의 상세한 설명으로부터 명확해질 것이다.Other aspects, features, and advantages other than those described above will become apparent from the following drawings, claims, and detailed description of the invention.
본 발명에 따른 사용자 세션 관리 방법 및 시스템, 이를 수행하는 프로그램이 기록된 기록매체는 시도-응답 방식의 인증 알고리즘을 HTTP 프로토콜에 적용하여 사용자의 세션 보호가 가능하다. A method and system for managing a user session according to the present invention and a recording medium on which a program for performing the same are recorded can protect a user's session by applying a challenge-response authentication algorithm to the HTTP protocol.
또한, 웹 브라우저에서 공유키를 저장하기 위하여 쿠키가 아닌 다른 저장 공간을 이용함으로써 평문 형태로 자동 전송되는 종래 쿠키의 단점 극복이 가능한 효과가 있다. In addition, by using a storage space other than the cookie to store the shared key in the web browser it is possible to overcome the disadvantage of the conventional cookie that is automatically transmitted in the form of plain text.
또한, HTTP에서 웹 서비스에 로그인한 사용자와 서버 사이의 채널을 시도-응답 방식의 인증 알고리즘을 이용하여 도청(sniffing), 침입(injection), 위조(forgery) 등의 공격으로부터 안전하게 보호할 수 있다.In addition, a channel between a user logged in to a web service and a server in HTTP can be secured from an attack such as sniffing, injection, and forgery using a challenge-response authentication algorithm.
또한, 액티브X 등의 신규 프로그램을 클라이언트에 배포하지 않고서도 사용자의 세션 보호가 가능하며, 클라이언트의 웹 브라우저가 서버와 계속 통신을 유지하지 않아도 된다. 그리고 상술한 과정을 통해 인증된 쿠키로 서버에서 제공하는 다양한 웹 서비스와 안전하게 세션 공유가 가능하다. In addition, users' sessions can be protected without distributing new programs such as ActiveX to the client, and the client's web browser does not have to maintain communication with the server. In addition, the session can be securely shared with various web services provided by the server using the authenticated cookie.
본 발명은 다양한 변환을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변환, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 본 발명을 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.As the invention allows for various changes and numerous embodiments, particular embodiments will be illustrated in the drawings and described in detail in the written description. However, this is not intended to limit the present invention to specific embodiments, it should be understood to include all transformations, equivalents, and substitutes included in the spirit and scope of the present invention. In the following description of the present invention, if it is determined that the detailed description of the related known technology may obscure the gist of the present invention, the detailed description thereof will be omitted.
제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. Terms such as first and second may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another.
본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this application, the terms "comprise" or "have" are intended to indicate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof.
도 1은 본 발명에 적용되는 시도-응답 프로토콜(challenge-response protocol)의 인증 방법을 설명한 도면이다. 이하에서 비밀키는 클라이언트(1)가 클라이어트 인증값을 계산하고 서버(2)가 서버 인증값을 계산하기 위해 필요한 키이며, 공유키는 클라이언트(1)와 서버(2)가 최초 사용자 로그인 과정에서 공유하는 키를 의미한다.1 is a view for explaining the authentication method of the challenge-response protocol applied to the present invention. Hereinafter, the secret key is a key required for the
클라이언트(1)와 서버(2) 사이의 비밀키인 K를 클라이언트(1)와 서버(2)가 서로 공유하고 있다(단계 S10). 여기서, 비밀키 K는 공유키에 해당한다. 공유키 K는 안전한 키 교환 프로토콜(예를 들어, PAKE(Password Authenticated Key Exchange) 등)을 이용하여 클라이언트(1)를 통한 서버(2)로의 사용자 로그인 과정에서 공유가능하다. The
서버(2)는 난수 R1을 생성하고(단계 S11), 세션 등을 이용하여 난수 R1을 저장한다. 그리고 생성한 난수 R1을 클라이언트(1)에 전송한다(단계 S12). 난수 R1을 클라이언트(1)에 전송하는 과정이 시도(challenge) 과정에 해당한다. The
클라이언트(1)는 서버(2)로부터 전송받은 난수 R1과 클라이언트(1)가 미리 저장하고 있었던 공유키 K를 이용하여 클라이언트 인증값 C를 계산한다(단계 S13). 난수 R1과 공유키 K를 이용하여 클라이언트 인증값 C를 계산하는 함수는 일방향 함수이다. 일방향 함수는 인수로부터 결과(함수값)를 구하는 것은 간단하지만, 결과로부터 인수를 구하는 것은 어려운 함수를 일컬으며, 이러한 일방향 함수로는 해쉬 함수, 유사 난수 함수 등이 포함된다. The
클라이언트(1)는 생성된 클라이언트 인증값 C를 서버(2)에 전송한다(단계 S14). 클라이언트 인증값 C를 서버(2)에 전송하는 과정이 응답(response) 과정에 해당한다. The
서버(2)는 단계 S11에서 난수 R1을 생성한 후 후술할 단계 S16 이전까지의 과정 중에 임의의 시점에서 난수 R1과 서버(2)가 미리 저장하고 있었던 공유키 K를 이용하여 서버 인증값 S를 계산한다(단계 S15). 난수 R1과 공유키 K를 이용하여 서버 인증값 S를 계산하는 함수는 일방향 함수이며, 클라이언트(1)에서 이용한 일방향 함수와 동일한 것이 바람직하다. The
서버(2)는 클라이언트(1)로부터 전송받은 클라이언트 인증값 C와, 서버(2) 내에서 생성한 서버 인증값 S를 비교한다(단계 S16). The
비교 결과 클라이언트 인증값 C와 서버 인증값 S가 다른 경우에는 클라이언 트(1)가 가지고 있는 공유키 K가 서버(2)가 가지고 있는 공유키 K와 다른 것으로 판단하여 클라이언트(1)의 인증에 실패한 것으로 간주하고(단계 S17), 사용자 세션이 유효하지 않으므로 사용자 세션을 삭제한다. As a result of the comparison, when the client authentication value C and the server authentication value S are different, it is determined that the shared key K of the
비교 결과 클라이언트 인증값 C와 서버 인증값 S가 동일한 경우에는 클라이언트(1)가 가지고 있는 공유키 K가 서버(2)가 가지고 있는 공유키 K와 동일한 것으로 판단하여 클라이언트(1)의 인증에 성공한 것으로 간주하고(단계 S18), 사용자 세션의 유효를 유지시킨다. 그리고 새로운 난수 R2를 생성한다(단계 S19). 그리고 상술한 단계 S12 내지 S16에 설명한 시도-응답 과정에 따라 클라이언트(1)의 인증을 반복하게 된다. As a result of the comparison, if the client authentication value C and the server authentication value S are the same, it is determined that the shared key K of the
본 발명에서는 상술한 시도-응답 프로토콜을 HTTP 프로토콜에 적용함으로써 웹 환경에서 안전한 사용자 세션 관리 방법 및 시스템을 제공하고자 한다. The present invention provides a method and system for secure user session management in a web environment by applying the above-described challenge-response protocol to the HTTP protocol.
도 2는 본 발명의 일 실시예에 따른 서버에 포함되는 세션 관리 모듈의 블록구성도이고, 도 3은 본 발명의 일 실시예에 따른 안전한 사용자 세션 관리 방법, HTTP 요청의 송신자 인증 프로토콜을 설명한 도면이다. 2 is a block diagram illustrating a session management module included in a server according to an embodiment of the present invention, and FIG. 3 is a diagram illustrating a secure user session management method and a sender authentication protocol of an HTTP request according to an embodiment of the present invention. to be.
도 2를 참조하면, 세션 관리 모듈(20), 난수 생성부(21), 인증값 산출부(22), 인증값 비교부(23), 인증 관리부(24)가 도시되어 있다. 2, a
세션 관리 모듈(20)은 웹 서비스를 제공하는 서버(2)에 포함된다. 세션 관리 모듈(20)은 클라이언트(1)로부터의 HTTP 요청에 대한 송신자 인증을 위해 세션을 관리한다. The
난수 생성부(21)는 클라이언트(1)와 공유하기 위한 난수를 생성한다. The
인증값 산출부(22)는 생성된 난수와 미리 저장되어 있는 공유키 등을 인수로 하는 미리 정해진 함수로 계산한 결과값인 서버 인증값을 산출한다. The authentication
인증값 비교부(23)는 인증값 산출부(22)에서 계산한 서버 인증값과 클라이언트(1)로부터 전송되는 클라이언트 인증값(클라이언트(1)에서 난수와 공유키 등을 인수로 하는 미리 정해진 함수로 계산한 결과값)을 비교한다. The authentication
인증 관리부(24)는 비교 결과에 따라 HTTP 요청을 한 클라이언트(1)의 송신자 인증 성공 또는 인증 실패가 결정된다. 인증이 실패한 경우 부적합한 클라이언트(1)로부터의 HTTP 요청(예를 들어, 공격자의 HTTP 요청 등)으로 판단하고 세션을 삭제시킨다. 인증이 성공한 경우 적합한 클라이언트(1)로부터의 HTTP 요청으로 판단하고 세션을 유지시킨다. The
이하에서는 상술한 세션 관리 모듈(20)의 동작 및 웹 환경에서 네트워크로 연결된 클라이언트(1)와 서버(2)를 포함하는 본 발명에 따른 사용자 세션 관리 시스템에서의 HTTP 요청 및 HTTP 응답 흐름에 대하여 도 3을 참조하여 상세히 설명하기로 한다. 본 발명의 이해와 설명의 편의를 위하여 세션 관리 모듈(20)은 서버(2)로 표현하기로 한다. Hereinafter, the operation of the above-described
클라이언트(1)와 서버(2) 사이의 비밀키 K를 클라이언트(1)와 서버(2)가 서로 공유하고 있다(단계 S30). 즉, 비밀키 K는 공유키에 해당한다. 공유키 K는 안전한 키 교환 프로토콜(예를 들어, PAKE 등)를 이용하여 클라이언트(1)를 통한 서버(2)로의 웹 서비스의 사용자 로그인 과정에서 공유가능하다. The secret key K between the
공유키 K는 클라이언트(1)의 로그인 단계에서 교환되어 로그아웃될 때까지 웹 브라우저에 저장되어 있어야 한다. 그리고 웹 페이지가 바뀌더라도 지속적으로 유지되어야 한다. The shared key K must be stored in the web browser until it is exchanged and logged out at the login stage of the
이 경우 공유키를 쿠키에 저장하는 경우 클라이언트(1)로부터의 HTTP 요청에 쿠키가 포함되어 네트워크로 전송되므로 공유키가 그대로 노출되는 문제점이 있다. In this case, when the shared key is stored in a cookie, the cookie is included in the HTTP request from the
따라서, 클라이언트(1)는 공유키 K를 쿠키가 아닌 별도의 저장 공간에 저장한다. 웹 브라우저의 문서 객체 모델(DOM: Document Object Model)의 윈도우 객체의 속성 중 윈도우 이름(window.name), 플래시(Flash)의 지역 공유 객체(LSO: Local Shared Object), 액티브X 등의 저장 공간이 이용될 수 있다. 이러한 저장 공간에 대해서는 추후 상세히 설명하기로 한다. Therefore, the
클라이언트(1)로부터 HTTP 요청(HTTP request)이 전송되면(단계 S31), 서버(2)는 다음과 같이 동작한다. When an HTTP request is transmitted from the client 1 (step S31), the
서버(2)는 난수 R을 생성한다(단계 S32). 이와 관련된 의사 코드(Pseudo code)는 하기와 같다. The
R = random()R = random ()
서버(2)는 난수 R과 공유키 K를 이용하여 미리 정해진 함수로 계산한 결과값인 서버 인증값 S를 산출한다(단계 S37). 여기서, 사용자 식별정보인 ID 등이 미리 정해진 함수의 인수로 더 포함될 수 있다. 이와 관련된 의사 코드는 하기와 같다.The
S = Func(K, R, ID, …)S = Func (K, R, ID,…)
여기서, 미리 정해진 함수는 일방향 함수인 것이 바람직하다. 일방향 함수는 인수로부터 결과(함수값)를 구하는 것은 간단하지만, 결과로부터 인수를 구하는 것은 어려운 함수를 일컬으며, 이러한 일방향 함수로는 해쉬 함수, 유사 난수 함수 등이 포함된다. Here, the predetermined function is preferably a one-way function. One-way functions are simple to get the result (function value) from the argument, but it is difficult to get the argument from the result. Such one-way functions include hash functions, pseudorandom functions, and the like.
서버(2)는 공유키 K, 난수 R, 서버 인증값 S를 웹 어플리케이션에서 제공하는 세션 또는 데이터베이스에 저장한다. 이와 관련된 의사 코드는 하기와 같다. The
Session = {K, R, S}Session = {K, R, S}
상술한 단계 S37은 후술한 단계 S32 이후 단계 S38 이전에 임의의 시점에서 서버(2)에서 수행되면 충분하다. It is sufficient that step S37 described above is performed at the
서버(2)는 HTTP 응답(HTTP response)을 통해 단계 S32에서 생성된 난수 R을 클라이언트(1)에 전송한다(단계 S33). 난수 R은 세션정보에 해당한다. 여기서, 세션정보는 사용자 세션 인증을 위해 서버(2)가 클라이언트(1)에 제공하는 정보를 의미한다. The
클라이언트(1)는 전송받은 난수 R과, 소정의 저장 공간에 저장된 공유키 K를 이용하여 미리 정해진 함수로 계산한 결과값인 클라이언트 인증값 C를 산출한다(단계 S34). 여기서, 사용자 식별정보인 ID 등이 미리 정해진 함수의 인수로 더 포함될 수 있다. 여기서, 미리 정해진 함수는 단계 S37에서 서버(2)가 이용한 일방향 함수와 동일해야 한다. The
이후 클라이언트(1)는 산출된 클라이언트 인증값 C를 쿠키에 저장한다(단계 S35). 이와 관련된 의사 코드는 하기와 같다. The
setCookie(C = Func(K, R, ID, …))setCookie (C = Func (K, R, ID,…))
클라이언트(1)가 HTTP 요청을 하는 경우 클라이언트 인증값 C를 저장하고 있는 쿠키는 자동으로 포함되어 서버(2)로 전송된다(단계 S36). When the
서버(2)는 쿠키에 포함된 클라이언트 인증값 C와 단계 S37에서 산출된 서버 인증값 S를 비교한다(단계 S38). 비교 결과 두 인증값이 다른 경우 단계 S39로 진행하고, 동일한 경우 단계 S40으로 진행한다. The
단계 S39에서, 두 인증값이 다르므로 서버(2)는 클라이언트(1)의 송신자 인증이 실패한 것으로 간주하고 서버(2)에 저장된 서버측 세션유지정보(난수 R, 공유키 K 등)를 삭제하고 세션을 삭제한다. 이와 관련된 의사 코드는 하기와 같다. In step S39, since the two authentication values are different, the
Session destroy()Session destroy ()
그리고 클라이언트(1)에 저장된 클라이언트측 세션유지정보(공유키 K와 난수 R, 쿠키 등)가 모두 NULL로 설정되도록 하는 클라이언트측 스크립트(Client Side Script), 플래시 또는 액티브X를 클라이언트(1)에 전송한다. 이 과정에서 사용자는 로그아웃된다. Then, the client side script (Flash) or ActiveX is transmitted to the
단계 S40에서, 두 인증값이 동일하므로 서버(2)는 클라이언트(1)의 송신자 인증이 성공한 것으로 간주하고, 새로운 난수 R을 생성한다(단계 S41). 그리고 클라이언트(1)가 HTTP 요청을 통해 요청한 서비스에 대한 HTTP 응답에 새로 생성된 난수 R을 첨부하여 클라이언트(1)에 전송한다(단계 S42). 이후 서버(2)는 다른 HTTP 요청을 받게 되면 단계 S38 이하의 과정을 반복하게 된다. In step S40, since the two authentication values are the same, the
클라이언트(1)는 단계 S30에서 교환한 공유키 K를 쿠키가 아닌 별도의 저장 공간에 저장한다. 웹 브라우저의 문서 객체 모델(DOM: Document Object Model)의 윈도우 객체의 속성 중 윈도우 이름(window.name), 플래시(Flash)의 지역 공유 객체(LSO: Local Shared Object), 액티브X 등의 저장 공간이 이용될 수 있다. The
일 실시예로, 클라이언트(1)에서의 저장 공간은 웹 브라우저의 문서 객체 모델(DOM: Document Object Model)의 윈도우 객체의 속성 중 윈도우 이름(window.name)일 수 있다. 여기서, 문서 객체 모델은 웹 브라우저를 통한 확장성 생성 언어(XML) 문서의 상호 연동을 위한 객체 기반의 문서 모델을 의미한다. 플랫폼과 언어 면에서 중립적인 인터페이스로서 프로그램과 스크립트에 의한 문서의 내용, 구조, 종류의 동적인 접근과 변경이 가능하며, 스크립트나 프로그램 언어에 웹 페이지를 연결해 준다. 웹 페이지를 조작, 생성하기 위해 사용되는 속성(property), 방법(method) 및 이벤트(event)가 객체를 구성하는데, 이러한 객체들은 대부분의 웹 브라우저에서 스크립트 언어를 통해 접근할 수 있다.In one embodiment, the storage space in the
윈도우 이름(window.name)의 원래 목적은 각각의 브라우저(또는 탭)마다 이름을 부여하고 이 이름을 통해서 브라우저 간에 접근이 가능하도록 하는 것이었다. 브라우저 내의 페이지가 바뀌더라도 브라우저의 이름은 바뀌지 않기 때문에 최근엔 이를 이용하여 페이지 사이에 데이터를 전달하는 용도로 사용하고 있다. 윈도우 이름은 쓰기 가능한 크기도 정해져 있지 않아서 원하는 데이터를 크기 제한 없이 저장할 수 있다는 장점이 있다. The original purpose of the window name (window.name) was to give each browser (or tab) a name and make it accessible between browsers. Since the name of the browser does not change even if the page in the browser is changed, it is recently used to transfer data between pages. The name of the window is not fixed, and the advantage is that you can store the data you want without limiting its size.
다른 실시예로, 클라이언트(1)에서의 저장 공간은 플래시의 지역 공유 객체(LSO: Local Shared Object)일 수 있다. 지역 공유 객체는 플래시 플레이어에서 사용되는 쿠키와 유사한 데이터 엔티티(cookie-like data entity)이다. 플레시 플레이어에서 구동되는 어플리케이션은 스트링(string)이나 숫자(number) 같은 기본 데이터 타입(basic data type)으로 구성되거나 더 복잡한 객체로 구성되는 데이터를 저장(store)하고 검색(retrieve)할 수 있다. 플래시의 지역 공유 객체는 플래시 플러그인(plug-in)이 설치되어 있다면 이용할 수 있는 공간이다. 변수명이 윈도우 이름(window.name)으로 지정된 일 실시예와는 다르게 변수명을 원하는 것으로 설정할 수 있고 쿠키와 같이 도메인별로 데이터를 관리할 수 있기 때문에 보안문제가 어느 정도 완화될 수 있다. 지역 공유 객체의 기본 크기는 100kB이다.In another embodiment, the storage space at the
또 다른 실시예로, 클라이언트(1)는 액티브X를 이용하여 공유키 K를 저장할 수도 있다. 액티브X는 익스플로러의 경우 이용할 수 있는 플러그인으로, 컴파일된 프로그램을 사용자의 컴퓨터에 설치하여 클라이언트의 자원을 보다 많이 이용할 수 있다는 장점이 있다. 액티브X를 이용할 경우 제작자가 설정한 위치에 데이터를 저장하고 읽을 수 있다. 액티브X와 관련된 기술로 저장 공간의 역할을 할 수 있는 것은 액티브X 도큐먼트, 액티브X 스크립팅 등이 있다. 액티브X 도큐먼트는 HTML과는 무관하게 작성된 것으로, MS워드나 엑셀 파일 등을 의미한다. 액티브 스크립팅은 액티브X 컨트롤이나 자바 애플릿에 포함시킬 수 있는 스크립트 언어로, J스크립트나 VB스크립트가 대표적이다. In another embodiment, the
이러한 저장 공간에 비밀키인 공유키를 저장하고 있는 경우 비밀키가 외부로 노출되는 경우 안전한 세션관리가 어려울 수 있다. 예를 들어, 윈도우 이름은 쓰기 가능한 크기도 정해져 있지 않아서 원하는 데이터를 크기 제한 없이 저장할 수 있다는 장점이 있지만 다른 서비스로 이동하여도 값이 바뀌지 않기 때문에 여기에 비밀키를 저장한다면 보안상에 결점이 발생할 수 있다. 여기서 생길 수 있는 보안 문제의 해결 방법은 비밀키 자체를 저장하지 않고 이를 변형 또는 암호화한 것을 저장하여 윈도우 이름에 저장된 값이 노출되더라도 비밀키가 직접적으로 노출되지 않도록 하는 것이다. In the case where the shared key, which is a secret key, is stored in such a storage space, it may be difficult to secure session management when the secret key is exposed to the outside. For example, the window name has the advantage of being able to store the desired data without any size limit because the window name is not fixed, but the value does not change even when moving to another service. Can be. The solution to this security problem is to store the modified or encrypted version of the private key without storing it, so that the private key is not directly exposed even if the value stored in the window name is exposed.
도 3을 참조하여 상술한 내용에서는 비밀키와 공유키가 동일한 경우이며, 이하에서는 비밀키와 공유키가 다른 경우를 중심으로 도 4를 참조하여 상세히 설명하기로 한다. In the above description with reference to FIG. 3, the case where the secret key and the shared key are the same will be described below in detail with reference to FIG. 4.
도 4는 본 발명의 다른 실시예에 따른 안전한 사용자 세션 관리 방법, 키 보호모드에서의 HTTP 요청의 송신자 인증 프로토콜을 설명한 도면이다. 4 is a diagram illustrating a secure user session management method and a sender authentication protocol of an HTTP request in key protection mode according to another embodiment of the present invention.
즉, 키 보호모드는 공유키가 노출되더라도 비밀키는 노출되지 않아 HTTP 요청의 송신자 인증이 가능한 경우를 의미하며, 도 3을 참조하여 설명한 것과는 달리 공유키와 비밀키가 다른 값을 가진다. That is, the key protection mode means that the secret key is not exposed even if the shared key is exposed, so that the sender authentication of the HTTP request is possible. Unlike the description with reference to FIG. 3, the shared key has a different value.
클라이언트(1)와 서버(2) 사이의 공유키인 K를 클라이언트(1)와 서버(2)가 서로 공유하고 있다(단계 S50). 공유키 K는 안전한 키 교환 프로토콜(예를 들어, PAKE 등)를 이용하여 클라이언트(1)를 통한 서버(2)로의 웹 서비스의 사용자 로그인 과정에서 공유가능하다. The
공유키 K는 클라이언트(1)의 로그인 단계에서 교환되어 로그아웃될 때까지 웹 브라우저에 저장되어 있어야 한다. 그리고 웹 페이지가 바뀌더라도 지속적으로 유지되어야 한다. The shared key K must be stored in the web browser until it is exchanged and logged out at the login stage of the
이 경우 공유키를 쿠키에 저장하는 경우 클라이언트(1)로부터의 HTTP 요청에 쿠키가 포함되어 네트워크로 전송되므로 공유키가 그대로 노출되는 문제점이 있다. In this case, when the shared key is stored in a cookie, the cookie is included in the HTTP request from the
따라서, 클라이언트(1)는 공유키 K를 쿠키가 아닌 별도의 저장 공간에 저장한다. 웹 브라우저의 문서 객체 모델(DOM)의 윈도우 객체의 속성 중 윈도우 이름(window.name), 플래시의 지역 공유 객체(LSO), 액티브X 등의 저장 공간이 이용될 수 있다. 이에 대해서는 앞서 설명하였는바 상세한 설명은 생략하기로 한다. Therefore, the
여기서, 공유키 K는 키 보호모드에 적용하기 위하여 하기의 수학식 1과 같은 특징을 가진다. Here, the shared key K has the characteristics as shown in
Func2(K, K2) = K'Func2 (K, K2) = K '
K' = ① K1 or ② K3K '= ① K1 or ② K3
여기서, K는 공유키, K'는 비밀키, Func1은 클라이언트(1)에 저장된 값을 통해 비밀키가 직접적으로 노출되지 않도록 키 변형 인수 K2를 이용하여 키를 변형시키는 키 변형 함수, Func2는 공유키 K로부터 키 변형 인수 K2를 이용하여 비밀키 K2를 생성해내는 비밀키 생성 함수이다.Here, K is a shared key, K 'is a secret key, Func1 is a key modification function that modifies a key using the key modification factor K2 so that the secret key is not directly exposed through a value stored in the
클라이언트(1)는 공유키 K만을 저장하고 있으며, 서버(2)는 공유키 K와 키 변형 인수 K2를 저장하고 있다. 이 경우 클라이언트(1)에 저장된 공유키 K 및/또는 키 변형 인수 K2가 외부에 노출되더라도 공유키 K와 키 변형 인수 K2를 이용하여 클라이언트 비밀키 K'를 생성해내므로, 비밀키의 보호가 가능하게 된다. The
제1 실시예(①)에 따르면, K1이 비밀키이다. According to the first embodiment (1), K1 is a secret key.
비밀키 K1이 노출되지 않도록 키 변형 함수 Func1과 키 변형 인수 K2를 이용하여 변형된 공유키 K를 클라이언트(1)와 서버(2)가 공유한다. 여기서, 비밀키 생성 함수 Func2는 키 변형 함수 Func1을 통해 변형된 키 K로부터 비밀키 K1을 복구해내는 함수이다. The
따라서, 클라이언트(1)는 공유키 K, 키 변형 인수 K2를 비밀키 생성 함수 Func2로 계산한 결과값인 클라이언트 비밀키 K', 즉 K1을 계산하고, 이를 송신자 인증을 위한 클라이언트측 세션유지정보 생성에 이용한다. 그리고 서버(2)는 공유키 K, 키 변형 인수 K2를 비밀키 생성 함수 Func2로 계산한 결과값인 서버 비밀키 K', 즉 K1을 계산하고, 이를 송신자 인증을 위한 서버측 세션유지정보 생성에 이용한다.Accordingly, the
제2 실시예(②)에 따르면, K1이 공유키이다. According to the second embodiment (2), K1 is the shared key.
공유키 K가 K1인 경우 비밀키 생성 함수 Func2는 K1과 키 변형 인수 K2를 인수로 하여 새로운 결과값인 K3를 비밀키로 생성해낸다. 따라서, 클라이언트(1)는 공유키 K1, 키 변형 인수 K2를 비밀키 생성 함수 Func2로 계산한 결과값인 클라이언트 비밀키 K', 즉 K3를 계산하고, 이를 송신자 인증을 위한 클라이언트측 세션유지정보 생성에 이용한다. 그리고 서버(2)는 공유키 K1, 키 변형 인수 K2를 비밀키 생성 함수 Func2로 계산한 결과값인 서버 비밀키 K', 즉 K3를 계산하고, 이를 송신자 인증을 위한 서버측 세션유지정보 생성에 이용한다.When the shared key K is K1, the secret key generation function Func2 generates a new result, K3, as a secret key using K1 and the key modification factor K2 as arguments. Accordingly, the
단계 S50을 통해 서버(2)와 클라이언트(1)는 안전한 키 교환 프로토콜을 통해 공유키 K를 공유함을 가정하고 이하 송신자 인증 방법을 설명하기로 한다. In step S50, it is assumed that the
서버(2)는 클라이언트(1)로부터의 HTTP 요청(단계 S51)을 전송받고, 서버(2)는 난수 R을 생성한다(단계 S52). 이와 관련된 의사 코드는 하기와 같다. The
R = random()R = random ()
서버(2)는 난수 R과 서버 비밀키 K'를 이용하여 미리 정해진 함수로 계산한 결과값인 서버 인증값 S를 산출한다(단계 S58). 여기서, 서버 비밀키 K'는 서버(2)가 미리 공유키 K와 키 변형 인수 K2를 인수로 하여 비밀키 생성 함수 Func2로 계산한 결과값이다. The
여기서, 사용자 식별정보인 ID 등이 미리 정해진 함수의 인수로 더 포함될 수 있다. 이와 관련된 의사 코드는 하기와 같다.Here, ID, which is user identification information, may be further included as an argument of a predetermined function. The pseudo code related to this is as follows.
S = Func(K', R, ID, …)S = Func (K ', R, ID,…)
여기서, 미리 정해진 함수는 일방향 함수인 것이 바람직하다. 이러한 일방향 함수로는 해쉬 함수, 유사 난수 함수 등이 포함된다. Here, the predetermined function is preferably a one-way function. Such one-way functions include hash functions and pseudorandom functions.
서버(2)는 공유키 K, 키 변형 인수 K2, 난수 R, 서버 인증값 S를 웹 어플리케이션에서 제공하는 세션 또는 데이터베이스에 저장한다. 이와 관련된 의사 코드는 하기와 같다. The
Session = {K, K2, R, S}Session = {K, K2, R, S}
상술한 단계 S58은 후술한 단계 S52 이후 단계 S59 이전에 임의의 시점에서 서버(2)에서 수행되면 충분하다. It is sufficient that step S58 described above is performed at the
서버(2)는 HTTP 응답을 통해 단계 S52에서 생성된 난수 R과 키 변형 인수 K2를 클라이언트(1)에 전송한다(단계 S53). 난수 R과 키 변형 인수 K2는 세션정보에 해당한다. 여기서, 세션정보는 사용자 세션 인증을 위해 서버(2)가 클라이언트(1)에 제공하는 정보를 의미한다.The
이 경우 HTTP 응답에는 클라이언트(1)에서 공유키 K와 키 변형 인수 K2를 이용하여 클라이언트 비밀키 K'를 계산하고, 클라이언트 비밀키 K'를 이용하여 클라이언트측 세션유지정보인 클라이언트 인증값 C를 계산하며, 산출된 클라이언트 인증값 C를 쿠키에 저장하도록 하는 실행코드(예를 들어, 자바스크립트 등)가 더 포함될 수 있다. In this case, in the HTTP response, the
클라이언트(1)는 전송받은 키 변형 인수 K2와 소정의 저장 공간에 저장된 공유키 K를 이용하여 비밀키 생성 함수 Func2로 계산한 클라이언트 비밀키 K'를 산출한다(단계 S54). The
이후 클라이언트(1)는 전송받은 난수 R과, 단계 S54에서 산출된 클라이언트 비밀키 K'를 이용하여 미리 정해진 함수로 계산한 결과값, 즉 클라이언트측 세션유지정보인 클라이언트 인증값 C를 산출한다(단계 S55). 여기서, 사용자 식별정보인 ID 등이 미리 정해진 함수의 인수로 더 포함될 수 있다. 여기서, 미리 정해진 함수는 단계 S58에서 서버(2)가 이용한 일방향 함수와 동일해야 한다. After that, the
이후 클라이언트(1)는 산출된 클라이언트 인증값 C를 쿠키에 저장한다(단계 S56). 이와 관련된 의사 코드는 하기와 같다. The
setCookie(C = Func(K', R, ID, …))setCookie (C = Func (K ', R, ID,…))
여기서, 클라이언트 인증값 C를 쿠키에 저장한 직후에 공유키 K를 제외한 나머지는 모두 삭제하여 외부로 노출되지 않도록 한다. Here, immediately after storing the client authentication value C in the cookie, all but the shared key K is deleted to prevent exposure to the outside.
클라이언트(1)가 인증이 필요한 HTTP 요청을 하는 경우 새로운 클라이언트측 세션유지정보가 포함되어 서버(2)로 전송된다. 즉, 클라이언트 인증값 C를 저장하고 있는 쿠키가 자동으로 포함되어 서버(2)로 전송된다(단계 S57). When the
서버(2)는 쿠키에 포함된 클라이언트 인증값 C와 단계 S58에서 산출된 서버 인증값 S를 비교한다(단계 S59). 비교 결과 두 인증값이 다른 경우 단계 S60으로 진행하고, 동일한 경우 단계 S61로 진행한다. The
단계 S60에서, 두 인증값이 다른 경우는 서버 비밀키와 클라이언트 비밀키가 다른 경우로, 서버(2)는 클라이언트(1)의 송신자 인증이 실패한 것으로 간주하고 서버측 세션유지정보(난수 R, 공유키 K, 키 변형인수 K2 등)을 삭제하고 세션을 삭제한다. 이와 관련된 의사 코드는 하기와 같다. In step S60, if the two authentication values are different, the server secret key and the client secret key are different, the
Session destroy()Session destroy ()
그리고 클라이언트(1)에 저장된 클라이언트측 세션유지정보(공유키 K, 키 변형 인수 K2, 난수 R, 쿠키 등)가 모두 NULL로 설정되도록 하는 클라이언트측 스크립트, 플래시 또는 액티브X를 클라이언트(1)에 전송한다. 이 과정에서 사용자는 로그아웃된다. Then, the client-side script, flash, or ActiveX is transmitted to the
단계 S61에서, 두 인증값이 동일한 경우는 서버 비밀키와 클라이언트 비밀키가 동일한 경우로, 서버(2)는 클라이언트(1)의 송신자 인증이 성공한 것으로 간주 하고, 새로운 난수 R을 생성한다(단계 S62). 그리고 클라이언트(1)가 HTTP 요청을 통해 요청한 서비스에 대한 HTTP 응답에 새로 생성된 난수 R과 키 변형 인수 K2를 첨부하여 클라이언트(1)에 전송한다(단계 S63). 이후 서버(2)는 다른 HTTP 요청을 받게 되면 단계 S59 이하의 과정을 반복하게 된다. In step S61, if the two authentication values are the same, the server secret key and the client secret key are the same, the
상술한 사용자 세션 관리 방법을 이용하면 사용자의 세션 자체는 보호받을 수 있지만, 여전히 송수신되는 HTTP의 내용은 도청될 수 있다. 도청으로부터 송수신되는 내용을 보호하기 위해서 HTTP의 내용 중 중요한 내용(예를 들어, 인터넷 뱅킹 서비스에서 계좌번호 등)을 클라이언트(1)와 서버(2)가 공유하는 비밀키를 이용하여 암호화하여 전송한다. 여기서, 암호화는 AES(advanced encryption standard)의 암호루틴을 이용한다. Using the above-described user session management method, the user's session itself can be protected, but the contents of HTTP which are still transmitted and received can be intercepted. In order to protect the contents transmitted and received from eavesdropping, important contents of HTTP contents (for example, account number in Internet banking service) are encrypted and transmitted using a secret key shared by the
서버(2)가 HTTP 응답을 하는 경우 중요한 내용을 비밀키를 이용하여 암호화하고, 클라이언트(1)에서 이를 복호화할 수 있도록 하는 클라이언트측 스크립트, 플래시 또는 액티브X를 함께 클라이언트(1)로 전송한다. When the
클라이언트(1)가 HTTP 요청을 하는 경우 중요한 내용을 비밀키로 암호화할 수 있도록 하는 암호루틴을 서버(2)가 HTTP 응답에 포함하여 전송한다. 이 경우 클라이언트(1)는 HTTP 요청을 생성할 때 암호루틴에 따라 비밀키를 이용하여 HTTP 내용 중 중요한 내용은 암호화가 가능하다. When the
클라이언트(1)와 서버(2)는 비밀키 또는 비밀키를 생성할 수 있는 공유키를 공유하고 있으므로, 암호화된 내용을 복호화하는 것은 어렵지 않음을 당업자는 이 해할 것이다. Since the
이러한 HTTP 내용 중 일부의 암호화는 종래 SSL(secure sockets layer)을 이용한 것과는 다음과 같은 차이가 있다. SSL을 이용하는 경우 SSL은 전송 계층(Transport layer)이며, HTTP 내용 전체를 암호화하고, 도메인간의 세션 관리가 불가능하였다. 하지만, 상술한 것과 같이 클라이언트(1)와 서버(2)가 공유하고 있는 비밀키를 이용한 암호화는 응용 계층(Application layer)에서 이루어지며, HTTP 내용 중 일부만의 선택적인 암호화가 가능하고 도메인간의 세션 관리가 가능한 장점이 있다. The encryption of some of these HTTP contents is different from that of the conventional secure sockets layer (SSL) as follows. In case of using SSL, SSL is a transport layer, and the entire HTTP content is encrypted and session management between domains is not possible. However, as described above, the encryption using the secret key shared by the
또한, 본 발명에서 윈도우 이름을 공유키의 저장 공간으로 이용하는 경우 자식 창을 사용하는 경우에는 window.name=opener.name과 같은 방법 등을 통해서 부모 창이 저장하고 있는 공유키를 자식 창에서도 공유하도록 한다. 여기서, opener.name이 부모 창의 윈도우 이름이다. In the present invention, when using a window name as a storage space for the shared key, when using a child window, the shared key stored in the parent window is shared in the child window through a method such as window.name = opener.name. . Where opener.name is the window name of the parent window.
한편, 상술한 사용자 세션 관리 방법은 컴퓨터 프로그램으로 작성 가능하다. 상기 프로그램을 구성하는 코드들 및 코드 세그먼트들은 당해 분야의 컴퓨터 프로그래머에 의하여 용이하게 추론될 수 있다. 또한, 상기 프로그램은 컴퓨터가 읽을 수 있는 정보저장매체(computer readable media)에 저장되고, 컴퓨터에 의하여 읽혀지고 실행됨으로써 문서 탐색 서비스 제공 방법을 구현한다. 상기 정보저장매체는 자기 기록매체, 광 기록매체, 및 캐리어 웨이브 매체를 포함한다.On the other hand, the user session management method described above can be created by a computer program. Codes and code segments constituting the program can be easily inferred by a computer programmer in the art. In addition, the program is stored in a computer readable media, and read and executed by a computer to implement a method for providing a document search service. The information storage medium includes a magnetic recording medium, an optical recording medium, and a carrier wave medium.
상기에서는 본 발명에 대하여 그 실시예를 중심으로 설명하였지만, 해당 기술 분야에서 통상의 지식을 가진 자라면 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.In the above, the present invention has been described based on the embodiments, but those skilled in the art may vary the present invention without departing from the spirit and scope of the present invention as set forth in the claims below. It will be understood that modifications and changes can be made.
도 1은 본 발명에 적용되는 시도-응답 프로토콜의 인증 방법을 설명한 도면. 1 illustrates an authentication method of a challenge-response protocol applied to the present invention.
도 2는 본 발명의 일 실시예에 따른 서버에 포함되는 세션 관리 모듈의 블록구성도.2 is a block diagram of a session management module included in a server according to an embodiment of the present invention.
도 3은 본 발명의 일 실시예에 따른 안전한 사용자 세션 관리 방법, HTTP 요청의 송신자 인증 프로토콜을 설명한 도면. 3 is a diagram illustrating a secure user session management method and a sender authentication protocol of an HTTP request according to an embodiment of the present invention.
도 4는 본 발명의 다른 실시예에 따른 안전한 사용자 세션 관리 방법, 키 보호모드에서의 HTTP 요청의 송신자 인증 프로토콜을 설명한 도면. 4 is a diagram illustrating a secure user session management method and a sender authentication protocol of an HTTP request in key protected mode according to another embodiment of the present invention.
<도면의 주요부분에 대한 부호의 설명><Description of the symbols for the main parts of the drawings>
1: 클라이언트1: client
2: 서버2: server
Claims (27)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020070100638A KR100915003B1 (en) | 2007-10-05 | 2007-10-05 | Secure user session managing method and system under web environment, recording medium recorded program executing it |
US11/965,941 US20090094372A1 (en) | 2007-10-05 | 2007-12-28 | Secret user session managing method and system under web environment, recording medium recorded program executing it |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020070100638A KR100915003B1 (en) | 2007-10-05 | 2007-10-05 | Secure user session managing method and system under web environment, recording medium recorded program executing it |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20090035382A true KR20090035382A (en) | 2009-04-09 |
KR100915003B1 KR100915003B1 (en) | 2009-09-02 |
Family
ID=40760833
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020070100638A KR100915003B1 (en) | 2007-10-05 | 2007-10-05 | Secure user session managing method and system under web environment, recording medium recorded program executing it |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100915003B1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014035220A2 (en) * | 2012-09-03 | 2014-03-06 | 엘지이노텍 주식회사 | Method and system for program authentication |
WO2023286985A1 (en) * | 2021-07-16 | 2023-01-19 | (주)모니터랩 | Security device user authentication method using cookies |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20030054859A (en) * | 2001-12-26 | 2003-07-02 | 엘지전자 주식회사 | User Connection Confirm Method of Web Server |
KR100490584B1 (en) * | 2003-03-19 | 2005-05-17 | 학교법인 이화학당 | secure cookie processing method for single sign-on on web |
-
2007
- 2007-10-05 KR KR1020070100638A patent/KR100915003B1/en not_active IP Right Cessation
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014035220A2 (en) * | 2012-09-03 | 2014-03-06 | 엘지이노텍 주식회사 | Method and system for program authentication |
KR20140044955A (en) * | 2012-09-03 | 2014-04-16 | 엘지이노텍 주식회사 | Method for certificating program |
WO2014035220A3 (en) * | 2012-09-03 | 2014-04-24 | 엘지이노텍 주식회사 | Method and system for program authentication |
US9355243B2 (en) | 2012-09-03 | 2016-05-31 | Lg Innotek Co., Ltd. | Method and system for program authentication |
WO2023286985A1 (en) * | 2021-07-16 | 2023-01-19 | (주)모니터랩 | Security device user authentication method using cookies |
Also Published As
Publication number | Publication date |
---|---|
KR100915003B1 (en) | 2009-09-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20090094372A1 (en) | Secret user session managing method and system under web environment, recording medium recorded program executing it | |
US8185942B2 (en) | Client-server opaque token passing apparatus and method | |
JP4864289B2 (en) | Network user authentication system and method | |
US9191375B2 (en) | System and method for accessing integrated applications in a single sign-on enabled enterprise solution | |
US7861087B2 (en) | Systems and methods for state signing of internet resources | |
US6301661B1 (en) | Enhanced security for applications employing downloadable executable content | |
US6912653B2 (en) | Authenticating communications | |
US9172707B2 (en) | Reducing cross-site scripting attacks by segregating HTTP resources by subdomain | |
JP4256361B2 (en) | Authentication management method and system | |
WO2010003261A1 (en) | Web application security filtering | |
JP2002175010A (en) | Home page falsification preventing system | |
US10581806B2 (en) | Service providing method, service requesting method, information processing device, and client device | |
CN102483792A (en) | Method and apparatus for sharing documents | |
US20100275025A1 (en) | Method and apparatus for secure communication | |
CN106685973A (en) | Method and device for remembering log in information, log in control method and device | |
CN112532599B (en) | Dynamic authentication method, device, electronic equipment and storage medium | |
KR100915003B1 (en) | Secure user session managing method and system under web environment, recording medium recorded program executing it | |
KR100969196B1 (en) | Secure user session managing method under web environment and recording medium recorded program executing it | |
Aljawarneh | Emerging challenges, security issues, and Technologies in Online Banking Systems | |
Fleury et al. | Single sign-on for java web start applications using myproxy | |
KR100892609B1 (en) | System and method for secure communication, and a medium having computer readable program executing the method | |
KR101001765B1 (en) | Method and System for Authenticating Client Using Sharing Seed | |
KR20130071674A (en) | System and method for verifying integrity of web page | |
US7296145B1 (en) | Method of secure communication over a distributed network without using secure socket layer | |
KR101101190B1 (en) | System and method for secure communication, and a medium having computer readable program executing the method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20130527 Year of fee payment: 5 |
|
FPAY | Annual fee payment |
Payment date: 20140612 Year of fee payment: 6 |
|
FPAY | Annual fee payment |
Payment date: 20150626 Year of fee payment: 7 |
|
FPAY | Annual fee payment |
Payment date: 20160602 Year of fee payment: 8 |
|
LAPS | Lapse due to unpaid annual fee |