cvs: phpdoc /ja/chapters security.xml
| From: | Masaki Fujimoto | Date: | Sun, 10 Mar 2002 12:30:40 +0000 |
| Subject: | cvs: phpdoc /ja/chapters security.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969342906@lists.php.net to get a copy of this message | ||
fujimoto Sun Mar 10 07:30:40 2002 EDT
Modified files:
/phpdoc/ja/chapters security.xml
Log:
translation updated.
Index: phpdoc/ja/chapters/security.xml diff -u phpdoc/ja/chapters/security.xml:1.19 phpdoc/ja/chapters/security.xml:1.20 --- phpdoc/ja/chapters/security.xml:1.19 Sat Feb 16 08:20:09 2002 +++ phpdoc/ja/chapters/security.xml Sun Mar 10 07:30:38 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.19 $ --> +<!-- $Revision: 1.20 $ --> <chapter id="security"> <title>ã»ãã¥ãªãã£</title> @@ -529,33 +529,31 @@ ããããã¯ã¨ãªã¼ãå®è¡ãããã¨ãåºæ¥ãããã§ãã </simpara> <simpara> - You may create different database users for every aspect of your - application with very limited rights to database objects. The most - required privileges should be granted only, and avoid that the same user - can interact with the database in different use cases. This means that if - intruders gain access to your database using one of these credentials, - they can only effect as many changes as your application can. + è²´æ¹ã使ããã¢ããªã±ã¼ã·ã§ã³ããã¼ã¿ãã¼ã¹ã«å¯¾ãã¦è¡ãæä½ã®åæ¹é¢ãã¨ã«ã + ææ»å¯¾è±¡ã¨ãªããªãã¸ã§ã¯ãã«å¯¾ãã¦ãåºæ¥ãéãå°ãªã権éãæã£ãè¤æ°ã® + ã¦ã¼ã¶ã使ããæ¹ãè¯ãã§ããããã¦ã¼ã¶ã«å¯¾ãã¦ã¯ãæä½éå¿ è¦ãªæ¨©éã®ã¿ã + ä¸ããé¢ä¿ã®ç¡ããã¼ã¿ã¸ã®ã¢ã¯ã»ã¹ã許å¯ããªãããã«ãã¾ããããã¯ã + ä¸ãä¸ä¾µå ¥è ããã®ã¦ã¼ã¶ã®æ¨©éã以ã£ã¦ãã¼ã¿ãã¼ã¹ã«ã¢ã¯ã»ã¹ããéã«ã + ã¢ããªã±ã¼ã·ã§ã³ã¨é¢ä¿ã®ç¡ããã¼ã¿ã«ã¾ã§ã¢ã¯ã»ã¹ããããã¨ãé²ãããã§ãã </simpara> <simpara> - You are encouraged not to implement all the business logic in the web - application (i.e. your script), instead to do it in the database schema - using views, triggers or rules. If the system evolves, new ports will be - intended to open to the database, and you have to reimplement the logic - in each separate database client. Over and above, triggers can be used - to transparently and automatically handle fields, which often provides - insight when debugging problems with your application or tracing back - transactions. + å ¨ã¦ã®ãã¸ãã¹ãã¸ãã¯ãã¦ã§ãã¢ããªã±ã¼ã·ã§ã³(ã¤ã¾ãè²´æ¹ã®ã¹ã¯ãªãã) + ã§å®è£ ãããã¨ã¯æ¨å¥¨ããã¾ããã代ããã«ããã¥ã¼ãããªã¬ã¼ãã«ã¼ã«ã¨ãã£ã + ãã¼ã¿ãã¼ã¹ã®æ©è½ãæ´»ç¨ããæ¹ãè¯ãã§ããããã·ã¹ãã ãæ´æ°ããã + æ°ããæ©è½ããã¼ã¿ãã¼ã¹ã¸ã®ã¢ã¯ã»ã¹ãããã¨ã«ãªã£ãå ´åãåã ã®ãã¼ã¿ãã¼ã¹ + ã¯ã©ã¤ã¢ã³ããã¨ã«ååº¦åæ§ã®ãã¸ãã¯ãå®è£ ããªããã°ãªããªããªãã¾ãã + ããã«ãããªã¬ã¼ã¯ééçã«ãããã¦èªåçã«ãã£ã¼ã«ããæ±ããã¨ãåºæ¥ãã®ã§ã + ãããã°æãããã©ã³ã¶ã¯ã·ã§ã³ã®ãã¼ã«ããã¯æã«å½¹ç«ã¡ã¾ãã </simpara> </sect2> <sect2 id="security.database.connection"> - <title>Connecting to Database</title> + <title>ãã¼ã¿ãã¼ã¹ã¸ã®æ¥ç¶</title> <simpara> - You may want to estabilish the connections over SSL to encrypt - client/server communications for increased security, or you can use ssh - to encrypt the network connection between clients and the database server. - If either of them is done, then monitoring your traffic and gaining - informations in this way will be a hard work. + æ´ãªãã»ãã¥ãªãã£ã®ããã«ãã¯ã©ã¤ã¢ã³ã/ãµã¼ãéã®éä¿¡ã«ããã¦SSLãç¨ãã + æå·åãè¡ã£ãæ¹ãè¯ãã§ãããããããã¯sshã使ç¨ãããã¨ãåºæ¥ã¾ãã + ã©ã¡ããã®ææ®µãè¬ããå¾ããã©ãã£ãã¯ãã¢ãã¿ãªã³ã°ãã¦ã¿ãã° + ããããä½ããã®æ å ±ãå¾ããã¨ãå°é£ã ã¨ããäºãåããã¨æãã¾ãã </simpara> <!--simpara> If your database server native SSL support, consider to use <link @@ -565,46 +563,43 @@ </sect2> <sect2 id="security.database.storage"> - <title>Encrypted Storage Model</title> + <title>æå·åè¨æ¶ã¢ãã«</title> <simpara> - SSL/SSH protects data travelling from the client to the server, SSL/SSH - does not protect the persistent data stored in a database. SSL is an - on-the-wire protocol. - </simpara> - <simpara> - Once an attacker gains access to your database directly (bypassing the - webserver), the stored sensitive data may be exposed or misused, unless - the information is protected by the database itself. Encrypting the data - is a good way to mitigate this threat, but very few databases offer this - type of data encryption. - </simpara> - <simpara> - The easiest way to work around this problem is to first create your own - encryption package, and then use it from within your PHP scripts. PHP - can assist you in this case with its several extensions, such as <link - linkend="ref.mcrypt">Mcrypt</link> and <link - linkend="ref.mhash">Mhash</link>, covering a wide variety of encryption - algorithms. The script encrypts the data be stored first, and decrypts - it when retrieving. See the references for further examples how - encryption works. - </simpara> - <simpara> - In case of truly hidden data, if its raw representation is not needed - (i.e. not be displayed), hashing may be also taken into consideration. - The well-known example for the hashing is storing the MD5 hash of a - password in a database, instead of the password itself. See also - <function>crypt</function> and <function>md5</function>. + SSL/SSHã«ãã£ã¦ã¯ã©ã¤ã¢ã³ã/ãµã¼ãéã§éä¿¡ããããã¼ã¿ã¯ä¿è·ããã¾ããã + ãã¼ã¿ãã¼ã¹ã«ä¿åããããã¼ã¿ã¯ä¿è·ããã¾ãããSSLã¯ããã¾ã§éä¿¡ä¸ã® + ãããã³ã«ãªã®ã§ãã + </simpara> + <simpara> + 䏿¦ã¢ã¿ãã«ã¼ããã¼ã¿ãã¼ã¹ã¸(ã¦ã§ããµã¼ããéããã«)ã¢ã¯ã»ã¹ã§ãã¦ãã¾ãã¨ã + ããã«æ ¼ç´ããã¦ãããã¼ã¿èªä½ãæå·åããã¦ããªãéããèªç±ã«é²è¦§ããã + 使ç¨ããã¦ãã¾ãã¾ãããã¼ã¿ãæå·åãããã¨ã«ãã£ã¦ããã®è å¨ãæ¸ãããã¨ã + ã§ãã¾ããããã®æ©è½ããµãã¼ããã¦ãããã¼ã¿ãã¼ã¹ã¯å ãã§ãã + </simpara> + <simpara> + ãã®åé¡ã¸ã®æãç°¡åãªå¯¾å¿çã¯ãã¾ãèªåå°ç¨ã®æå·åããã±ã¼ã¸ã使ãã + ãããããªãã®PHPã¹ã¯ãªãããã使ç¨ãããã¨ã§ããPHPã®<link + linkend="ref.mcrypt">Mcrypt</link>, <link linkend="ref.mhash">Mhash</link> + ã¨ãã£ãå¹¾ã¤ãã®æ¡å¼µã¢ã¸ã¥ã¼ã«ã¯ãæ§ã ãªæå·åã¢ã«ã´ãªãºã ããµãã¼ã + ãã¦ããã®ã§å½¹ã«ç«ã¤ã§ãããããã¼ã¿æ ¼ç´æã«æå·åãè¡ããåå¾æã« + 復å·åãã¾ãããã®æ¹æ³ã«ã¤ãã¦ã¯ãªãã¡ã¬ã³ã¹ãåç §ãã¦ãã ããã + </simpara> + <simpara> + ããå®å ¨ã«ãã¼ã¿ãé ãããå ´åããå ã®ãã¼ã¿èªä½ã¯å¿ è¦ãªãå ´å(ã¤ã¾ã + 表示ãããªãå ´å)ã¯ãããã·ã¥ãèæ ®ã«å ¥ããã»ããè¯ãã§ãããã + ããã·ã¥ã®è¯ãç¥ãããä½¿ç¨æ¹æ³ã¯ããã¹ã¯ã¼ãããã®ã¾ã¾æ ¼ç´ããã«ã + ãã®MD5ããã·ã¥å¤ãæ ¼ç´ããæ¹æ³ã§ãã<function>crypt</function>ã + <function>md5</function>ãåç §ãã¦ãã ããã </simpara> <example> - <title>Using hashed password field</title> + <title>ããã·ã¥ãã¹ã¯ã¼ããã£ã¼ã«ãã使ã</title> <programlisting role="php"> <![CDATA[ -// storing password hash +// ããã·ã¥ããããã¹ã¯ã¼ããæ ¼ç´ãã $query = sprintf("INSERT INTO users(name,pwd) VALUES('%s','%s');", addslashes($username), md5($password)); $result = pg_exec($connection, $query); -// querying if user submitted the right password +// ãã¹ã¯ã¼ããæ£ãããã©ããåãåããã $query = sprintf("SELECT 1 FROM users WHERE name='%s' AND pwd='%s';", addslashes($username), md5($password)); $result = pg_exec($connection, $query);
Index: phpdoc/ja/chapters/security.xml diff -u phpdoc/ja/chapters/security.xml:1.19 phpdoc/ja/chapters/security.xml:1.20 --- phpdoc/ja/chapters/security.xml:1.19 Sat Feb 16 08:20:09 2002 +++ phpdoc/ja/chapters/security.xml Sun Mar 10 07:30:38 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.19 $ --> +<!-- $Revision: 1.20 $ --> <chapter id="security"> <title>ã»ãã¥ãªãã£</title> @@ -529,33 +529,31 @@ ããããã¯ã¨ãªã¼ãå®è¡ãããã¨ãåºæ¥ãããã§ãã </simpara> <simpara> - You may create different database users for every aspect of your - application with very limited rights to database objects. The most - required privileges should be granted only, and avoid that the same user - can interact with the database in different use cases. This means that if - intruders gain access to your database using one of these credentials, - they can only effect as many changes as your application can. + è²´æ¹ã使ããã¢ããªã±ã¼ã·ã§ã³ããã¼ã¿ãã¼ã¹ã«å¯¾ãã¦è¡ãæä½ã®åæ¹é¢ãã¨ã«ã + ææ»å¯¾è±¡ã¨ãªããªãã¸ã§ã¯ãã«å¯¾ãã¦ãåºæ¥ãéãå°ãªã権éãæã£ãè¤æ°ã® + ã¦ã¼ã¶ã使ããæ¹ãè¯ãã§ããããã¦ã¼ã¶ã«å¯¾ãã¦ã¯ãæä½éå¿ è¦ãªæ¨©éã®ã¿ã + ä¸ããé¢ä¿ã®ç¡ããã¼ã¿ã¸ã®ã¢ã¯ã»ã¹ã許å¯ããªãããã«ãã¾ããããã¯ã + ä¸ãä¸ä¾µå ¥è ããã®ã¦ã¼ã¶ã®æ¨©éã以ã£ã¦ãã¼ã¿ãã¼ã¹ã«ã¢ã¯ã»ã¹ããéã«ã + ã¢ããªã±ã¼ã·ã§ã³ã¨é¢ä¿ã®ç¡ããã¼ã¿ã«ã¾ã§ã¢ã¯ã»ã¹ããããã¨ãé²ãããã§ãã </simpara> <simpara> - You are encouraged not to implement all the business logic in the web - application (i.e. your script), instead to do it in the database schema - using views, triggers or rules. If the system evolves, new ports will be - intended to open to the database, and you have to reimplement the logic - in each separate database client. Over and above, triggers can be used - to transparently and automatically handle fields, which often provides - insight when debugging problems with your application or tracing back - transactions. + å ¨ã¦ã®ãã¸ãã¹ãã¸ãã¯ãã¦ã§ãã¢ããªã±ã¼ã·ã§ã³(ã¤ã¾ãè²´æ¹ã®ã¹ã¯ãªãã) + ã§å®è£ ãããã¨ã¯æ¨å¥¨ããã¾ããã代ããã«ããã¥ã¼ãããªã¬ã¼ãã«ã¼ã«ã¨ãã£ã + ãã¼ã¿ãã¼ã¹ã®æ©è½ãæ´»ç¨ããæ¹ãè¯ãã§ããããã·ã¹ãã ãæ´æ°ããã + æ°ããæ©è½ããã¼ã¿ãã¼ã¹ã¸ã®ã¢ã¯ã»ã¹ãããã¨ã«ãªã£ãå ´åãåã ã®ãã¼ã¿ãã¼ã¹ + ã¯ã©ã¤ã¢ã³ããã¨ã«ååº¦åæ§ã®ãã¸ãã¯ãå®è£ ããªããã°ãªããªããªãã¾ãã + ããã«ãããªã¬ã¼ã¯ééçã«ãããã¦èªåçã«ãã£ã¼ã«ããæ±ããã¨ãåºæ¥ãã®ã§ã + ãããã°æãããã©ã³ã¶ã¯ã·ã§ã³ã®ãã¼ã«ããã¯æã«å½¹ç«ã¡ã¾ãã </simpara> </sect2> <sect2 id="security.database.connection"> - <title>Connecting to Database</title> + <title>ãã¼ã¿ãã¼ã¹ã¸ã®æ¥ç¶</title> <simpara> - You may want to estabilish the connections over SSL to encrypt - client/server communications for increased security, or you can use ssh - to encrypt the network connection between clients and the database server. - If either of them is done, then monitoring your traffic and gaining - informations in this way will be a hard work. + æ´ãªãã»ãã¥ãªãã£ã®ããã«ãã¯ã©ã¤ã¢ã³ã/ãµã¼ãéã®éä¿¡ã«ããã¦SSLãç¨ãã + æå·åãè¡ã£ãæ¹ãè¯ãã§ãããããããã¯sshã使ç¨ãããã¨ãåºæ¥ã¾ãã + ã©ã¡ããã®ææ®µãè¬ããå¾ããã©ãã£ãã¯ãã¢ãã¿ãªã³ã°ãã¦ã¿ãã° + ããããä½ããã®æ å ±ãå¾ããã¨ãå°é£ã ã¨ããäºãåããã¨æãã¾ãã </simpara> <!--simpara> If your database server native SSL support, consider to use <link @@ -565,46 +563,43 @@ </sect2> <sect2 id="security.database.storage"> - <title>Encrypted Storage Model</title> + <title>æå·åè¨æ¶ã¢ãã«</title> <simpara> - SSL/SSH protects data travelling from the client to the server, SSL/SSH - does not protect the persistent data stored in a database. SSL is an - on-the-wire protocol. - </simpara> - <simpara> - Once an attacker gains access to your database directly (bypassing the - webserver), the stored sensitive data may be exposed or misused, unless - the information is protected by the database itself. Encrypting the data - is a good way to mitigate this threat, but very few databases offer this - type of data encryption. - </simpara> - <simpara> - The easiest way to work around this problem is to first create your own - encryption package, and then use it from within your PHP scripts. PHP - can assist you in this case with its several extensions, such as <link - linkend="ref.mcrypt">Mcrypt</link> and <link - linkend="ref.mhash">Mhash</link>, covering a wide variety of encryption - algorithms. The script encrypts the data be stored first, and decrypts - it when retrieving. See the references for further examples how - encryption works. - </simpara> - <simpara> - In case of truly hidden data, if its raw representation is not needed - (i.e. not be displayed), hashing may be also taken into consideration. - The well-known example for the hashing is storing the MD5 hash of a - password in a database, instead of the password itself. See also - <function>crypt</function> and <function>md5</function>. + SSL/SSHã«ãã£ã¦ã¯ã©ã¤ã¢ã³ã/ãµã¼ãéã§éä¿¡ããããã¼ã¿ã¯ä¿è·ããã¾ããã + ãã¼ã¿ãã¼ã¹ã«ä¿åããããã¼ã¿ã¯ä¿è·ããã¾ãããSSLã¯ããã¾ã§éä¿¡ä¸ã® + ãããã³ã«ãªã®ã§ãã + </simpara> + <simpara> + 䏿¦ã¢ã¿ãã«ã¼ããã¼ã¿ãã¼ã¹ã¸(ã¦ã§ããµã¼ããéããã«)ã¢ã¯ã»ã¹ã§ãã¦ãã¾ãã¨ã + ããã«æ ¼ç´ããã¦ãããã¼ã¿èªä½ãæå·åããã¦ããªãéããèªç±ã«é²è¦§ããã + 使ç¨ããã¦ãã¾ãã¾ãããã¼ã¿ãæå·åãããã¨ã«ãã£ã¦ããã®è å¨ãæ¸ãããã¨ã + ã§ãã¾ããããã®æ©è½ããµãã¼ããã¦ãããã¼ã¿ãã¼ã¹ã¯å ãã§ãã + </simpara> + <simpara> + ãã®åé¡ã¸ã®æãç°¡åãªå¯¾å¿çã¯ãã¾ãèªåå°ç¨ã®æå·åããã±ã¼ã¸ã使ãã + ãããããªãã®PHPã¹ã¯ãªãããã使ç¨ãããã¨ã§ããPHPã®<link + linkend="ref.mcrypt">Mcrypt</link>, <link linkend="ref.mhash">Mhash</link> + ã¨ãã£ãå¹¾ã¤ãã®æ¡å¼µã¢ã¸ã¥ã¼ã«ã¯ãæ§ã ãªæå·åã¢ã«ã´ãªãºã ããµãã¼ã + ãã¦ããã®ã§å½¹ã«ç«ã¤ã§ãããããã¼ã¿æ ¼ç´æã«æå·åãè¡ããåå¾æã« + 復å·åãã¾ãããã®æ¹æ³ã«ã¤ãã¦ã¯ãªãã¡ã¬ã³ã¹ãåç §ãã¦ãã ããã + </simpara> + <simpara> + ããå®å ¨ã«ãã¼ã¿ãé ãããå ´åããå ã®ãã¼ã¿èªä½ã¯å¿ è¦ãªãå ´å(ã¤ã¾ã + 表示ãããªãå ´å)ã¯ãããã·ã¥ãèæ ®ã«å ¥ããã»ããè¯ãã§ãããã + ããã·ã¥ã®è¯ãç¥ãããä½¿ç¨æ¹æ³ã¯ããã¹ã¯ã¼ãããã®ã¾ã¾æ ¼ç´ããã«ã + ãã®MD5ããã·ã¥å¤ãæ ¼ç´ããæ¹æ³ã§ãã<function>crypt</function>ã + <function>md5</function>ãåç §ãã¦ãã ããã </simpara> <example> - <title>Using hashed password field</title> + <title>ããã·ã¥ãã¹ã¯ã¼ããã£ã¼ã«ãã使ã</title> <programlisting role="php"> <![CDATA[ -// storing password hash +// ããã·ã¥ããããã¹ã¯ã¼ããæ ¼ç´ãã $query = sprintf("INSERT INTO users(name,pwd) VALUES('%s','%s');", addslashes($username), md5($password)); $result = pg_exec($connection, $query); -// querying if user submitted the right password +// ãã¹ã¯ã¼ããæ£ãããã©ããåãåããã $query = sprintf("SELECT 1 FROM users WHERE name='%s' AND pwd='%s';", addslashes($username), md5($password)); $result = pg_exec($connection, $query);