Authentication vs. Authorization 验证与授权[整理]
Authentication vs. Authorization 驗(yàn)證與授權(quán)
Authentication vs. Authorization 驗(yàn)證與授權(quán) It is important to clarify the difference between authentication and authorization, and how these terms are used within this paper. The differences are fairly obvious, but understanding the implications of each is important.首先我們必須要分清驗(yàn)證與授權(quán)之間的區(qū)別,這樣才能使我們更好的理解他們?cè)诒疚臋n(Passport Guide)中所代表的含義。顧名思義,看上去他們的區(qū)別很明顯,但是對(duì)于我們來(lái)說(shuō),重要的是理解他們之間的關(guān)聯(lián)關(guān)系。
P.S.:從字面上看,兩者中文的區(qū)別一目了然,但是在英文中這兩個(gè)單詞是非常容易混淆的
au·then·ti·ca·tion [aw thènt káysh'n] noun:
The verification of credentials presented by an individual or process in order to determine identity.
驗(yàn)證:通常當(dāng)我們要識(shí)別某個(gè)個(gè)體或者某段進(jìn)程(請(qǐng)求)的身份時(shí),都要對(duì)他們所提供的身份信息進(jìn)行鑒定,這個(gè)鑒定過(guò)程我們稱(chēng)之為驗(yàn)證
au·thor·i·za·tion [àwthr záysh'n ] noun:
To grant an individual permission to do something or be somewhere.
授權(quán):系統(tǒng)賦予某個(gè)個(gè)體在一定范圍內(nèi)從事某些行動(dòng)的權(quán)利,這個(gè)過(guò)程我們稱(chēng)之為授權(quán)
Authentication is the process of recognizing who an individual is by verifying credentials.? Authorization is the act of deciding what that individual has access to. When someone asks for your driver's license, for example, it is a form of authentication. Your driver's license provides a way for you to identify yourself to others in order to assist in many transactions.
驗(yàn)證是通過(guò)檢查身份信息來(lái)確定某個(gè)個(gè)體的過(guò)程,驗(yàn)證是決定某個(gè)個(gè)體行為規(guī)范的行為。簡(jiǎn)單來(lái)說(shuō),驗(yàn)證是確定你是誰(shuí)?授權(quán)則是允許你做什么。舉例來(lái)說(shuō),有些時(shí)候你需要出示駕照來(lái)說(shuō)明你的身份,這就是一種驗(yàn)證的表現(xiàn)形式。而在很多時(shí)候,你的駕照做為一種證明你身份的手段來(lái)使你通過(guò)驗(yàn)證以及獲得各種授權(quán)
Your driver's license alone does not determine whether you can legally engage in any age restricted activities (voting, for example).? It only verifies the relevant credentials, such as date of birth, so that permission can be given for an activity.
但是你的駕照并不能幫你通過(guò)一些類(lèi)似于需要年齡限制的驗(yàn)證(比如投票)。這些驗(yàn)證需要你出示與其相關(guān)的身份證明,如您的出生日期,這樣你才可以獲得相應(yīng)的準(zhǔn)許(授權(quán))
P.S.:我想,這段文字說(shuō)明的即使是同一用戶(hù),選擇的功能不同,那么他需要的驗(yàn)證信息也是不同的。比如現(xiàn)在大多WEB站點(diǎn)需要password和financePassword(二級(jí)財(cái)務(wù)密碼),一個(gè)做為用戶(hù)登陸身份驗(yàn)證,另一個(gè)pass做為用戶(hù)進(jìn)行財(cái)務(wù)操作時(shí)候的驗(yàn)證使用
It is possible to authenticate someone without any authorization, but it is difficult to imagine authorizing someone for some purpose without also requiring that they go through some form of authentication.
也許您會(huì)驗(yàn)證某個(gè)用戶(hù)之后卻并未給起任何授權(quán),但是我們不提倡未經(jīng)任何形式的驗(yàn)證就給予某些用戶(hù)的某種形式的授權(quán)
P.S.:比較繞嘴,驗(yàn)證未必授權(quán),授權(quán)必需驗(yàn)證^_^
Passport is focused on authentication.? This is important, as it means that you remain in control of authorizing your own services.? One of the benefits of Passport is that it offloads the need for you to run an authentication system, resetting passwords and other related tasks, while still leaving you control over who can use your site.
Passport只是做為一個(gè)通用化的驗(yàn)證平臺(tái),明確這一點(diǎn)很重要,每個(gè)Passport的Relying Party必須根據(jù)自己的業(yè)務(wù)需求來(lái)對(duì)通過(guò)驗(yàn)證的ACCOUNT進(jìn)行授權(quán)。幫您建立和維護(hù)用戶(hù)驗(yàn)證系統(tǒng),用戶(hù)不必再為多個(gè)網(wǎng)站必須牢記多個(gè)帳號(hào)/密碼而煩惱,Passport為您想到做到….just so so
任何一個(gè)計(jì)算機(jī)系統(tǒng)都應(yīng)該有權(quán)限模塊,把權(quán)限剝分成驗(yàn)證和授權(quán),這的確是讓人思路清晰的解決方法,當(dāng)然Passport已經(jīng)做到了,感謝MicroSoft的文檔,這對(duì)我的確很有幫助。對(duì)于微軟的天才兒童們,除了感嘆……所有的開(kāi)發(fā)人員聯(lián)合起來(lái),為干掉微軟而努力吧!
?
關(guān)于身份驗(yàn)證和授權(quán)的區(qū)別
微軟資料上記載;身份驗(yàn)證是在連接嘗試過(guò)程中,對(duì)憑據(jù)的驗(yàn)證,該登陸過(guò)程包括網(wǎng)絡(luò)訪問(wèn)客戶(hù)端通過(guò)身份驗(yàn)證協(xié)議,以純文本或加密方式向服務(wù)器發(fā)送憑據(jù),而授權(quán)是對(duì)接受連接嘗試的確認(rèn)在經(jīng)過(guò)身份驗(yàn)證之后將基于帳戶(hù)憑據(jù)和遠(yuǎn)程訪問(wèn)策略決定接受還是拒絕該連接,只有在登陸嘗試成功以后才能進(jìn)行授權(quán),如果登陸失敗拒絕用戶(hù)訪問(wèn)。下面是我的理解:
當(dāng)你出國(guó)是你必須具有兩樣?xùn)|西。護(hù)照和簽證,護(hù)照就想身份驗(yàn)證,他只能證明你的身份,而不能作別的,而簽證就想授權(quán),簽證表明,你可以在這個(gè)國(guó)家,干什么,這就想授權(quán)一樣。?
?
===
本文轉(zhuǎn)自:http://www.cnblogs.com/binglingshui/archive/2009/01/04/1368575.html
總結(jié)
以上是生活随笔為你收集整理的Authentication vs. Authorization 验证与授权[整理]的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: AspectF写法
- 下一篇: 我的编码规范(慢慢补充)