理解Subjects Principals and Credentials

2016-02-19 14:15 2 1 收藏

get新技能是需要付出行动的,即使看得再多也还是要动手试一试。今天图老师小编跟大家分享的是理解Subjects Principals and Credentials,一起来学习了解下吧!

【 tulaoshi.com - 编程语言 】

  摘自:Inside Java 2 Platform Security - 2nd Ed,published by Addison Wesley,2003
  
  8.4.1 Subjects and Principals
  Users often depend on computing services to assist them in performing work. Furthermore, services themselves might subsequently interact with other services.

  JAAS uses the term subject to refer to a system entity, sUCh as a user or a computing service.
  JAAS用术语subject来表示系统实体,比如一个用户或者一个计算服务。

  To identify the subjects with which it interacts, a computing service typically relies on names. However, a subject might not have the same name for each service and, in fact, may even have a different name for each individual service.
  服务通常以来名字来标识那些和它交互的subject.然而一个subject一般不会用同一个名字面向每个服务,实际上,甚至subject会用各不相同的名字面向每个服务。

(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/bianchengyuyan/)

  The term principal represents a name associated with a subject [71]. Because a subject may have multiple names, potentially one for each service with which it interacts, a subject in JAAS comprises a set of principals.
  术语principal表示和一个subject关联的名字。因为一个subject可以有多个名字,以便和不同的服务交互时采用不同的名字,一个subject由一组principal组成。

  Once a subject is authenticated, an instance of javax.security.auth.Subject is created to represent that subject and is populated with objects that implement the java.security.Principal interface.
  一旦subject通过了认证,系统就会生成一个javax.security.auth.Subject的实例来表示该subject,并且加入一些实现java.security.Principal接口的对象到Subject实例中。

  Authentication represents the process by which one system entity verifies the identity of another and must be performed in a secure fashion; otherwise, an intruder may impersonate others to gain Access to a system.
  认证就是一个系统实体验证另一个实体的身份的过程,并且必须在安全的方式下进行;否则入侵者就会伪装成别的实体进入系统。

  Authentication typically involves the subject demonstrating possession of some form of evidence to prove its identity. Such evidence may be information only the subject would be likely to know or have, such as a passWord or smart card, or that only the subject could produce, such as signed data using a private key.
  认证时,通常是一个subject出示其某种证据来证实它的身份。这些证据可以是这个subject知道或者拥有的信息,比如密码或者智能卡。。。

(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/bianchengyuyan/)

  When it attempts to authenticate to a service, a subject typically provides the proof of its identity along with its name. If the authentication attempt succeeds, the service associates a service-specific Principal, using the given name, with the Subject. Applications and services can determine the identity of the Subject simply by referencing the relevant Principal associated with that Subject.
  当它试图通过某个服务的认证时,subject通常随它的名字一起提供它身份的证实。假如认证通过了,服务会将一个特属于该服务的Principal和Subject关联,名字和subject请求认证时的名字相同。应用程序和服务可以通过参考Subject关联的Principal来识别Subject的身份。

  Reliance on named principals usually derives from the fact that a service implements a conventional access control model of security [69]. This model allows a service to define a set of protected resources and the conditions under which named principals may access those resources.
  

来源:http://www.tulaoshi.com/n/20160219/1606536.html

延伸阅读
理解宝宝的哭声 其实宝宝是很听话的,宝宝啼哭都是有原因的,比如说他饿了、不舒服等等,这个需要妈妈们摸索,怎么理解宝宝的哭声呢? 啼哭是婴儿主要的表达方式,但是这也不是唯一的交流方法,因为宝宝已经可以使用简单的肢体语言和面部表情来巧妙地传达感觉和需求。 婴儿的啼哭是一种本能,目的是为了(图老师...
标签: Web开发
$的选择器部分: 凡是运用$,其返回值是一个object $选择器主要用于选择标签.基本用法是同css的选择器.但是,很让人兴奋的是,他支持常见的浏览器,而css中很多选择器是IE6所不支持的. 1.基本选择器(3种): ----凡是运用$,其返回值是一个object $("标签名"),如$("p")是选取了所有的p标签节点 $("#id名"),如$("#test")是选取了id为test的标签节...
在android开发中ListView是比较常用的组件,它以列表的形式展示具体内容,并且能够根据数据的长度自适应显示。抽空把对ListView的使用做了整理,并写了个小例子,如下图。  列表的显示需要三个元素: 1.ListVeiw 用来展示列表的View。 2.适配器 用来把数据映射到ListView上的中介。 3.数据    具...
大胸姑娘总是很受男人青睐的,很多男人对大胸女人情有独钟,那么你们知道胸大有啥不好的吗?胸大的烦恼是什么呢?下面大家就跟着图老师小编一起来看看这些大胸女人的苦恼吧! 虽然几乎所有男生都喜欢大胸女生!!! 但是!这种感觉真的很不爽啊!!!! 就像你们永远不明白大姨妈一样!!! 1、大胸姑娘会招来无数的眼光。首先是...
在子类和父类里面有同名函数的时候,如果生成一个子类的对象,并在子类的对象里面调用这个函数,那么到底会是调用的是谁的函数呢?例如 class Base{ int i=47; int f(){ return g(); } int g(){ return i; } } class Dervied extends Base{ int i=27; int g(){ file://override父类里面的方法 return i; } } public class test { p...

经验教程

207

收藏

69
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部