5 TWiki User Authentication.docx

上传人:b****6 文档编号:12526555 上传时间:2023-06-06 格式:DOCX 页数:11 大小:22.85KB
下载 相关 举报
5 TWiki User Authentication.docx_第1页
第1页 / 共11页
5 TWiki User Authentication.docx_第2页
第2页 / 共11页
5 TWiki User Authentication.docx_第3页
第3页 / 共11页
5 TWiki User Authentication.docx_第4页
第4页 / 共11页
5 TWiki User Authentication.docx_第5页
第5页 / 共11页
5 TWiki User Authentication.docx_第6页
第6页 / 共11页
5 TWiki User Authentication.docx_第7页
第7页 / 共11页
5 TWiki User Authentication.docx_第8页
第8页 / 共11页
5 TWiki User Authentication.docx_第9页
第9页 / 共11页
5 TWiki User Authentication.docx_第10页
第10页 / 共11页
5 TWiki User Authentication.docx_第11页
第11页 / 共11页
亲,该文档总共11页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

5 TWiki User Authentication.docx

《5 TWiki User Authentication.docx》由会员分享,可在线阅读,更多相关《5 TWiki User Authentication.docx(11页珍藏版)》请在冰点文库上搜索。

5 TWiki User Authentication.docx

5TWikiUserAuthentication

TWikiUserAuthentication

TWikisiteaccesscontrolanduseractivitytrackingoptions

∙TWikiUserAuthentication

oOverview

oPasswordManagement

oUserMapping

oUserRegistration

oLoginManagement

▪NoLogin(selectnoneinconfigure)

▪TemplateLogin(selectTWiki:

:

Client:

:

TemplateLogininconfigure)

▪EnablingTemplateLogin

▪ApacheLogin(selectTWiki:

:

Client:

:

ApacheLogininconfigure)

▪EnablingApacheLoginusingmod_auth

▪Logonsviabin/logon

oSessions

▪Getting,Setting,andClearingSessionVariables

▪CookiesandTransparentSessionIDs

oTWikiUsernamevs.LoginUsername

oChangingPasswords

oChangingE-mailAddresses

oControllingaccesstoindividualscripts

Howtochooseanauthenticationmethod

Overview

Authentication,or"login",istheprocessbywhichauserletsTWikiknowwhotheyare.

Authenticationisn'tjusttodowithaccesscontrol.TWikiusesauthenticationtoidentifyusers,soitcankeeptrackofwhomadechanges,andmanageawiderangeofpersonalsettings.Withauthenticationenabled,userscanpersonaliseTWikiandcontributeasrecognisedindividuals,insteadofshadows.

TWikiauthenticationisveryflexible,andcaneitherstandaloneorintegratewithexistingauthenticationschemes.YoucansetupTWikitorequireauthenticationforeveryaccess,oronlyforchanges.Authenticationisalsoessentialforaccesscontrol.

QuickAuthenticationTest-Usethe%USERINFO%variabletoreturnyourcurrentidentity:

∙Youareguest,TWikiGuest,

TWikiuserauthenticationissplitintofoursections;passwordmanagement,usermapping,userregistration,andloginmanagement.Passwordmanagementdealswithhowuserspersonaldataisstored.Registrationdealswithhownewusersareaddedtothewiki.Loginmanagementdealswithhowuserslogin.

Onceauserisloggedon,theycanberememberedusingaClientSessionstoredinacookieinthebrowser(orbyotherlesselegantmeansiftheuserhasdisabledcookies).Thisavoidsthemhavingtologonagainandagain.

TWikiuserauthenticationisconfiguredthroughtheSecuritySettingspaneintheconfigureinterface.

PleasenoteFileAttachmentsarenotprotectedbyTWikiUserAuthentication.

Tip:

TWiki:

TWiki.TWikiUserAuthenticationSupplementonTWiki.orghassupplementaldocumentationonuserauthentication.

PasswordManagement

Asshipped,TWikisupportstheApache'htpasswd'passwordmanager.Thismanagersupportstheuseof.htpasswdfilesontheserver.ThesefilescanbeuniquetoTWiki,orcanbesharedwithotherapplications(suchasanApachewebserver).Avarietyofpasswordencodingsaresupportedforflexibilitywhenre-usingexistingfiles.SeethedescriptivecommentsintheSecuritySettingssectionofthe[[/cgi-bin/configure][configure]interfaceformoredetails.

Youcaneasilypluginalternatepasswordmanagementmodulestosupportinterfacestootherthird-partyauthenticationdatabases.

UserMapping

Oftenwhenyouareusinganexternalauthenticationmethod,youwanttomapfromanunfriendly"loginname"toamorefriendlyWikiName.Also,anexternalauthenticationdatabasemaywellhaveuserinformationyouwanttoimporttoTWiki,suchasusergroups.

Bydefault,TWikisupportsmappingofusernamestowikinames,andsupportsTWikigroupsinternaltoTWiki.Ifyouwant,youcanpluginanalternateusermappingmoduletosupportimportofgroupsetc.

UserRegistration

Newuserregistrationusesthepasswordmanagertosetandchangepasswordsandstoreemailaddresses.Itisalsoresponsibleforthenewuserverificationprocess.theregistrationprocesssupportssingleuserregistrationviatheTWikiRegistrationpage,andbulkuserregistrationviatheBulkRegistrationpage(foradminsonly).

Theregistrationprocessisalsoresponsibleforcreatingusertopics,andsettingupthemappinginformationusedbytheUserMappingsupport.

Note:

IfyouarerestrictingtheentireMainwebtoTWikiGuest,youarerequiredtoaddTWikiRegistrationAgenttoALLOWWEBCHANGEinyourMain/WebPreferences.Bydoingso,newusersareabletoregisterwithoutanyerrors.

LoginManagement

Loginmanagementcontrolsthewayusershavetologin.Therearethreebasicoptions;nologin,loginviaaTWikiloginpage,andloginusingthewebserverauthenticationsupport.

NoLogin(selectnoneinconfigure)

Doesexactlywhatitsaysonthetin.Forgetaboutauthenticationtomakeyoursitecompletelypublic-anyonecanbrowseandeditfreely,inclassicWikistyle.AllvisitorsaregiventheTWikiGuestdefaultidentity,soyoucan'ttrackindividualuseractivity.

Note:

Thissetupisnotrecommendedonpublicwebsitesforsecurityreasons;anyonewouldbeabletochangesystemsettingsandperformtasksusuallyrestrictedtoadministrators.

TemplateLogin(selectTWiki:

:

Client:

:

TemplateLogininconfigure)

TemplateLoginasksforausernameandpasswordinawebpage,andprocessesthemusingwhateverPasswordManageryouchoose.Userscanloginandlogout.ClientSessionsareusedtorememberusers.Userscanchoosetohavetheirsessionrememberedsotheywillautomaticallybeloggedinthenexttimetheystarttheirbrowser.

EnablingTemplateLogin

1.Usetheconfigureinterfaceto

1.selecttheTWiki:

:

Client:

:

TemplateLoginloginmanager(ontheSecuritySettingspane).

2.selecttheappropriatepasswordmanagerforyoursystem,orprovideyourown.

2.RegisteryourselfintheTWikiRegistrationtopic.

Checkthatthepasswordmanagerrecognisesthenewuser.Ifyouareusing.htpasswdfiles,checkthatanewlinewiththeusernameandencryptedpasswordisaddedtothe.htpasswdfile.Ifnot,youprobablygotapathwrong,orthepermissionsmaynotallowthewebserverusertowritetothatfile.

3.Createanewtopictocheckifauthenticationworks.

4.EdittheTWikiAdminGrouptopicintheMainwebtoincludeuserswithsystemadministratorstatus.

Thisisaveryimportantstep,asusersinthisgroupcanaccessalltopics,independentofTWikiaccesscontrols.

TWikiAccessControlhasmoreinformationonsettingupaccesscontrols.

AtthistimeTWikiAccessControlscannotcontrolaccesstofilesinthepubarea,unlesstheyareonlyaccessedthroughtheviewfilescript.Ifyourpubdirectoryissetupinthewebservertoallowopenaccessyoumaywanttoadd.htaccessfilesintheretorestrictaccess.

YoucancreateacustomversionoftheTWikiRegistrationformbydeletingoraddinginputtags.Thename=""parameteroftheinputtagsmuststartwith:

"Twk0..."(ifthisisanoptionalentry),or"Twk1..."(ifthisisarequiredentry).Thisensuresthatthefieldsarecarriedoverintotheuserhomepagecorrectly.

YoucancustomizethedefaultuserhomepageinNewUserTemplate.Thesamevariablesgetexpandedasinthetemplatetopics

ApacheLogin(selectTWiki:

:

Client:

:

ApacheLogininconfigure)

UsingthismethodTWikidoesnotauthenticateusersinternally.InsteaditdependsontheREMOTE_USERenvironmentvariable,whichissetwhenyouenableauthenticationinthewebserver.

TheadvantageofthisschemeisthatifyouhaveanexistingwebsiteauthenticationschemeusingApachemodulessuchasmod_auth_ldapormod_auth_mysqlyoucanjustplugindirectlytothem.

Thedisadvantageisthatbecausetheuseridentityiscachedinthebrowser,youcanlogin,butyoucan'tlogoutagainunlessyourestartthebrowser.

TWikimapstheREMOTE_USERthatwasusedtologintothewebservertoaWikiNameusingthetableinTWikiUsers.Thistableisupdatedwheneverauserregisters,souserscanchoosenottoregister(inwhichcasetheirwebserverloginnameisusedfortheirsignature)orregister(inwhichcasethatloginnameismappedtotheirWikiName).

Thesameprivate.htpasswdfileusedinTWikiTemplateLogincanbeusedtoauthenticateApacheusers,usingtheApacheBasicAuthenticationsupport.

Warning:

DonotusetheApachehtpasswdprogramwith.htpasswdfilesgeneratedbyTWiki!

htpasswdwipesoutemailaddressesthatTWikiplantsintheinfofieldsofthisfile.

EnablingApacheLoginusingmod_auth

YoucanuseanyotherApacheauthenticationmodulethatsetsREMOTE_USER.

1.UseconfiguretoselecttheTWiki:

:

Client:

:

ApacheLoginloginmanager.

2.UseconfiguretosetupTWikitocreatetherightkindof.htpasswdentries.

3.Createa.htaccessfileinthetwiki/bindirectory.

Thereisantemplateforthisfileintwiki/bin/.htaccess.txtthatyoucancopyandchange.Thecommentsinthefileexplainwhatneedtobedone.

Ifyougotitright,thebrowsershouldnowaskforloginnameandpasswordwhenyouclickontheEdit.If.htaccessdoesnothavethedesiredeffect,youmayneedto"AllowOverrideAll"forthedirectoryinhttpd.conf(ifyouhaverootaccess;otherwise,e-mailwebserversupport)

AtthistimeTWikiAccessControlsdonotcontrolaccesstofilesinthepubarea,unlesstheyareonlyaccessedthroughtheviewfilescript.Ifyourpubdirectoryissetuptoallowopenaccessyoumaywanttoadd.htaccessfilesinthereaswelltorestrictaccess

4.YoucancreateacustomversionofTWikiRegistrationbydeletingoraddinginputtags.Thename=""parameteroftheinputtagsmuststartwith:

"Twk0..."(ifthisisanoptionalentry),or"Twk1..."(ifthisisarequiredentry).Thisensuresthatthefieldsarecarriedoverintotheuserhomepagecorrectly.

YoucancustomizethedefaultuserhomepageinNewUserTemplate.Thesamevariablesgetexpandedasinthetemplatetopics

5.RegisteryourselfintheTWikiRegistrationtopic.

Checkthatanewlinewiththeusernameandencryptedpasswordisaddedtothe.htpasswdfile.Ifnot,youmayhavegotapathwrong,orthepermissionsmaynotallowthewebser

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 法律文书 > 调解书

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2