Configure new J2CAuthentication data entries using scripting

 

+

Search Tips   |   Advanced Search

 

 

Procedure

  1. Start wsadmin

  2. Jacl:

    ### Identify the parent ID: 
    set security [$AdminConfig getid /Cell:mycell/Security:/]
    
    ### Get required attributes: 
    $AdminConfig required JAASAuthData
    
    ### Set up required attributes: 
    set alias [list alias myAlias]
    set userid [list userId myid]
    set password [list password secret]
    set jaasAttrs [list $alias $userid $password]
    
    ### Create JAAS auth data: 
    $AdminConfig create JAASAuthData $security $jaasAttrs
    $AdminConfig save
    

  3. Jython

    ### Identify the parent ID: 
    security = AdminConfig.getid('/Cell:mycell/Security:/')
    print security
    
    ### Get required attributes: 
    print AdminConfig.required('JAASAuthData')
    
    ### Set up required attributes: 
    alias = ['alias', 'myAlias']
    userid = ['userId', 'myid']
    password = ['password', 'secret']
    jaasAttrs = [alias, userid, password]
    print jaasAttrs
    
    ### Create JAAS auth data: 
    print AdminConfig.create('JAASAuthData', security, jaasAttrs)
    

  4. In a network deployment environment only, synchronize the node.

For a complete J2C configuration script, see ex8.jacl.


 

See Also

AdminConfig object for scripted administration
Commands for the AdminConfig object