13.07.2015 Views

IBM WebSphere V5.0 Security - CGISecurity

IBM WebSphere V5.0 Security - CGISecurity

IBM WebSphere V5.0 Security - CGISecurity

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

# creating the new entry$AdminConfig create SSLConfig $security_root $ssl_entry repertoire# saving the configuration$AdminConfig saveCreating a J2C authentication entryThe following script is very similar to the previous one. This one will create a newJ2C authentication entry for <strong>WebSphere</strong>.Example: D-5 newJ2Centry.jacl# create a new J2C authentication entry# set the security objectset security_root [$AdminConfig list <strong>Security</strong>]# set the attributes for the new objectset auth_alias [list alias "itsobankds_auth"]set auth_descr [list description "ITSOBank DataSource authentication alias"]set auth_userId [list userId "dbuser01"]set auth_password [list password "password"]# put the new object togetherset auth_entry [list $auth_alias $auth_descr $auth_userId $auth_password]# create the new object$AdminConfig create JAASAuthData $security_root $auth_entry# saving the configuration$AdminConfig saveAssigning a J2C entry to a DataSourceOnce you have at least one J2C authentication entry in your system, you canassign it/them to certain objects such as DataSource.Example: D-6 assignJ2Centry.jacl# change authentication alias for DataSource# usage: wsadmin assignJ2Centry.jacl datasource_name alias_name# storing the parametersset ds_arg [lindex argv 0]set alias_arg [lindex argv 1]# finding the datasource based on nameset datasources [$AdminConfig list DataSource]foreach datasource $datasources {if {[regexp $ds_arg $datasource]} { setdatasource_root $datasource; break }}# modify the authentication alias attribute for the datasource$AdminConfig modify $datasource_root [list [list authDataAlias $alias_arg]]# saving the configuration$AdminConfig saveAppendix D. Using wsadmin scripting for security configuration 519

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!