草庐IT

Principal

全部标签

java - 针对 Active Directory 的 LDAP 身份验证可接受的 SECURITY_PRINCIPAL 格式是什么?

我正在尝试通过LDAP针对ActiveDirectory对用户进行身份验证。以下是我使用的代码片段:privateDirContextbindAsUser(StringbindPrincipal,Stringpassword){Hashtableenv=newHashtable();env.put(Context.SECURITY_AUTHENTICATION,"simple");env.put(Context.SECURITY_PRINCIPAL,bindPrincipal);env.put(Context.PROVIDER_URL,bindUrl);env.put(Context.

java - org.hibernate.InstantiationException : No default constructor for entity: : principal. 客户端

我遇到了这个错误:Exceptioninthread"main"org.hibernate.InstantiationException:Nodefaultconstructorforentity::principal.Clienteatorg.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:120)atorg.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:136)atorg.hibernate.tuple.ent

java - org.hibernate.InstantiationException : No default constructor for entity: : principal. 客户端

我遇到了这个错误:Exceptioninthread"main"org.hibernate.InstantiationException:Nodefaultconstructorforentity::principal.Clienteatorg.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:120)atorg.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:136)atorg.hibernate.tuple.ent

spring - UserDetails getPassword 在 Spring Security 3.1 中返回 null。如何获取当前登录用户的密码?

我已经使用springsecurity实现了更改密码功能,但是((UserDetails)principal).getPassword())为登录用户返回null。如果我没记错的话,这曾经在3.0.这在3.1中是否已更改,因此无法检索登录用户的当前密码?在下面的代码中,我正在检查从网页输入的用户密码中的当前密码。然后我正在检查登录用户的密码是否与输入的密码匹配。如果是这样,那么我想设置oldPasswordMatchNewPassword=true。如何实现此功能?@RequestMapping(value="/account/changePassword.do",method=Req

spring - UserDetails getPassword 在 Spring Security 3.1 中返回 null。如何获取当前登录用户的密码?

我已经使用springsecurity实现了更改密码功能,但是((UserDetails)principal).getPassword())为登录用户返回null。如果我没记错的话,这曾经在3.0.这在3.1中是否已更改,因此无法检索登录用户的当前密码?在下面的代码中,我正在检查从网页输入的用户密码中的当前密码。然后我正在检查登录用户的密码是否与输入的密码匹配。如果是这样,那么我想设置oldPasswordMatchNewPassword=true。如何实现此功能?@RequestMapping(value="/account/changePassword.do",method=Req

java - Spring Security 中的 "principal"是什么?

我对Spring和SpringSecurity非常陌生。我正在阅读有关SpringSecurity的内容,它提出了principal的概念,它应该是当前登录的用户。但是,如果我们有多个当前登录用户怎么办?那么,我的问题是,那么SpringSecurity的主体到底是什么?例如,我已经阅读了本教程:http://www.mkyong.com/spring-security/get-current-logged-in-username-in-spring-security/他们似乎考虑到当前只有一个登录用户,但这种情况并不常见。如何检索特定用户?以及如何区分正在执行请求的用户?

java - Spring Security 中的 "principal"是什么?

我对Spring和SpringSecurity非常陌生。我正在阅读有关SpringSecurity的内容,它提出了principal的概念,它应该是当前登录的用户。但是,如果我们有多个当前登录用户怎么办?那么,我的问题是,那么SpringSecurity的主体到底是什么?例如,我已经阅读了本教程:http://www.mkyong.com/spring-security/get-current-logged-in-username-in-spring-security/他们似乎考虑到当前只有一个登录用户,但这种情况并不常见。如何检索特定用户?以及如何区分正在执行请求的用户?

hadoop - 使用 --proxy-user、--keytab 和 --principal 参数在 hadoop kerberos 中提交 spark-submit

只是想得到澄清,如果spark-submit--keytab--principal&&--proxy-user参数可以共存吗?我们要求以真实的业务用户身份提交作业,但该用户在hadoopkdc中没有主体。每当同时使用proxy-user和kerberosprincipal时,我都会遇到异常。17/02/0913:51:43INFODFSClient:CreatedHDFS_DELEGATION_TOKENtoken379foratlason10.12.118.92:8020Exceptioninthread"main"java.io.IOException:java.lang.refl

authentication - 从 Spark 访问 Hdfs 会出现 token 缓存错误 Can't get Master Kerberos principal for use as renewer

我正在尝试运行测试Spark脚本以将Spark连接到hadoop。脚本如下frompysparkimportSparkContextsc=SparkContext("local","SimpleApp")file=sc.textFile("hdfs://hadoop_node.place:9000/errs.txt")errors=file.filter(lambdaline:"ERROR"inline)errors.count()当我用pyspark运行它时,我得到了py4j.protocol.Py4JJavaError:Anerroroccurredwhilecallingo21.

python - Flask Principal 粒度资源按需

我一直在看这篇文章:http://pythonhosted.org/Flask-Principal/#granular-resource-protection现在虽然它当前的工作方式没有任何问题,但我看不出它非常有用,因为在登录时所有帖子都被读取并且EditBlogPostNeed被添加到标识中。想象一下,如果我写的帖子数量超过了正常数量,从长远来看,这将不是一个很好的策略,因为我想在访问View时查看帖子/posts/.有没有办法使用FlaskPrincipal对View的每个请求执行此检查??我当然可以通过惰性关系查询和过滤器轻松绕过它,但我想使用FlaskPrincipal.