worklight ant 任务 app-deployer - 当 WL 控制台安全处于活动状态时出现未经授权的错误 [英] worklight ant task app-deployer - Unauthorized error when WL console security is active

查看:21
本文介绍了worklight ant 任务 app-deployer - 当 WL 控制台安全处于活动状态时出现未经授权的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用提供的 ant 任务 app-deployer 将应用程序部署到 WL Server v5.0.5.

I'm trying to deploy an application to a WL Server v5.0.5 using the provided ant task app-deployer.

这里是我使用的简单构建文件:

Here the simple buildfile I use:

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="deployWL">
   <target name="deploy_application">
      <taskdef resource="com/worklight/ant/defaults.properties">
         <classpath>
            <pathelement location="C:/Worklight50/WorklightServer/worklight-ant.jar"/>
         </classpath>
      </taskdef>
      <app-deployer worklightServerHost="http://localhost:9087/worklight" deployable="C:/temp/UnisTestAdapters-common.wlapp"/>
   </target>
</project>

使用记录的WAS 安全选项 1 程序"(即修改 worklight.war 中的 web.xml)保护了对 WL Server 控制台的访问.

Access to the WL Server console has been protected using the documented "WAS security option 1 procedure" (ie, modified web.xml in worklight.war).

当我运行 ant 进程时,我收到以下错误:

When I run the ant process I receive the following error:

C:\temp>C:\apache-ant-1.8.4-bin\bin\ant -buildfile test.xml deploy_application
Buildfile: C:\temp\test.xml
deploy_application:
[app-deployer] Feb 18, 2013 1:39:23 PM com.worklight.ant.deployers.AbstractDeployerTask logDeployResponse
[app-deployer] SEVERE: Unauthorized;
BUILD SUCCESSFUL
Total time: 1 second

如果我在 WL 控制台不受保护的情况下运行相同的 ant 脚本,则一切正常.

If I run the same ant script with WL console unprotected, everything works fine.

是否可以在安全的 WL Server 场景中使用 ant 脚本?

Is it possible to use the ant scripts in a secured WL Server scenario ?

如何在应用部署期间传播有效凭据?

How can I propagate valid credential during apps deployment ?

推荐答案

在当前版本的 IBM Worklight 中没有办法做到这一点(它在 backlog 中).您可以手动部署应用程序或适配器,也可以在使用 ANT 部署应用程序或适配器时取消保护.

There is no way to do it in the current version of IBM Worklight (it is in the backlog). You can deploy an application or adapter manually or you can remove the protection when deploying an application or adapter with ANT.

这篇关于worklight ant 任务 app-deployer - 当 WL 控制台安全处于活动状态时出现未经授权的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆