Скачать презентацию Access control and user management in Apache WUCM Скачать презентацию Access control and user management in Apache WUCM

4a587afc812f66ece11bbe511440efba.ppt

  • Количество слайдов: 21

Access control and user management in Apache WUCM 1 1 Access control and user management in Apache WUCM 1 1

Apache access control • Include appropriate module: – mod_auth for basic authentication – mod_digest Apache access control • Include appropriate module: – mod_auth for basic authentication – mod_digest for digest authentication – mod_access control by host - not user • Access control can be: – Site wide • usually set up in the httpd. conf file – Per directory – often using an "access control file" • Unix: . htaccess • Windows: htaccess. hta – Access control files need to be protected themselves, especially when used per directory WUCM 1 2

Access control policy • Access control needs designing – What should go in the Access control policy • Access control needs designing – What should go in the httpd. conf file site-wide? • What do you want to be mandatory and not permit users to change? – For per directory controls: • who can control access to their own bit? • who can add/remove/manage users? • who can overrule site-wide structures? – Beware a proliferation of user. IDs/passwords WUCM 1 3

Access by user • Access control usually on a Access by user • Access control usually on a "per directory" basis • Need to be able to override site-wide control • Configured on a "realm" basis • htaccess. hta file might be: Auth. Name "Roger. Secrets" Auth. Type Basic Auth. User. File "N: /Web. Root/Users/users. pwd" require valid-user WUCM 1 4

Require option • Require can be general or specific: – require valid-user – require Require option • Require can be general or specific: – require valid-user – require user martin jane • Users can be grouped • Need a group file – plain text • You can the require a specific group of users, e. g. – require group staff WUCM 1 5

Access by host 1 • Restrict access by host using allow and deny • Access by host 1 • Restrict access by host using allow and deny • The order directive specifies which rule to apply first: – Order allow, deny • When you want to let most hosts in but keep a few out – Order deny, allow • When you want to keep most hosts out and let a few in – Order mutual-failure • When you want to let in only those on the allow list and who are not on the deny list – not very common! WUCM 1 6

Access by host 2 • Example: setup so access to directory admin can be Access by host 2 • Example: setup so access to directory admin can be from your office PC or home PC (assume fixed IP) Order deny, allow Deny from all Allow from 148. 192. 255. 5 155. 6. 122. 9 WUCM 1 7

Mixing access controls • User access control and host access control can be applied Mixing access controls • User access control and host access control can be applied to the same site/directory • Satisfy directive tells Apache how to mix the rules: – satisfy any • either host or user (id/password) valid – satisfy all • must be valid user and from a permitted host WUCM 1 8

User management • • Need a database of user name/password pairs A flat file User management • • Need a database of user name/password pairs A flat file is easy for small numbers of users For larger user bases, use a proper database Apache has a password utility htpasswd that builds a simple flat file WUCM 1 9

htpasswd • htpasswd has three (or 4) parameters: – flags (e. g. -c to htpasswd • htpasswd has three (or 4) parameters: – flags (e. g. -c to create file from scratch) – password file – user to add – optional: the password - but not hidden • e. g. htpasswd -c n: Web. RootUsersuser. pwd roger • If you don't specify password, it will prompt you for it • Windows version uses MD 5 encryption by default WUCM 1 10

htpasswd: examples of use WUCM 1 11 htpasswd: examples of use WUCM 1 11

Anonymous access • Needs module mod_auth_anon • Permits access via a Anonymous access • Needs module mod_auth_anon • Permits access via a "guest" user id with a password of user's email address • You should publish a privacy policy in respect of your use of these emails WUCM 1 12

Anonymous guest anonymous guestuser Anonymous_Must. Give. Email on Anonymous_Log." src="https://present5.com/presentation/4a587afc812f66ece11bbe511440efba/image-13.jpg" alt="Example Anonymous guest anonymous guestuser Anonymous_Must. Give. Email on Anonymous_Log." /> Example Anonymous guest anonymous guestuser Anonymous_Must. Give. Email on Anonymous_Log. Email on Anonymous_Verify. Email on Anonymous_No. User. Id off Require valid-user WUCM 1 13

Search engine spider control (1) • Search engine spider control (1) • "Robots" or "spiders" are automated clients used to traverse websites • Most used to gather information for search engines • Reasons to keep spiders out (of all or part of site): – It is incomplete – It is private – It is time sensitive (i. e. the contents will be rapidly out of date) – It is dynamically generated – Bad spiders may hit too fast and block user access WUCM 1 14

Search engine spider control (2) • Most spiders/robots will voluntarily adhere to your robot Search engine spider control (2) • Most spiders/robots will voluntarily adhere to your robot policies • Bad spiders will ignore it so it is not a guarantee of protection • A file robots. txt in the Document. Root directory (e. g. htdocs) controls robot behaviour • See http: //www. robotstxt. org/wc/norobots. html for details of the standard WUCM 1 15

Example robots. txt User-agent: Web. Crawler User-agent: excite Disallow: /cgi-bin Disallow: /private Allow: / Example robots. txt User-agent: Web. Crawler User-agent: excite Disallow: /cgi-bin Disallow: /private Allow: / User-agent: * Disallow: / WUCM 1 16

Logging access • Generating access logs is usually a component of any security policy: Logging access • Generating access logs is usually a component of any security policy: – Why? – Who looks at them? – Authority part of your policy? – How long to keep? • Use of tools to extract statistics • Should logs include user identifiers? WUCM 1 17

Security of CGI scripts • Main recommendation – only enable CGI if needed • Security of CGI scripts • Main recommendation – only enable CGI if needed • CGI issues: – Do you allow users to install their own CGI scripts? – What user does the CGI script run as? – Use a CGI wrapper – su. EXEC or CGIwrap – Keep the patch level monitored – Open Source CGI scripts regularly updated WUCM 1 18

Intruder detection • An Intruder Detection System (IDS) is software for larger public sites Intruder detection • An Intruder Detection System (IDS) is software for larger public sites • An IDS looks for suspicious behaviour on your system, this may be: – Altered files – Non-normal activity – Multiple login attempts, etc. WUCM 1 19

IDS features • Nobles (2001) sets out important IDS features: – Detect behaviour outside IDS features • Nobles (2001) sets out important IDS features: – Detect behaviour outside the norm - abnormal actions or results – Sensitive to common attack signatures – Low overhead – minimal impact on service – Should start and stop automatically following web server – Resistant to cracker attack – Configurable so can focus on specific triggers WUCM 1 20

IDS products • Typical products include: – Network ICE – Cisco Intrusion Detection System IDS products • Typical products include: – Network ICE – Cisco Intrusion Detection System – Real. Secure – Kane Security Monitor • Responses to intrusion: – Restore/Repair – backups vital here – Patch security hole – prevent recurrence – Alert community/authorities WUCM 1 21