【问题标题】:wsadmin application install leaves out Security role to user/group mappingwsadmin 应用程序安装遗漏了安全角色到用户/组的映射
【发布时间】:2013-07-02 12:18:59
【问题描述】:

我在从wsadmin 命令行安装我的应用程序的 .ear 文件时遇到了一个问题,使用以下命令(见下文)——我按原样从 Websphere 的“查看最后操作的管理脚本命令”中复制了该文件,在我尝试从控制台手动执行此操作之后。问题是在部署完成后我转到应用程序,我没有在详细属性下看到“安全角色到用户/组映射”链接,但是当我从控制台安装应用程序同时我接受所有时,我确实看到了这一点使用快速路径方法的默认值。 PS:我在 Windows 2008 R2 64 位机器上使用 Websphere 7.0.0.23。另外,如果我省略了AdminApp.install() 命令中的所有选项而只使用AdminApp.install('C:\pathToMyEar'),我会看到安全映射链接,但是我至少需要传递应用程序的名称,否则名称最终会是随机的字符串。

AdminApp.install('C:/fakepath/myApplication.ear', '[ -nopreCompileJSPs -distributeApp -nouseMetaDataFromBinary -nodeployejb -appname myApplicationRestEAR -createMBeansForResources -noreloadEnabled -nodeployws -validateinstall warn -noprocessEmbeddedConfig -filepermission ..dll=755#..so=755#..a=755#..sl=755 -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -asyncRequestDispatchType 禁用 -nouseAutoLink -MapModulesToServers [[ myApplicationRest myApplicationRest.war,WEB-INF/web.xml WebSphere:cell=TestNode01Cell,node=TestNode01,server=server1]] -MapRolesToUsers [[ security AppDeploymentOption.No AppDeploymentOption.Yes "" "" AppDeploymentOption.No "" "" ]]]')

非常感谢, 切坦

【问题讨论】:

  • 在文档和 armstrhb 答案中只有 5 个 MapRolesToUsers 参数(见下文)。为什么MapRolesToUsers 有 8 个参数?这些参数有什么作用?

标签: scripting jython websphere-7 wsadmin


【解决方案1】:

在 -MapRolesToUsers 块的末尾似乎有一些额外的参数。我不确定那些是否正在抛弃 wsadmin。这是关于 MapRolesToUsers (source) 的 IBM 文档:

AdminApp.install('myapp.ear', '[-MapRolesToUsers [["All Role" No Yes "" ""]["Every Role" Yes No "" ""] [DenyAllRole No No user1 group1]]]')

where {{"All Role" No Yes "" ""} corresponds to the following:

"All Role"  Represents the role name
No          Indicates to allow access to everyone (yes/no)
Yes         Indicates to allow access to all authenticated users (yes/no)
""          Indicates the mapped users
""          Indicates the mapped groups 

尝试将 MapRolesToUsers 块更改为:

 -MapRolesToUsers [[ security AppDeploymentOption.No AppDeploymentOption.Yes "" "" ]]

【讨论】:

  • 谢谢,我也试过了,结果相同,但是有一个问题:重新启动 WAS 纠正了这个问题,之后我可以立即看到“安全角色用户/组映射”链接重新启动,无论我使用我的方式还是你的语法。
  • 确保你不要忘记 $AdminConfig save 如果这样检查也可能会超时:C:\IBM\WebSphere\AppServer\profiles\MyAppSrv123\properties\soap.client.props 这里是我的群组示例 $AdminApp view myAPP123 {-MapRolesToUsers} $AdminApp edit myAPP123 {-MapRolesToUsers { {"MyAdmins" No no "" "AdminG|WAS AdminG"}} }
  • 在我的例子中,语法是 AdminApp.edit('MY_WAR', ['-MapRolesToUsers', [['Administrators','No','Yes','wsadmin','']] ])AdminConfig.save()
猜你喜欢
  • 1970-01-01
  • 2015-04-12
  • 2017-11-29
  • 1970-01-01
  • 1970-01-01
  • 2011-05-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多