Authentication vs. Authorization 驗證與授權[整理]

Authentication vs. Authorization 驗證與授權

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.

首先我們必須要分清驗證與授權之間的區別,這樣才能使我們更好的理解他們在本文檔(Passport Guide)中所代表的含義。顧名思義,看上去他們的區別很明顯,但是對於我們來說,重要的是理解他們之間的關聯關係。

P.S.:從字面上看,兩者中文的區別一目瞭然,但是在英文中這兩個單詞是非常容易混淆的

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.

驗證:通常當我們要識別某個個體或者某段進程(請求)的身份時,都要對他們所提供的身份信息進行鑑定,這個鑑定過程我們稱之爲驗證

au·thor·i·za·tion [àwthr záysh'n ] noun:
To grant an individual permission to do something or be somewhere.

授權:系統賦予某個個體在一定範圍內從事某些行動的權利,這個過程我們稱之爲授權

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.

驗證是通過檢查身份信息來確定某個個體的過程,驗證是決定某個個體行爲規範的行爲。簡單來說,驗證是確定你是誰?授權則是允許你做什麼。舉例來說,有些時候你需要出示駕照來說明你的身份,這就是一種驗證的表現形式。而在很多時候,你的駕照做爲一種證明你身份的手段來使你通過驗證以及獲得各種授權

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.

但是你的駕照並不能幫你通過一些類似於需要年齡限制的驗證(比如投票)。這些驗證需要你出示與其相關的身份證明,如您的出生日期,這樣你纔可以獲得相應的准許(授權)

P.S.:我想,這段文字說明的即使是同一用戶,選擇的功能不同,那麼他需要的驗證信息也是不同的。比如現在大多WEB站點需要passwordfinancePassword(二級財務密碼),一個做爲用戶登陸身份驗證,另一個pass做爲用戶進行財務操作時候的驗證使用

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.

也許您會驗證某個用戶之後卻並未給起任何授權,但是我們不提倡未經任何形式的驗證就給予某些用戶的某種形式的授權

P.S.:比較繞嘴,驗證未必授權,授權必需驗證^_^

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只是做爲一個通用化的驗證平臺,明確這一點很重要,每個PassportRelying Party必須根據自己的業務需求來對通過驗證的ACCOUNT進行授權。幫您建立和維護用戶驗證系統,用戶不必再爲多個網站必須牢記多個帳號/密碼而煩惱,Passport爲您想到做到….just so so

任何一個計算機系統都應該有權限模塊,把權限剝分成驗證和授權,這的確是讓人思路清晰的解決方法,當然Passport已經做到了,感謝MicroSoft的文檔,這對我的確很有幫助。對於微軟的天才兒童們,除了感嘆……所有的開發人員聯合起來,爲幹掉微軟而努力吧!

 

關於身份驗證和授權的區別

微軟資料上記載;身份驗證是在連接嘗試過程中,對憑據的驗證,該登陸過程包括網絡訪問客戶端通過身份驗證協議,以純文本或加密方式向服務器發送憑據,而授權是對接受連接嘗試的確認在經過身份驗證之後將基於帳戶憑據和遠程訪問策略決定接受還是拒絕該連接,只有在登陸嘗試成功以後才能進行授權,如果登陸失敗拒絕用戶訪問。
下面是我的理解:

當你出國是你必須具有兩樣東西。護照和簽證,護照就想身份驗證,他只能證明你的身份,而不能作別的,而簽證就想授權,簽證表明,你可以在這個國家,幹什麼,這就想授權一樣。 

 

===

本文轉自:http://www.cnblogs.com/binglingshui/archive/2009/01/04/1368575.html

發佈了15 篇原創文章 · 獲贊 3 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章