module – deploying your site

76
Company Confidential 1 Module – Deploying Your Site

Upload: jolie

Post on 15-Jan-2016

44 views

Category:

Documents


0 download

DESCRIPTION

Module – Deploying Your Site. Objectives. Web Application Security Overview Working with Windows Based Authentication and Securing Web site using Windows Based Authentication Working with Forms Based Authentication and Securing Web site using Forms Based Authentication - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Module – Deploying Your Site

Company Confidential

1

Module – Deploying Your Site

Page 2: Module – Deploying Your Site

Objectives

• Web Application Security Overview• Working with Windows Based Authentication and

Securing Web site using Windows Based Authentication• Working with Forms Based Authentication and Securing

Web site using Forms Based Authentication• Overview of MS Passport Authentication• Securing a MS ASP.NET Web Application• Configuring an ASP.NET Web Application• Deploying an ASP.NET Web Application

Page 3: Module – Deploying Your Site

Objectives (Cont…)

• Configuring, Optimizing and Deploying a MS ASP.NET Application

• Registering New Users• Permitting Users to Sign Out

Page 4: Module – Deploying Your Site

Web Application Security Overview

• Website Security – – Preventing unauthorized users NOT to access the

portion of website or web store or web front Database.

– This has certainly become a seemingly important aspect for ecommerce based websites, where customers confidential data such as personal information, credit card information that would be stored in the Database need to be thoroughly secured.

– The security features of ASP.NET addresses the above, besides many other security issues, that are related.

Page 5: Module – Deploying Your Site

Web Application Security Overview (Cont…)

• Microsoft’s ASP.NET, addresses these web security issues in combination with its Web server layer.

• Microsoft Internet Information Server (MS IIS), where the user’s identification viz names and passwords that can be authenticated using –– Windows Based Authentication– Forms Based Authentication– Microsoft Passport Authentication

Lets understand the scenario with the terms

Authentication and Authorization

Page 6: Module – Deploying Your Site

Web Application Security Overview (Cont…)

Authentication versus Authorization• The terms Authentication and Authorization seems to be synonyms

for many of them, however they aren’t the same• The process of Authentication

– identifies the users of the system whereas • The Authorization defines

– the level of access the authenticated user has, to the systems and its resources.

Note: In many host-based systems and client/server systems, both

these Authentication and Authorization processes are performed by

the same physical hardware and, in some cases, the same software.

Page 7: Module – Deploying Your Site

Working with Windows Based Authentication

• ASP.NET uses Windows authentication in combination with its Web server layer Microsoft Internet Information Services (IIS) authentication.

• This process can be performed by IIS using one of the following ways:– Basic – Digest or – Integrated Windows Authentication (default

mechanism)• Once the above process is complete, ASP.NET uses the

authenticated identity to authorize access.

Page 8: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• To enable an authentication provider for an ASP.NET application, we need to create an entry for the application’s ‘web.config’ configuration file as follows:

– <authentication mode= "[Windows]"/>

Page 9: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

Page 10: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Click on Website menu and select ASP.net Configuration and click it

Page 11: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• You will see the following screen

Page 12: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Click on security tab to create Users (for authentication) and Roles (to authorize an authenticated user)

Page 13: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Select ‘From Internet Option’ if the application is hosted on Internet to facilitate users from Internet or Select ‘From a local network’ if the application is hosted on intranet.

Page 14: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Users being ‘0’ initially, this is highlighted for your reference

Page 15: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Creating role, you need to enable the option

Page 16: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Existing roles being ‘0’ initially, this is highlighted for your reference

Page 17: Module – Deploying Your Site

Registering New User (ASP.NET Web Administration Tool)

• Registering New Users –using ASP.NET Website Administration Tool

Page 18: Module – Deploying Your Site

Registering New User (ASP.NET Web Administration Tool) (Cont…)

• Registering New Users –using ASP.NET Website Administration Tool (Cont…)

• User created Successfully

Page 19: Module – Deploying Your Site

Registering New User (ASP.NET Web Administration Tool) Create or Managing Role… (Cont…)

• Existing user is 1, highlighted for your reference

Page 20: Module – Deploying Your Site

Registering New User (ASP.NET Web Administration Tool) Create or Managing Role… (Cont…)

• Creation of new role that can be managed later

Page 21: Module – Deploying Your Site

Registering New User (ASP.NET Web Administration Tool) Create or Managing Role… (Cont…)

• Creating a New Role called ‘Power User’

Page 22: Module – Deploying Your Site

Registering New User (ASP.NET Web Administration Tool) Create or Managing Role… (Cont…)

• Power User created that can be managed later using the manage link

Page 23: Module – Deploying Your Site

Registering New User (ASP.NET Web Administration Tool) Create or Managing Role… (Cont…)

• Role is changed to 1 as a new role is defined and highlighted for your reference

Page 24: Module – Deploying Your Site

Registering New User (ASP.NET Web Administration Tool) Create or Managing Role… (Cont…)

• Users can be managed

Page 25: Module – Deploying Your Site

Registering New User (ASP.NET Web Administration Tool) Create or Managing Role… (Cont…)

• Initially all the users will be alphabetically arranged and a selection can be narrowed down if the number of users list grows

Page 26: Module – Deploying Your Site

Working with Windows Based Authentication

• Adding a new item (Web form) in the solution explorer

Page 27: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• A new web form called login.aspx is about to get created

Page 28: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• A new web form called login.aspx is created and from the Login palette on the toolbox of the IDE, a login control is dragged and dropped on the web form (login.aspx)

Page 29: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Highlight the login control and click on the tiny little arrow to open a diglog box as shoen below to format the control to have a naet look-n-feel

Page 30: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Formatted login control on the login.aspx web form

Page 31: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Usage of other login controls such as ‘login view’• On the default.aspx page, pull a login view control and

place it

Page 32: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Usage of other login controls such as ‘login view’(Cont…)

• On the default.aspx page, pull a login view control and place it

• The login view control has the ability to show an anonymous user and a user who is already logged on

Page 33: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Usage of other login controls such as ‘login view’(Cont…)

• On the default.aspx page, pull a login view control and place it (Cont…)

• The login status control is a toggle control that toggles between login and log out (sign out)

Page 34: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Usage of other login controls such as ‘user name’

• On the default.aspx page, pull a user name control and place it

• The username control has the ability to show a user who is already logged on

Page 35: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Running the application by hitting the F5 function key

Page 36: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• About to get to run mode and display the web form

Page 37: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Run mode of login.aspx

Page 38: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• Administrator is authenticated and the corresponding controls behave as per norms

Page 39: Module – Deploying Your Site

Working with Windows Based Authentication (Cont…)

• User ‘Administrator’ NOT authenticated as a password was wrongly supplied to test the application

Page 40: Module – Deploying Your Site

Working with Forms Based Authentication

• In Forms Based Authentication– unauthenticated requests will be re-directed to a

HTML form using the client side redirection object.– If the user’s identity is authenticated, the process

issues an authentication ticket in a cookie that contains the credentials or a key to re-acquire the identity.

– All the requests hence forth are issued with the cookie in the request headers (that are authenticated) and will be authorized by an ASP.NET handler.

Page 41: Module – Deploying Your Site

Registering a new user using Forms Based Authentication

• Create a new webform in the solution explorer and name it ‘createuser.aspx’

Page 42: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• A control called createnewuserwizard is pulled from the login control pallete and placed on the webform called createuser.aspx

Page 43: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Adding a hyperlink control on the login window

Page 44: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Run mode of login.aspx to use the create new userwizard control

Page 45: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Run mode of createuser.aspx to use the createnewuserwizard control for signing up a new user

Page 46: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Corresponding entries are made

Page 47: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• New user called New Horizons is added successfully using Forms Based Authentication

Page 48: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Users changed to 2

Page 49: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• You can see a user called New Horizons while you hit the manage link

Page 50: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Click on the hyperlink alphabet to narrow down the search criteria

Page 51: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Anonymous user logged in

Page 52: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Trying to see if we can use this control, wrong password entered

Page 53: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Login failed for the user New Horizons

Page 54: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• New Horizons user authenticated

Page 55: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• User New Horizons logged out

Page 56: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication

• Create a ForgotPassword.aspx page in solution explorer

Page 57: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication

• Pull a PasswordRecovery control to the form ForgotPassword.aspx

Page 58: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication (Cont…)• Create a hyperlink called Forgot Password that can be linked to this

ForgotPassword.aspx page

Page 59: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication (Cont…)

• Design mode of login.aspx page to test the Forgot Password link

Page 60: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication (Cont…)

• Run mode of login.aspx page to test the Forgot Password link

Page 61: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication (Cont…)

• Wrong password entered

Page 62: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication (Cont…)

• Wrong password entered and failed status

Page 63: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication (Cont…)

• Entering correct password

Page 64: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication (Cont…)

• Confirming the identity

Page 65: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication (Cont…)

• Confirming the identity –- Input wrong entry

Page 66: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication (Cont…)

• Confirming the identity -- Invalid answer

Page 67: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication (Cont…)

• Confirming the identity – Input Correct entry• This will lead to the ‘Password sent’ to the email at the

time of registration page

Page 68: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication (Cont…)

• Confirming the identity – Input Correct entry (Cont…)

• This will lead to the ‘Password sent’ to the email at the time of registration page

• Note: For this the FROM PROPERTY must be filled and SMTP email must be configured, if any of these is missing, it will go to a failure page as follows:

Page 69: Module – Deploying Your Site

Working with Forms Based Authentication (Cont…)

• Securing your website using Forms Based Authentication (Cont…)

• Confirming the identity – Input Correct entry (Cont…)

Page 70: Module – Deploying Your Site

Overview of Microsoft Passport Authentication

• Passport authentication– is a centralized authentication service provided

by Microsoft that offers a single signon* and core profile services for member sites.

– Microsoft .NET Passport, provides • a basic form with a graphical user interface (GUI) for

sign-up and login, • a database of user information, • authentication logic at the Web server, • Log-out functionality wrapped inside an easy-to-use

programmatic interface.

Page 71: Module – Deploying Your Site

Overview of Microsoft Passport Authentication (Cont…)

• This Passport architecture is simple, where in which a single .NET Passport class named System.Web.Security.PassportIdentity wraps all authentication functionality.

• A Passport-enabled Web application developer need only instantiate the PassportIdentity class and use its methods to perform the complete authentication process.

Page 72: Module – Deploying Your Site

Overview of Microsoft Passport Authentication (Cont…)

• * Single Sign-onSingle sign-on is yet another good feature of Microsoft. This corporate hosts its passport service on their own servers and allows an integrated single sign on identity for all passport enabled accounts viz hotmail, msn.

• This means users with Passport-enabled accounts need to remember only one login password pair to access all partner sites.

Page 73: Module – Deploying Your Site

Overview of Microsoft Passport Authentication (Cont…)

• Permitting users to Sign-in using the form based login

Page 74: Module – Deploying Your Site

Overview of Microsoft Passport Authentication (Cont…)

• Permitting users to Sign-out

Page 75: Module – Deploying Your Site

Overview of Microsoft Passport Authentication (Cont…)

• Permitting users to Sign-in using the Login hyperlink

Page 76: Module – Deploying Your Site

Thank You

Thank You