From 9c559fd4e87a208a460255703d9b050988e12775 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 11 Feb 2006 21:46:15 +0000 Subject: Updated quickstart tutorial to reflect the addition of TSecurityManager. --- .../protected/pages/Security/ViewState.page | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'demos/quickstart') diff --git a/demos/quickstart/protected/pages/Security/ViewState.page b/demos/quickstart/protected/pages/Security/ViewState.page index 42499aae..1b79c272 100644 --- a/demos/quickstart/protected/pages/Security/ViewState.page +++ b/demos/quickstart/protected/pages/Security/ViewState.page @@ -8,24 +8,19 @@ Viewstate lies at the heart of PRADO. Viewstate represents data that can be used It is extremely important to ensure that viewstate is not tampered by end users. Without protection, malicious users may inject harmful code into viewstate and unwanted instructions may be performed when page state is being restored on server side.

-To prevent viewstate from being tampered, PRADO enforces viewstate HMAC (Keyed-Hashing for Message Authentication) check before restoring viewstate. Such a check can detect if the viewstate has been tampered or not by end users. Should the viewstate modifies, PRADO simply stops restoring the viewstate and returns an error message. +To prevent viewstate from being tampered, PRADO enforces viewstate HMAC (Keyed-Hashing for Message Authentication) check before restoring viewstate. Such a check can detect if the viewstate has been tampered or not by end users. Should the viewstate is modified, PRADO will stop restoring the viewstate and return an error message.

-HMAC check requires a private key that should be secret to end users. Developers can either manually specify a key or let PRADO automatically generate a key. Manually specified key is useful when the application runs on a server farm. To do so, configure TPageStatePersister in application configuration, +HMAC check requires a private key that should be secret to end users. Developers can either manually specify a key or let PRADO automatically generate a key. Manually specified key is useful when the application runs on a server farm. To do so, configure TSecurityManager in application configuration,

-<service id="page" class="TPageService"> - <modules> - <module id="state" - class="TPageStatePersister" - PrivateKey="my private key" /> - </modules> -</service> +<modules> + <module id="security" + class="TSecurityManager" + ValidationKey="my private key" /> +</modules>

-HMAC check does not prevent end users from reading the viewstate content. An added security measure is to encrypt the viewstate information so that end users cannot decipher it. Work on supporting viewstate encryption is ongoing. -

-

-Another strategy to protect viewstate is to store it on server side rather than using hidden fields. The relevant work is also ongoing. +HMAC check does not prevent end users from reading the viewstate content. An added security measure is to encrypt the viewstate information so that end users cannot decipher it. To enable viewstate encryption, set the EnableStateEncryption of pages to true. This can be done in page configurations or in page code. Note, encrypting viewstate may degrade the application performance. A better strategy is to store viewstate on the server side, rather than the default hidden field.

\ No newline at end of file -- cgit v1.2.3