Medianote
|
PmWiki /
SecurityPmWiki Authentification 개요 PmWiki는 기본적으로 "유저 기반"의 권한시스템이 아니라 "패스워드 기반" 권한 시스템을 가지고 있다. 예를 들면, 페이지의 수정 권한을 얻기 위해 "아이디/패스워드"가 필요한 것이 아니라, 해당 권한을 얻기 위한 "패스워드"만이 필요하다. (이 부분이 "유저기반"의 로그인 시스템에 익숙한 우리로서는 생소한 부분인데, 개인이나 소규모 그룹이 사용하기에는 괜찮은 것 같다.) 유저별로 권한을 관리하지 않기 때문에 PmWiki의 권한관리는 무척 간단할 수 있다. 권한의 종류 PmWiki는 기본적으로 read, edit, attr, upload의 권한을 따로 관리한다. 각각은 read : 읽기 권한
edit : 수정 권한
upload : 업로드 권한
attr : 권한관리 권한(다시 말해서, 위의 read, edit, upload 패스워드를 바꿀 수 있는 권한)
이 네가지 권한을 페이지별, 그룹별, 싸이트 전체로 설정해주는 것으로 PmWiki의 기본적인 권한설정은 끝난다. 싸이트 전체(Site-wide) 권한 설정 위키 싸이트 전체를 아우르는 권한 설정은 local/config.php에서 이루어진다. 이곳에서 지정할 수 있는 권한은 다음과 같다.
위에서 언급했던 네가지 권한에 대한 전체 싸이트 권한 설정은 쉽게 짐작할 수 있다. 페이지에 필요한 권한의 종류는 네가지라고 했다. 그럼 admin은 어떤 권한일까? admin 권한은 슈퍼유저 권한이다. 그리고 이 권한은 lock 되어있는 권한에 접근할 수 있는 유일한 권한이다.
admin과 upload는 초기값으로 lock 되어있다. Main과 PmWiki 그룹은 attr 권한이 lock되어있다. Site 그룹의 페이지들은 Site.SideBar를 제외하고 edit권한이 lock 되어있다. Site.SideBar 페이지는 admin이나 site-wide edit 권한이 필요하다. (다시 말해서, site-wide edit 비번이 설정되지 않은 경우엔 그냥 수정가능하다.) 페이지 권한 설정 페이지별로 권한 설정을 하려면 attr action을 이용한다. 예를 들면, 다음과 같다. http://domain.com/Group/Page?action=attr 해당 명령으로 열리는 페이지에는 read, edit, attribute, upload 패스워드를 설정할 수 있는 양식이 보여진다. 이 양식에 패스워드를 입력하고 Save하면 해당 권한에 패스워드가 설정된다. 이 때 특수한 명령어를 입력할 수도 있다. 명령은 다음과 같다. clear : 입력된 패스워드를 삭제하고, 초기값으로 되돌린다. @nopass : 그룹이나 싸이트 패스워드가 걸려있어도 무시하고 패스워드 없이 사용토록 한다. @lock : 잠근다. admin 패스워드로만 접근가능하다. @_site_edit, @_site_read, @_site_admin, @_site_upload : 싸이트 전체 권한 비밀번호에 일치시킨다. 그룹 권한 설정 페이지들의 모임인 그룹에 권한을 설정하는 것은 조금 까다롭다. 그룹 권한 설정은 GroupAttribute라는 페이지를 이용하여 권한을 설정한다. 예는 다음과 같다. http://domain.com/pmwiki/Group/GroupAttribute?action=attr 혼동을 줄 수 있어 덧붙이자면, 여기서 Group은 그룹명을 치환하고 GroupAttribute는 그대로 입력한다. 이 명령으로 열리는 페이지의 권한은 Group에 속하는 모든 페이지에 해당한다. 여기서도 역시 특수한 명령어를 쓸 수 있다. 사용법은 페이지 권한과 동일하므로 생략한다. clear @nopass @lock (@_site_edit 등은 온라인 매뉴얼에 언급되어있지 않다. 실험해봐야할듯) 어떤 패스워드가 우선하나? 어떤 권한에 대해서 전체싸이트 권한, 그룹권한, 페이지 권한이 중복되어있을 경우 어떤 패스워드가 이길까. 정답은, 페이지 > 그룹 > 초기값, 그리고 admin 패스워드는 만능키다. 더 알아둘 것 PmWiki가 패스워드 기반의 권한관리를 하긴 하지만, 함께 제공되는 플러그인인 AuthUser를 이용하면 유저 기반 권한관리도 가능하다. http://www.pmwiki.org/wiki/PmWiki/AuthUser 문서를 참고할 것. 참고문서 http://www.pmwiki.org/wiki/PmWiki/Passwords http://www.pmwiki.org/wiki/PmWiki/PasswordsAdmin Aspects of PmWiki security are found on the following pages: Pages distributed in a PmWiki release:
Cookbook Pages
How do I report a possible security vulnerability of PmWiki? Pm wrote about this in a post to pmwiki-users from September 2006. In a nutshell he differentiates two cases:
See his post mentioned above for details and rationals. What about the botnet security advisory at http://isc.sans.org/diary.php?storyid=1672? Sites that are running with PHP's register_globals setting set to "On" and versions of PmWiki prior to 2.1.21 may be vulnerable to a botnet exploit that is taking advantage of a bug in PHP. The vulnerability can be closed by turning register_globals off, upgrading to PmWiki 2.1.21 or later, or upgrading to PHP versions 4.4.3 or 5.1.4. Wiki Vandalism
How do I stop pages being deleted, eg password protect a page from deletion? Use Cookbook:DeleteAction and password protect the page deletion action by adding or to require the edit or admin password respectively.
How do I stop pages being replaced with an empty (all spaces) page? Add how do I stop pages being completely replaced by an inane comment such as excellent site, great information, where the content cannot be blocked? Try using the newer automatic blocklists that pull information and IP addresses about known wiki defacers. (OR) Try using Cookbook:Captchas or Cookbook:Captcha (note these are different). (OR) Set an edit password, but make it publicly available on the Site.AuthForm template. How do I password protect all common pages in all groups such as recent changes, search, group header, group footer, and so on? Insert the following lines into your local/config.php file. Editing these pages then requires the admin password. ## Require admin password to edit RecentChanges (etc.) pages. if ($action=='edit' && preg_match('/\\.(Search|Group(Header|Footer)|(All)?RecentChanges)$/', $pagename)) { $DefaultPasswords['edit'] = crypt('secret phrase'); } Note that all GroupAttributes pages are protected by the attr password. Alternative: you can require 'admin' authentication for these pages: ## Require admin password to edit RecentChanges (etc.) pages. if ($action=='edit' && preg_match('(Search|Group(Header|Footer)|(All)?RecentChanges)', $pagename)) { $HandleAuth['edit'] = 'admin'; } How do I password protect the creation of new groups? See Cookbook:Limit Wiki Groups How do I password protect the creation of new pages? See Cookbook:Limit new pages in Wiki Groups How do I take a whitelist approach where users from known or trusted IP addresses can edit, and others require a password? Put these lines to local/config.php: ## Allow passwordless editing from own turf, pass for others. if ($action=='edit' && !preg_match("^90.68.", $_SERVER['REMOTE_ADDR']) ) { $DefaultPasswords['edit'] = crypt('foobar'); } Replace 90.68. with the preferred network prefix and foobar with the default password for others. How do I password protect page actions? See Passwords for setting in config.php
or
How to make a rule that allows only authors to edit their own wiki page in Profiles? group? Add this to your local/config.php $name = PageVar($pagename, '$Name');
$group = PageVar($pagename, '$Group');
if($group=='Profiles')
How do I moderate all postings? Enable PmWiki.Drafts
How do I make a read only wiki? In config.php set an "edit" password. How do I restrict access to uploaded attachments? See
This page may have a more recent version on pmwiki.org: PmWiki:Security, and a talk page: PmWiki:Security-Talk. |
Recent Comments