首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Worklight:受保护的资源意外地自动变为不受保护的

问Worklight:受保护的资源意外地自动变为不受保护的
EN

Stack Overflow用户
提问于 2013-06-08 06:34:42
回答 1查看 206关注 0票数 0

我已经保护了我的一些资源,如工作指南,以保护静态网址,控制台等。

console.html

我为它定义的领域是按照Custom_Authenticator_and_Login_Module.pdf指南完成的。

我有以下配置设置:

代码语言:javascript
复制
<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

代码语言:javascript
复制
<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>

任何其他建议都受到高度欢迎。

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-06-08 12:29:23

您可以在customSecurityTest中进行的安全测试是为了保护移动环境,而不是为了保护工作灯控制台。从您的securityTest名称看,它听起来就像您正在将其应用于移动环境.

  1. 你的authenticationConfig.xml看起来怎么样?
  2. 使用预定义的Worklight控制台安全测试有什么问题?(还可以将其扩展为使用LDAP。)。
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16996798

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档