我正在使用WSO2 Identity Server进行单点登录实现.
在我的演示应用程序中,我试图从我自己的JDBC数据库中获取经过身份验证的用户的自定义声明属性.
我关注了Pushpalanka的这个博客.
这适用于Identity Server 5.0.0
但是当我使用最新更新"WSO2-IS-5.0.0-SP01"更新Identity Server时,自定义声明处理已停止工作.
以下是错误堆栈:
[2015-04-22 19:09:43,411] ERROR {org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler} - 声明处理失败!org.wso2.carbon.identity.application.authentication.framework.exception.FrameworkException:索引:0,大小:0,位于com.wso2的com.wso2.sample.claim.handler.CustomClaimHandler.handleLocalClaims(CustomClaimHandler.java:200) .sample.claim.handler.CustomClaimHandler.handleClaimMappings(CustomClaimHandler.java:66)在org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler.handleClaimMappings(DefaultStepBasedSequenceHandler.java:604)在有机.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler.handlePostAuthentication(DefaultStepBasedSequenceHandler.java:394)在org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl. DefaultStepBasedSequenceHandler.handle(DefaultStepBasedSequenceHandler.java:134)at org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultAuthenticationRequestHandler.handle(DefaultAuthenticationReques)tHandler.java:121)在org.wso2.carbon.identity.application.authentication的org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator.handle(DefaultRequestCoordinator.java:94). framework.servlet.CommonAuthenticationServlet.doPost(CommonAuthenticationServlet.java:54)在javax.servlet.http.HttpServlet.service(HttpServlet.java:755)在javax.servlet.http.HttpServlet.service(HttpServlet.java:848)在组织位于org.eclipse.equinox.http的org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)的.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)位于org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)的.avlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128),位于javax.servlet.http.HttpServlet.service(HttpServlet) .java:848)org.apac的org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)he.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)位于org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter的org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210).的doFilter(CharacterSetFilter.java:61)在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)在org.apache .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)在org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java :472)org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)at org.wso2.carbon.tomcat. org.ws上的ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)在org.wso2.carbon.tomcat的org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)上的o2.carbon.tomcat.ext.valves.CarbonTomcatValve $ 1.invoke(CarbonTomcatValve.java:47)位于org.wso2.carbon.tomcat.ext.valves的org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)的.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) .CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java) :52)org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)org.apache.coyote.http11. AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProt)ocol.java:589)在java.util的java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)的org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.run(NioEndpoint.java:1653) .concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615)at java.lang.Thread.run(Thread.java:745)引起:java.lang.IndexOutOfBoundsException:索引:0,大小:0,java.util位于org.wso2.carbon.claim.mgt.ClaimManagerHandler.validateClaims(ClaimManagerHandler.java:668)的java.util.ArrayList.get(ArrayList.java:411)中的.ArrayList.rangeCheck(ArrayList.java:635). wso2.carbon.claim.mgt.ClaimManagerHandler.getMappingsFromOtherDialectToCarbon(ClaimManagerHandler.java:529)在org.wso2.carbon.claim.mgt.ClaimManagerHandler.getMappingsMapFromOtherDialectToCarbon(ClaimManagerHandler.java:614)在com.wso2.sample.claim.handler. CustomClaimHandler.handleLocalClaims(CustomClaimHandler.java:141).
根据我对Identity Server源代码的研究,这个问题出现在org.wso2.identity.application.authentication.framewotk组件的 Authentication Framework中.
问题可能在于验证声明,但我没有在源代码中找到任何名为validateClaims的方法.
在博客文章中给出的源代码中,使用了Authentication Framework版本 - 4.2.2.
我尝试使用最新版本的Authentication Framework - 4.2.3.
但问题仍然存在于同一个组件中.
我仍然在努力.我需要一些指导.
如果我遗失了某些事情,或者你们中的任何人遇到同样的问题,请有人帮忙.
谢谢.
我正在使用wso2is服务器从这篇文章https://github.com/angel-git/wso2is-springoauth做的Spring Boot Security示例,当我尝试使用访问令牌访问资源时我得到了
{"error":"unauthorized","error_description":"访问此资源需要完全身份验证"}
我通过以下方式生成访问令牌:
curl -u CLIENT_ID:CLIENT_SECRET -k -d"grant_type = password&username = admin&password = admin"-H"Content-Type:application/x-www-form-urlencoded" https:// localhost:9443/oauth2/token
和访问资源:
curl -H GET"授权:ACCESS_TOKEN" http:// localhost:8080/greeting
我在stackoverflow上找到了很多解决方案,但遗憾的是无法解决我的问题
请帮忙,谢谢
我正在开发一个Web应用程序来公开由OAuth 2.0保护的许多RESTful服务.这是计划的架构:
1- OAuth授权提供商: WSO2身份服务器(IS)
2- OAuth资源服务器:使用以下技术的Java Web应用程序:
我已经看到了几个关于如何使用WSO2 IS作为授权服务器+ WSO2 ESB作为资源服务器来保护RESTful服务的示例(ex1,ex2,ex3等等).这不是我需要的.
遗憾的是,授权服务器和资源服务器之间的交互超出了OAuth2 RFC的范围.所以,我找不到它应该是什么样子.
这是我的问题:
谢谢
我想明白之间的差别grant_type=client_credentials
,并grant_type=password
在Authentication
或OAuth2 Flow
概念.我关注以下网站:
我相信grant_type=password
在not secure
这样只要使用gran_type
的JavaScript开发.但我还是有些人可以帮助理解这个概念.
我还观察到,grant_type=client_credentials
不提供" refresh_token
",它只是提供了access_token
其中的grant_type=password
同时提供了access_token
和refresh_token
.
希望得到详细的解释.我正在使用WSO2 API Manager
OAuth2进行应用程序开发
我正在尝试使用WSO IS 5.1.0配置会话超时.
我有一个服务提供商,其会话时间为10分钟.
我已经配置了SSO sesison timeot在WSO210分钟使用枭雄控制台上的居民身份提供部分.
我不知道为什么,但全局配置(<IS_HOME>/repository/conf/identity/identity.xml file under the <TimeConfig> element
)不起作用.
在本地会话超时后,用户被重定向到SSO登录页面,因此似乎全局会话无效.但是,如果您在浏览器中再次键入应用程序URL,则会将用户重定向到登录页面,自动重新进行身份验证,并重定向到上次访问的页面.为什么第一次用户进入SSO登录页面,之后 - 不是?预期的行为是在全局会话到期后不应重新验证用户.
因此,场景是:
- 用户进入服务提供商的主页并被重定向到SSO登录页面
- 用户登录SSO登录页面
- 经过一段时间SSO会话到期;
- 服务提供商的会话也会过期 - 用户进入某个服务提供商的页面并被重定向到SSO登录页面(此时似乎以某种方式重新创建了SSO会话)
- 用户再次尝试转到服务提供商的页面,他神奇地reathenticated(因为会话被重新创建).
如果你至少评论这个流程我会很感激,我现在肯定我是否理解它是如何工作的
我正在尝试WSO2身份服务器.
我下载了5.4.0版本,并在我的Windows机器上启动了服务器wso2server.bat --run
.
如果我尝试使用默认凭据(admin/admin)登录控制台,则会收到错误403 - Forbidden,并且控制台显示以下消息:
WARN {org.owasp.csrfguard.log.JavaLogger} - potential cross-site request forgery (CSRF) attack thwarted (user:<anonymous>, ip:0:0:0:0:0:0:0:1, method:POST, uri:/carbon/admin/login_action.jsp, error:required token is missing from the request)
在我试用控制台之前还有其他需要配置的东西吗?
我正在研究各种类型的访问控制模型,并且知道abac和rbac是受欢迎的模型.
对于我的一个项目,我有一个基本的场景,我无法理解我应该选择RBAC
还是ABAC
.显然RBAC
是ABAC
我应该去的子集,ABAC
但是ABAC需要一些经验才能在xacml中编写策略.我们正在使用WSO
IS和APIM.
我的身份服务器(IS)中有管理员,所有者和成员角色.
在某个时刻,我使用HTTP
动词来实现愿望结果,即所有者无法访问DELETE
请求,成员无法访问PUT
&DELETE
.
问题
我有一个仪表板,我在其中显示不同的部分,如最高用户,计费,服务,顶级消费者等.
nav-bar
根据服务器的用户角色和属性进行填充,例如,成员不应该有权访问其他用户(添加,列表)nav-bar
.nav-bar
项目依赖于用户角色,以便我们可以通过RBAC
?题
我们可以实现所有这些场景,RBAC
但是为了管理nav-bar
和查看相关的实现,我们需要在服务器中添加业务逻辑而不是使用WSO2-IS
和WSO2-APIM
.有没有办法管理隐藏/显示按钮和部分等视图权限,甚至消费相同,API
但它应该为不同的api消费者返回不同的结果.
我正在设计一个需要身份管理功能的新应用程序(即管理用户帐户和角色).我想将该功能委托给Identity Server.
我确实找到了WSO2 AuthenticationAdmin wsdl https://localhost:9443/services/AuthenticationAdmin?wsdl
但没有用户帐户管理功能.
我正在家中构建一个自托管的Web服务器,以便更好地控制我的数据.这最终将用作小型创业公司的开发服务器的模板.我们的想法是让Nextcloud用于数据大容量存储,GitLab用于版本控制和团队协作,最后是Wordpress用于网站.我正在研究可能的SSO配置,以便朋友/家人/同事不需要登录每个应用程序.这将由SAML或OpenID完成.
从我所看到的,我可以有两种不同的配置;
我一直在关注Gluu和WSO2作为第二种选择,但它们似乎只适用于企业.
我应该只使用GitLab或Wordpress作为ID提供商吗?或者只是拥有另一个用于此功能的软件,社区会推荐哪种软件?
我正在尝试将 Apache Directory Studio 设置为 wso2is 5.10.0 中的外部 ldap(主用户存储),并在 deployment.toml 文件中进行以下配置
[super_admin]
username = "admin"
password = "admin"
#admin_role = "admin"
create_admin_account = true
[user_store]
type = "read_write_ldap_unique_id"
user_entry_object_class = "inetOrgPerson"
connection_url = "ldap://localhost:10390"
connection_name = "uid=admin,ou=system"
connection_password = "secret"
#scim_enabled = "false"
user_id_attribute = "uid"
user_search_base = "ou=users,ou=system"
base_dn = "ou=system"
Run Code Online (Sandbox Code Playgroud)
当我启动 wso2 时,ldap 连接成功建立
INFO {org.wso2.carbon.user.core.ldap.UniqueIDReadWriteLDAPUserStoreManager} - LDAP connection created successfully in read-write mode
Run Code Online (Sandbox Code Playgroud)
但我在它之前的日志中收到以下错误
ERROR {org.wso2.carbon.user.core.ldap.UniqueIDReadWriteLDAPUserStoreManager} - There is no user with the user name: a9fbdaba-ef0a-422c-a3c7-150d8e62bc44,admin to …
Run Code Online (Sandbox Code Playgroud)