Presentation is loading. Please wait.

Presentation is loading. Please wait.

Authentication Names and Passwords Names and Passwords Also can use Groups Also can use Groups Webmaster can “require” authentication Webmaster can “require”

Similar presentations


Presentation on theme: "Authentication Names and Passwords Names and Passwords Also can use Groups Also can use Groups Webmaster can “require” authentication Webmaster can “require”"— Presentation transcript:

1 Authentication Names and Passwords Names and Passwords Also can use Groups Also can use Groups Webmaster can “require” authentication Webmaster can “require” authentication Each username and password is valid for a particular realm Each username and password is valid for a particular realm Password is sent unencrypted Password is sent unencrypted

2 Authentication AuthType Basic AuthName Admin AuthUserFile /var/lib/apache/names AuthGroupFile /var/lib/apache/groups require valid-user </Directory>

3 Authentication Directives AuthType type AuthType type  Basic or Digest  If AuthType is used then AuthName, AuthGroupFile, and AuthUserFile must be specified AuthName auth-realm AuthName auth-realm AuthGroupFile filename AuthGroupFile filename

4 Authentication Directives (cont) AuthUserFile filename AuthUserFile filename  Contains usernames and encrypted passwords Limit method_1 method_2 … Limit method_1 method_2 …  Not normally used Require user name(s) | group name(s) | valid-user Require user name(s) | group name(s) | valid-user  Key directive that causes password checking

5 Authentication Directives (cont) Satisfy any | all Satisfy any | all  Sets access policy if allow and require are used  Only useful if access to a particular area is being restrictd by both username/password and client host address

6 Passwords Under Unix Use the htpasswd program to create the user/password file Use the htpasswd program to create the user/password file htpasswd -? htpasswd -? htpasswd –c /var/lib/apache/names admin htpasswd –c /var/lib/apache/names admin htpasswd /var/lib/apache/names teacher htpasswd /var/lib/apache/names teacher DBM Files DBM Files

7 Order, Allow, Deny You can also control access based on a specific IP address, hostnames, or groups of addresses and hostnames You can also control access based on a specific IP address, hostnames, or groups of addresses and hostnames Allow from ….. And ….. Deny from Allow from ….. And ….. Deny from Order is not set by the way you enter it in the configuration file Order is not set by the way you enter it in the configuration file Default is deny then allow Default is deny then allow

8 Allow, Order, Deny Allow from Allow from  Allow from host host  Controls access to a directory  Host can be All, domain name, IP Address, or a netmask

9 Allow, Order, Deny Allow from env Allow from env  Uses a named variable  See Page 115 Deny from Deny from  Controls access by host Deny from env Deny from env

10 Allow, Order, Deny Order ordering Order ordering  Controls the order in which directives are applied (no spaces allowed)  deny,allow  deny directives evaluated first  allow,deny  allow directives evaluated first

11 Allow, Order, Deny mutual-failure mutual-failure  Hosts that appear on the allow list and do not appear on the deny list are allowed

12 Anonymous Access Example Example  Anonymous_Authoritative off  Anonymous guest anonymous air-head Lets you login as guest, anonymous or air- head Lets you login as guest, anonymous or air- head

13 Anonymous Access Directives Anonymous userid1 userid2 … Anonymous userid1 userid2 … Anonymous_NoUserID on | off Anonymous_NoUserID on | off  Still must put something in the PW field Anonymous_LogEmail on | off Anonymous_LogEmail on | off Anonymous_VerifyEmail on | off Anonymous_VerifyEmail on | off  Userid must contain at least one @

14 Anonymous Access Directives Anonymous_Authoritative on | off Anonymous_Authoritative on | off  If user fails anonymous authorization they fail all authorization Anonymous_MustGiveEmail on | off Anonymous_MustGiveEmail on | off  User must give an email ID as a password

15 .htaccess file Directives go in separate file versus in the httpd.conf file Directives go in separate file versus in the httpd.conf file Great for controlling access to specific directories or even entire sites Great for controlling access to specific directories or even entire sites AccessFileName Directive must be in the httpd.conf file to allow this to work AccessFileName Directive must be in the httpd.conf file to allow this to work

16 Overrides AllowOverride override1 override2 AllowOverride override1 override2 Tells apache which directives in an.htaccess file can override earlier directives. Tells apache which directives in an.htaccess file can override earlier directives. See page 129 for examples See page 129 for examples


Download ppt "Authentication Names and Passwords Names and Passwords Also can use Groups Also can use Groups Webmaster can “require” authentication Webmaster can “require”"

Similar presentations


Ads by Google