This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2014-074567, filed on Mar. 31, 2014, the entire contents of which are incorporated herein by reference.
The embodiments discussed herein are related to an information processing device, an information processing system, a program, and a processing method, for example.
In recent years, in an information processing device, such as a personal computer (PC), a tablet terminal device, a smart phone, and the like, it is expected to use Web applications, because reductions in development man-hour is possible. Web applications are executed in a Web area on a browser, and thus have lower machine dependency compared with native applications that are executed in a native area on an operating system (OS). Also, restrictions are given to processing that is allowed to be executed in a Web area, and thus the Web applications are highly secured. However, in the case of using only Web applications, processing is restricted, and thereby it is not possible to fully utilize the functions of an information processing device unlike native applications. Accordingly, a hybrid type is provided in which a local Web server is started in a native area, and the local Web server decrypts and provides a Web application. The documents disclosing such a technique include, for example, Japanese National Publication of International Patent Application No. 2004-537101, and Japanese Laid-open Patent Publication Nos. 2006-323614 and 2011-107745.
In accordance with an aspect of the embodiments, an information processing device includes a computer processor; and a memory which stores a plurality of instructions, which when executed by the computer processor, cause the computer processor to execute: obtaining a decrypted Web application from a Web server in a native area, and executing the decrypted Web application, giving a notification of obtaining the Web application to the computer processor based on the decryption of the Web application; and obtaining the decrypted Web application from the Web server based on the notification.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
These and/or other aspects and advantages will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawing of which:
In the following, a description will be given of an information processing device, an information processing system, a program, and a processing method according to an embodiment with reference to the drawings. In the embodiment, the same symbol is given to a component having the same functions in a configuration, and a duplicated description will be omitted. In this regard, an information processing device, an information processing system, a program, and a processing method that are described in the following embodiments are only examples, and do not limit the embodiments. Also, each of the following embodiments may be suitably combined within a range not conflicting with each other.
The Web application in this execution environment is configured to be executed on a browser function, and is a hybrid type capable of using hardware through a native function (native area). Specifically, some of the Web applications are provided by a local Web server (a HTTP server, hereinafter, referred to as a local server) in a native area. Thereby, it is possible for the Web application to fully derive the functions of the information processing device 1 through the local server.
A server appliance 2 provides various services to the information processing device 1 connected through a communication network (not illustrated in
The process P1 has a configuration including a browser execution unit 10, which is a browser on a Webview 21, and a native function unit 20. The communications of each unit in the process P1 are performed through a predetermined application programming interface (API). The browser execution unit 10 executes the Web applications 13 and 14 in an inline frame 11 and an inline frame 12, respectively. The native function unit 20 includes the Webview 21, a local server 22, a start notification unit 23, a token management unit 24, and a token storage unit 25.
The Webview 21 provides a simple browser function. The local server 22 is a local Web server (http server) in the native function unit 20. The local server 22 responds to a request by the specification of a local uniform resource locator (URL) having an IP address of “127.0.0.1”, and a communication port of “8000”, or the like. For example, the local server 22 loads a Web application produced by decrypting the encrypted file 26 to the memory, and outputs the decrypted Web application in response to a request by the URL.
The start notification unit 23 notifies the start (startup) of the local server 22 to the browser execution unit 10 based on the notification from the local server 22. The browser execution unit 10 creates an inline frame (the inline frame 11 illustrated in
The token management unit 24 manages token information related to communication between the browser execution unit 10 and the local server 22. The token information is identification information intended for identification of communication, management of a session, and the like, and is assumed to be an HTTP cookie (hereinafter, referred to as a cookie) in the present embodiment. The token management unit 24 includes a cookie control unit 241 that controls a cookie, and a cookie confirmation and generation unit 242 that confirms and generates a cookie (a detailed description will be given later).
The token storage unit 25 stores token information managed by the token management unit 24. Specifically, the token storage unit 25 stores a URL (url), a cookie, and a flag (Flag) as token information. The url is an address with which the local server 22 gives a response of a decrypted Web application. The cookie is a value transmitted at a time when a Web application is given as a response. The Flag indicates whether a Web application with a cookie has been given as a response (true) or not (false) to a request specifying a url.
Here, a detailed description will be given of operation of the information processing device 1 at the time of starting a Web application.
As illustrated in
Next, the local server 22 makes a request to the token management unit 24 to generate a cookie having the flag off (Flag=false) (S3). The cookie confirmation and generation unit 242 of the token management unit 24 receives the request from the local server 22, and generates a cookie (S4). Specifically, the cookie confirmation and generation unit 242 refers to information stored by the token storage unit 25, and searches for an unused free url. Next, the cookie confirmation and generation unit 242 generates a cookie of the searched free url, sets Flag=false, and sets the url, the cookie, and the Flag value in the token storage unit 25.
Next, the cookie control unit 241 of the token management unit 24 notifies the free url for which the cookie is generated to the local server 22 (S5). The local server 22 that has received the notification of the free url sends a start notification for starting the browser, and a notification of the free url that publishes the decrypted Web application 13 to the start notification unit 23 (S6). The start notification unit 23 that has received the start notification and the url from the local server 22 notifies the start notification and the url to the browser execution unit 10 to start the browser (S7).
The browser execution unit 10 that has received the start notification and the url creates an inline frame (the inline frame 11 in the example in
The local server 22 that has received the request of the url from the browser execution unit 10 makes a request to the token management unit 24 for confirming the Flag of the url (S10). The cookie confirmation and generation unit 242 of the token management unit 24 that has received the request of the Flag confirmation of the url checks the Flag of the url stored in the token storage unit 25 (S11), and returns a check flag (true or false) (S12).
Specifically, if the Flag of the url is false, the cookie confirmation and generation unit 242 returns false. Then, the Web application with the cookie is returned to the request, and thus the cookie confirmation and generation unit 242 sets the Flag of the url stored in the token storage unit 25 to true. Also, if the Flag of the url is true, the Web application with the cookie has been returned once, the cookie confirmation and generation unit 242 returns true, and keeps the setting of the token storage unit 25 without change.
The local server 22 makes a response to the browser execution unit 10 based on the check result from the token management unit 24 (S13a, S13b). Specifically, if the check flag is false, the local server 22 returns the url (for example, “index.html”) of the Web application (the Web application 13 in the example in
Also, if the check flag is true, the local server 22 has returned the Web application with a cookie once, and thus the local server 22 returns an error (S13b). Accordingly, if the Web application has been returned once after the start notification, an error is returned to the subsequent request. Accordingly, obtaining the Web application by an unpredictable request from the process P2, or the like is avoided.
Also, after the token management unit 24 generated a cookie with the flag off (Flag=false), and then at a time when a predetermined time period (for example, about a few milliseconds) elapsed, the token management unit 24 may set the flag on (Flag=true). Specifically, after the cookie control unit 241 of the token management unit 24 sets the url, the cookie, and the Flag in the token storage unit 25 based on the value measured by a real time clock (RTC), or the like, and then at a time when a predetermined time period elapsed, the cookie control unit 241 of the token management unit 24 sets the value of the Flag to true.
Thereby, if the local server 22 receives a request from the browser execution unit 10 within a predetermined time period after the start notification unit 23 sent a start notification to the browser execution unit 10, the local server 22 makes a response with the Flag=false. That is to say, the local server 22 outputs the Web application in response to the request from the browser execution unit 10. In this manner, the local server 22 restricts time when the Web application is allowed to be obtained so that obtaining the Web application by an unpredictable request from the process P2, or the like is avoided.
Variation 1
Next, a description will be given of the case of using a random value generated randomly as token information related to the communication with the local server 22 as a variation 1 of the above-described embodiment.
As illustrated in
As illustrated in
Next, the local server 22 requests the token management unit 24a to generate a random value (S23). Upon receiving the request from the local server 22, the random value confirmation and generation unit 242a of the token management unit 24a generates a random value produced in combination of alphanumeric values, and the like. (S24). Specifically, the random value confirmation and generation unit 242a refers to the information stored in the token storage unit 25, and searches for an unused free url. Next, the random value confirmation and generation unit 242a generates a random value in the searched free url, and sets the url and the random value in the token storage unit 25.
Next, the random value control unit 241a of the token management unit 24 notifies the random value and the url to the local server 22 (S25). The local server 22 that has received the random value and the url sends a start notification for starting the browser, and a notification of url+random value for publishing the decrypted Web application 13 to the start notification unit 23 (S26). The start notification unit 23 that has received the start notification and the notification of url+random value from the local server 22 sends a start notification and the notification of url+random value to the browser execution unit 10 in order to start the browser (S27).
The browser execution unit 10 that has received the start notification and the url+random value creates an inline frame (the inline frame 11 in the example in
The local server 22 that has received the request for the url+random value from the browser execution unit 10 makes a request for confirmation of the random value to the token management unit 24a (S30). The random value confirmation and generation unit 242a of the token management unit 24a that has been requested for the confirmation of the random value checks the random value of the url stored in the token storage unit 25 (S31), and returns a check result (true or false) (S32).
Specifically, if the random value that has been requested for confirmation matches the random value stored in the token storage unit 25, the random value confirmation and generation unit 242a returns true. Also, the random value that has been requested for confirmation does not match the random value stored in the token storage unit 25, the random value confirmation and generation unit 242a returns false.
The local server 22 returns a response to the browser execution unit 10 based on the check result from the token management unit 24a (S33a, S33b). Specifically, if the check result is true, the local server 22 returns the url (for example, “index.html”) of the Web application (the Web application 13 in the example in
Also, if the check result is false, the local server 22 returns an error (S33b). That is to say, the local server 22 returns an error to a request that has been sent from a unit other than the browser execution unit 10, which is not aware of the random value sent from the start notification unit 23 together with the start notification. Accordingly, obtaining the Web application by an unpredictable request from the process P2, or the like is avoided.
Variation 2
Next, a description will be given of the case of using a cookie and a random value generated randomly as token information related to the communication with the local server 22 as a variation 2 of the above-described embodiment.
As illustrated in
As illustrated in
Next, the local server 22 requests the token management unit 24b to generate a random value (S43). Upon receiving the request from the local server 22, the random value confirmation and generation unit 242a of the token management unit 24b generates a random value (S44). Specifically, the random value confirmation and generation unit 242a refers to the information stored in the token storage unit 25, and searches for an unused free url. Next, the random value confirmation and generation unit 242a generates a random value for the searched free url, and sets the url and the random value in the token storage unit 25. Next, the random value control unit 241a of the token management unit 24b notifies the random value to the local server 22 (S45).
Next, the local server 22 requests the token management unit 24b to generate a cookie with the flag off (Flag =false) (S46). Upon receiving the request from the local server 22, the cookie confirmation and generation unit 242 of the token management unit 24b generates a cookie (S47). Specifically, the cookie confirmation and generation unit 242 generates a cookie in the url in which the random value is set in S44, sets the cookie and the value of Flag as Flag=false in the token storage unit 25. Next, the cookie control unit 241 of the token management unit 24b notifies the url for which the cookie has been generated to the local server 22 (S48). In this regard, the generation and the notification of the random value, and the generation of the cookie and the notification of the url may be performed in the reverse order.
The local server 22 that has received the notification of the random value and the url notifies the start notification unit 23 of a start notification for starting the browser, and the url+random value (S49). The start notification unit 23 that has received the start notification, and the notification of url+random value from the local server 22 notifies the browser execution unit 10 of the start notification, and the url+random value to start the browser (S50).
The browser execution unit 10 that has received the start notification and the notification of url+random value generates an inline frame (the inline frame 11 in the example in
The local server 22 that has received the request for url+random value from the browser execution unit 10 requests the token management unit 24b to confirm the random value (S53). The random value confirmation and generation unit 242a of the token management unit 24b that has received the confirmation of the random value checks the random value of the url stored in the token storage unit 25 (S54), and returns the check result (true or false) (S55).
Next, the local server 22 requests the token management unit 24b to confirm the Flag of the url (S56). The cookie confirmation and generation unit 242 of the token management unit 24b that has received confirmation of the Flag of the url checks the Flag of the url stored in the token storage unit 25 (S57), and returns the check flag (true or false) (S58). In this regard, the confirmation of the random value, and the confirmation of the random value may be performed in the reverse order.
The local server 22 returns a response to the browser execution unit 10 based on the check result from the token management unit 24b (S59a, S59b). Specifically, if the check flag is false, and the check result is true, the local server 22 returns the url of the Web application (the Web application 13 in the example in
Also, in the case other than the case where both the check flag is false, and the check result is true, the local server 22 returns an error (S59b). That is to say, the local server 22 returns an error to a request that has been sent from a unit other than the browser execution unit 10, which is not aware of the random value sent from the start notification unit 23 together with the start notification, or a request after the Web application has been once returned. Accordingly, obtaining the Web application by an unpredictable request from the process P2, or the like is avoided.
All of or any one of the various processing functions executed on the information processing devices 1, 1a, and 1b, and the server appliance 2 may be performed by a CPU (or a micro computer, such as an MPU, a micro controller unit (MCU) and the like). Also, all of or any one of the various processing functions may be performed by a program analyzed and executed by a program on a CPU (or a micro computer, such as an MPU, an MCU, and the like) or by hardware of a wired logic, as a matter of course.
Incidentally, it is possible to achieve the various kinds of processing described in the above-described embodiment by executing a program provided in advance on a computer. Thus, in the following, a description will be given of an example of a computer (hardware) having the same function as the embodiments described above.
As illustrated in
The hard disk device 109 stores programs having the same functions as the individual processing units of the browser execution unit 10 and the native function unit 20. Also, the hard disk device 109 stores various kinds of data for achieving the programs. The input device 102 receives operation information from an operator of the information processing devices 1, 1a, and 1b, and the server appliance 2, for example. The monitor 103 displays various screens operated by the operation, for example. A printer, or the like is connected to the interface device 106, for example. The communication device 107 is connected to a communication network, such as a local area network (LAN), or the like, and exchanges various kinds of information with external devices through a communication network. The CPU 101 reads each of the programs stored in the hard disk device 109, expands the programs on the RAM 108 so as to perform various kinds of processing.
In this regard, the above-described programs does not have to be stored in the hard disk device 109. For example, the programs that are stored in a storage medium in a readable manner by the information processing devices 1, 1a, and 1b, and the server appliance 2 may be read and executed by the information processing devices 1, 1a, and 1b, and the server appliance 2. The storage medium readable by the information processing devices 1, 1a, and 1b, and the server appliance 2, corresponds to for example, a portable recording medium, such as a CD-ROM, a DVD disc, a universal serial bus (USB) memory, and the like, a semiconductor memory, such as a flash memory, and the like, a hard disk drive, and the like. Also, the programs may be stored in devices connected to a public network, the Internet, a LAN, and the like, and the information processing devices 1, 1a, and 1b, and the server appliance 2 may read the programs from these devices to execute the programs.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2014-074567 | Mar 2014 | JP | national |