Wednesday, March 1, 2017

CSF Key Credentials Configurations Programmatically

Hello Friends,

Today I am sharing with you all my experience over the CSF Key Credentials Configurations for Creating, Updating and Deleting the CSF Keys.
We can find many Blog Posts to Read the CSF Configurations using a BPEL Process etc. but for Creation, Updation and Deletion we have only 2 ways:

  • Manual Configurations via EM Console
  • Using WLST Scripts
I have already shared with you in my earlier posts the steps to configure the Key using EM console. Today I will sharing the other part like how we can do it Programmatically.

For WLST Script execution, we need to first login to WLST utility, and then execute the commands.

Below steps will help us on the same.
  • Open Command Prompt or Shell Terminal
  • cd <<ORACLE_HOME>>/wlserver/common/bin
  • For CMD type "wlst" and enter, for unix ./wlst
  • connect('weblogic','welcome1','t3://localhost:7001')
The above commands will log in us to the server using WLST prompt. Now execute below commands:

For CSF Key Creation:
createCred(map=<<keyMapName>>,key=<<keyName>>,user=<<keyUser>>,password=<<keyPass>>,desc=<<keyDesc>>)



For CSF Key Updation:
updateCred(map=<<keyMapName>>,key=<<keyName>>,user=<<keyUser>>,password=<<keyPass>>,desc=<<keyDesc>>)


For CSF Key Deletion:
deleteCred(map=<<keyMapName>>,key=<<keyName>>)

If we want to automate the above functionality during deployment time, then we can use the ANT Scripts as well.

Below ANT Target will focus on the same.


    <target name="createCSFKeyCred">
        <wlst debug="false" arguments="${admin.username} ${admin.password} ${admin.server} ${map} ${keyCredentialsName} ${user} ${password} ${desc}">
            <script>
            adminUser=sys.argv[0]
            adminPassword=sys.argv[1]
            adminUrl=sys.argv[2]
            keyMap=sys.argv[3]
            keyName=sys.argv[4]
            keyUser=sys.argv[5]
            keyPass=sys.argv[6]
            keyDesc=sys.argv[7]
            print('Connecting to WLST Server')
            connect (adminUser,adminPassword,adminUrl)
            print('Creating Security Credentials')
            createCred(map=keyMap,key=keyName,user=keyUser,password=keyPass,desc=keyDesc)
            disconnect()
            print('Disconnecting....')
            </script>
        </wlst>
    </target>

I hope these things will help you.

Please help with your feedback.

You can also view the post @
http://blogs.astcorporation.com/middleware/2017/02/28/automating-csf-key-credentials-configurations/

5 comments:

  1. you have clearly explained about the process thus it is very much interesting and i got more information from your blog.For more details about oracle fusion financial please check our website.

    Oracle Fusion Financial Training Institute

    ReplyDelete
  2. I would like to appreciate your work for good accuracy and got informative knowledge from here. it was very helpful I really like that you are providing information.
    Oracle Fusion HCM Technical Training

    ReplyDelete
  3. you have clearly explained about the process thus it is very much interesting and i got more information from your blog.For more details about oracle fusion financial please check our website.

    Oracle Fusion Financial Training Institute

    ReplyDelete
  4. Thanks for such a great website which is helping people who is new to oracle fusion.Your site is very impressive and you are doing an amazing job.For more details about oracle fusion cloud SCM training please check our website.

    Oracle Fusion Cloud SCM Online Training

    ReplyDelete
  5. This post is very informative for everybody. I would like to appreciate your work for good accuracy and got informative knowledge from here. Nice effort, very informative, this will help me to complete my task. Thanks for sharing it.Oracle R12 Financials Training in Ameerpet

    ReplyDelete

B2B Features with OIC

During last couple of months various new features are getting introduced in Oracle Integration Cloud, out of those there is a new feature f...