서버가 페이지에 대한 요청을 수신하면 ACL 파일의 규칙을 사용하여 액세스 권한을 부여해야 하는지 여부를 결정합니다. 규칙은 요청을 보내는 컴퓨터의 호스트 이름 또는 IP 주소를 참조할 수 있습니다. 또한 LDAP 디렉토리에 저장된 사용자 및 그룹을 참조할 수 있습니다.
다음 예에서는 ACL 파일의 가능한 내용을 표시하고 액세스 제어 규칙에 대한 예를 제공합니다.
version 3.0; # The following "es-internal" rules protect files such # as icons and images related to Sun Java System Web Proxy Server. # These "es-internal" rules should not be modified. acl "es-internal"; allow (read, list, execute,info) user = "anyone"; deny (write, delete) user = "anyone"; # The following rules deny access to the directory "web" # to everyone not in the directory server and deny everyone # in the directory server who is not in GroupB. # Only the users in GroupB are allowed read, execute, list, # and info permissions. GroupA cannot gain access to the # directory "web" even though (in the ACL rule below) they # can access the directory “my_stuff”. Furthermore, members # of GroupB cannot write or delete files. acl "path=/export/user/990628.1/docs/my_stuff/web/"; authenticate (user,group) { database = "default"; method = "basic"; }; deny (all) (user = "anyone"); allow (read,execute,list,info) (group = "GroupB"); # The following rule denies everyone not in the directory # server and denies everyone in the directory server except # users with the ID of "SpecificMemberOfGroupB". The ACL rule # in this setting also has a requirement that the user # connect from a specific IP address. The IP address setting # in the rule is optional, and has been added for extra # security. Also, this ACL rule has a Customized prompt # of "Presentation Owner". This Customized prompt appears # in the username and password dialog box in the client’s # browser. acl "path=/export/user/990628.1/docs/my_stuff/web/presentation.html"; authenticate (user,group) { database = "default"; method = "basic"; prompt = "Presentation Owner"; }; deny (all) (user = "anyone" or group = "my_group"); allow (all) (user = "SpecificMemberOfGroupB") and (ip = "208.12.54.76"); # The following ACL rule denies everyone not in the directory # server and everyone in the directory server except for # GroupA and GroupB access to the directory “my_stuff” acl "path=/export/user/990628.1/docs/my_stuff/"; authenticate (user,group) { database = "default"; method = "basic"; }; deny (all) (user = "anyone"); allow (read,execute,list,info) (group = "GroupA,GroupB"); |
예를 들어 사용자가 URL http://server_name/my_stuff/web/presentation.html 을 요청하면 Proxy Server는 먼저 전체 서버에 대한 액세스 제어를 확인합니다. 전체 서버용 ACL이 계속으로 설정된 경우 서버는 my_stuff 디렉토리용 ACL을 확인합니다. ACL이 존재하면 서버는 ACL에 있는 ACE를 확인한 후, 다음 디렉토리로 이동합니다. 이 프로세스는 액세스를 거부하는 ACL이 발견되거나 요청된 URL에 대한 마지막 ACL(이 경우에는 presentation.html 파일)에 도달할 때까지 계속됩니다.
Server Manager를 사용하여 이 예에서의 액세스 제어를 설정하려면 파일 전용 또는 파일로 유도되는 각 자원용 ACL을 만들 수 있습니다. 즉, 전체 서버용 1개, my_stuff 디렉토리용 1개, my_stuff/web 디렉토리용 1개 및 해당 파일용 1개를 만들 수 있습니다.
일치되는 ACL이 둘 이상인 경우 서버는 일치되는 마지막 ACL문을 사용합니다.