File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes Adding new security realms in WebSphere (Properties File Realm) without using administrative console Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Adding new security realms in WebSphere (Properties File Realm) without using administrative console" Watch "Adding new security realms in WebSphere (Properties File Realm) without using administrative console" New topic
Author

Adding new security realms in WebSphere (Properties File Realm) without using administrative console

Arka Mitra
Greenhorn

Joined: May 24, 2012
Posts: 16

Hi,
We are adding new security realms (Properties file realms) in WebSphere Application Server Community Edition by going to administrative console and we are creating new realm in Security Realms tab in administrative console. I need to know how to add new security realm without using the console i.e. doing the same manually by modifying any XMLs. The below things I have noticed while adding new security realm from console.

1. One new .car file is created with the name of that realm which I have added through console and that .car file has config.info, config.ser, config.ser.sha1, geronimo-plugin.xml, MANIFEST.MF, plan.xml files under META-INF folder. So if we can able to create the car file manually under C:\Program Files\IBM\WebSphere\AppServerCommunityEdition\repository\console\realm, there is a possibility.

2. We need to modify the config.xml under C:\Program Files\IBM\WebSphere\AppServerCommunityEdition\var\config and add the .car file <module> tag (<module name="console.realm/SampleSecurityRealm/1.0/car"/>).

The above mentoned 2 steps I have figured out which could be the possible way. Please help me on this.
I need to add new security realms without using the administrative console.


Thanks & Regards
Arka Mitra
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3178
    
    3
Hi !

Sorry, I can't help you, and probably nobody can guarantee you success by using direct XML editing approach.

What I can suggest you - create Profile and configs backup before you edit anything. Seems like you can do backup only by copying files, because backup by WAS scripts would require from you root authority.

Not completely understand your situation - Web Admin Console not deployed ?

Why can't you deploy Web Admin Console app ? Also you still can use Jython and JACL from command line. Is it possible?

Sorry, just random thoughts.

Best regards,
MZ


Free SCDJWS 5.0 Study Guide - SCDJWS 5.0 Quiz (How to get SCDJWS 5.0 Quiz)
Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz
Arka Mitra
Greenhorn

Joined: May 24, 2012
Posts: 16

Hi Mikalai Zaikin,

Thanks for your reply. Let me put my situation in the below way.

I have to know the exact mechanism of adding a new security realm in WebSphere App Server Community Edition. When we are adding new realms through Administrative Console in WAS, we use to go to security realms tab and add new security realm. After the process of adding realms, we can see the realm name is displayed there.

I need to know this mechanism that when we are adding new realms how WAS modifies internally that the security realm is added. Hence if we manually do the same procedure, we can able to add new realm manually, not by using administrative console of WAS. Hope I have made you understand this time.

I really need to know this. If you can give me any idea, it will be much helpful for me.
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3178
    
    3
Hi,

In traditional WAS (not Community Edition) there is a possibility to see Jython equivalent of the latest action performed via Web Admin Console, so you can copy it to text file and later reproduce the same action via command line wsadmin scripting utility (and don't forget to call AdminConfig.save ).

Useful links:
1) View last action performed via Web Admin Console
2) Command assistance (logs in text file all history of scripting equivalents of all performed commands)

Best regards,
MZ
Arka Mitra
Greenhorn

Joined: May 24, 2012
Posts: 16

Thanks for your reply Mikalai. I will try out this possible way. I need to automate the administration. Hence need to know without using the administrative console of WAS how can I perform it's utility (like adding new seciruty realms, deploying an web app etc).
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3178
    
    3
Arkaa Mitra wrote:Thanks for your reply Mikalai. I will try out this possible way. I need to automate the administration. Hence need to know without using the administrative console of WAS how can I perform it's utility (like adding new seciruty realms, deploying an web app etc).


And my final suggestion: never edit directly XML configuration files for WebSphere (Base, Network Deployment, or Community Edition, does not matter), unless this is your last fallback.
Arka Mitra
Greenhorn

Joined: May 24, 2012
Posts: 16

Is there any type of command assistance for websphere application server community edition is availble? The Links you have provided to me, talk about WAS other version but not Community Edition I think.
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3178
    
    3
Arkaa Mitra wrote:Is there any type of command assistance for websphere application server community edition is availble? The Links you have provided to me, talk about WAS other version but not Community Edition I think.


I don't know, I never used WAS Community Edition.
Arka Mitra
Greenhorn

Joined: May 24, 2012
Posts: 16

Thanks a lot Mikalai for your suggestion.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding new security realms in WebSphere (Properties File Realm) without using administrative console
 
Similar Threads
Wasce error - Server IBM WASCE v2.1 Server at localhost failed to start.
Migrating JAAS from JBoss to Websphere 6.1
Test 252 Primer Q&A
Test 252: Mock exam
Passed 700,701 and 340 last Thursday