我已经保护了我的一些资源,如工作指南,以保护静态网址,控制台等。
我为它定义的领域是按照Custom_Authenticator_and_Login_Module.pdf指南完成的。
我有以下配置设置:
<staticResources>
<resource id="worklightConsole" securityTest="PushApplication-custom-securityTest">
<urlPatterns>/console*</urlPatterns>
<urlPatterns>/apps/services/preview*</urlPatterns>
</resource>
</staticResources>当我应用那个时候两个URL都被保护时,当我再次检查它的两天之后,这次只有一个受到保护(预览是受保护的)。
请建议,这是已知的问题在WL v5.0.5?因为目前我正在使用这个。
对于这个安全缺陷,我有一个解决办法,就是实现Java安全过滤器--作为所有请求的看门人。
我的authenticationConfig.xml
<securityTests>
<mobileSecurityTest name="myMobileSecurity">
<testUser realm="myAppRealm"/>
<testDeviceId provisioningType="none"/>
</mobileSecurityTest>
<customSecurityTest name="PushApplication-custom-securityTest">
<test isInternalUserID="true" realm="PushAppRealm"/>
</customSecurityTest>
<customSecurityTest name="myAppSecurityTestCustom">
<test isInternalUserID="true" realm="myAppRealm"/>
</customSecurityTest>
</securityTests>
<realms>
<realm loginModule="Strongmy" name="myAppRealm">
<className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
<parameter name="login-page" value="login.html"/>
</realm>
<realm loginModule="PushAppLoginModule" name="PushAppRealm">
<className>com.worklight.core.auth.ext.BasicAuthenticator</className>
<parameter name="basic-realm-name" value="PushAppRealm"/>
</realm>
<realm loginModule="requireLogin" name="WorklightConsole">
<className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
<onLoginUrl>/console</onLoginUrl>
</realm>
</realms>
<loginModules>
<loginModule name="PushAppLoginModule">
<className>com.my.services.myAuthModule</className>
</loginModule>
<loginModule name="Strongmy">
<className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
</loginModule>
<loginModule name="requireLogin">
<className>com.worklight.core.auth.ext.SingleIdentityLoginModule</className>
</loginModule>
</loginModules>任何其他建议都受到高度欢迎。
谢谢
发布于 2013-06-08 12:29:23
您可以在customSecurityTest中进行的安全测试是为了保护移动环境,而不是为了保护工作灯控制台。从您的securityTest名称看,它听起来就像您正在将其应用于移动环境.
https://stackoverflow.com/questions/16996798
复制相似问题