1

I am facing an issue while installing my application's .ear file from the wsadmin command line, using the below command (see below) -- which I copied as is from the Websphere's "View administrative scripting command for last action" , after I tried to do this manually from the console. The issue is after deployment completes and I go to the application , I don't see the "Security role to user/group mapping" link under Detailed Properties , but I do see this when I install the app from the console whilst I accept all default values using the Fast Path approach . PS : I am using Websphere 7.0.0.23 on a Windows 2008 R2 64 bit machine. Also, if I leave out all the options in the AdminApp.install() command and just use AdminApp.install('C:\pathToMyEar') I see the Security mapping link , but then I need to at the least pass the application's name , without which the name ends up being some random string.

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 DISABLED -nouseAutoLink -MapModulesToServers [[ myApplicationRest myApplicationRest.war,WEB-INF/web.xml WebSphere:cell=TestNode01Cell,node=TestNode01,server=server1 ]] -MapRolesToUsers [[ security AppDeploymentOption.No AppDeploymentOption.Yes "" "" AppDeploymentOption.No "" "" ]]]' )

Many thanks , Chethan

devnull
  • 118,548
  • 33
  • 236
  • 227
Tabber
  • 151
  • 3
  • 16
  • There are only 5 parameters of `MapRolesToUsers` in documentation and also in armstrhb answer (see below). Why do You have `MapRolesToUsers` with 8 parameters? What these parameters do? – lu_ko Jun 30 '14 at 16:09

1 Answers1

3

It looks like there are some extra arguments at the end of the -MapRolesToUsers block. I'm not sure if those are throwing off wsadmin. Here's the IBM documentation on MapRolesToUsers (source):

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 

Try changing the MapRolesToUsers block to this:

 -MapRolesToUsers [[ security AppDeploymentOption.No AppDeploymentOption.Yes "" "" ]]
armstrhb
  • 4,054
  • 3
  • 20
  • 28
  • Thank you , I tried this too with same results , however , there is a catch : a restart of WAS rectified this and I could see the link "Security role user/group mapping" right-away after the restart and regardless of whether I used my way or yours for the syntax. – Tabber Jul 11 '13 at 11:53
  • 1
    make sure you don't forget to `$AdminConfig save` also might get timeout if so check: `C:\IBM\WebSphere\AppServer\profiles\MyAppSrv123\properties\soap.client.props` here my example for groups `$AdminApp view myAPP123 {-MapRolesToUsers}` `$AdminApp edit myAPP123 {-MapRolesToUsers { {"MyAdmins" No no "" "AdminG|WAS AdminG"}} }` – Tilo Dec 03 '15 at 22:49
  • In my case the syntax is `AdminApp.edit('MY_WAR', ['-MapRolesToUsers', [['Administrators','No','Yes','wsadmin','']] ])` and `AdminConfig.save()` – sercheo_87 Sep 26 '18 at 15:44