我的公司正在开发一个使用MobileFirst v6.3开发的应用程序。我正在考虑创建一个服务器配置,允许服务器绕过我们的标准安全测试。
这是我想要在worklight.properties文件中创建的条目类型:
#############
# Worklight Security Test
#############
mt.adapter.security=custom-security-test
这就是我试图在适配器的过程中放置值的方式:
<procedure name="getTechUserAdapter" securityTest="${mt.adapter.security}"/>
当我构建和部署它时,我会得到以下错误:
<error mbeanName="com.worklight.common.server.jmx.api:qualifier=worklight,type=ProjectManagement" node="worklight///10.16.109.75" date="2016-06-02T19:58:02.889Z" phase="PREPARE" code="FAILURE" details="Procedure 'getTechUserAdapter' in adapter 'TechUserServiceAdapter' requires security test '${mt.adapter.security}' which is not defined in authenticationConfig.xml.">
Worklight正在尝试将安全测试转换为字符串,而不是放置在Worklight.properties文件中的值。有人知道如何使用变量值吗?
安全测试定义不支持像您尝试做的那样的自定义属性…它查看authenticationConfig.xml文件。
相反,在构建适配器之前,您可能需要保留多个配置并在它们之间进行交换。