users@glassfish.java.net

Re: Default Realm

From: <glassfish_at_javadesktop.org>
Date: Tue, 30 Mar 2010 08:27:51 PDT

I have not understood ur requirement fully but tell me if this is correct :

1. You are able to use HTTP BASIC Authentication with WebService with a Defult Realm of your choice. However you do not want to use this.

2. Instead you want to use SOAP Message security but want to change the default realm. You are unable to do this ?.

There are two ways :

1. You can go to Security Service under the Admin GUI or CLI and set the Default Realm to be realm of your choice.

2. Package the WAR inside an EAR project and add a sun-application.xml under META-INF and specify the realm there :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-application PUBLIC '-//Sun Microsystems, Inc.//DTD Application Server 9.0 Java EE Application 5.0//EN' 'http://www.sun.com/software/appserver/dtds/sun-application_5_0-0.dtd'>
<sun-application>
   <realm>xyz</realm>
</sun-application>

Netbeans can help you create an EAR with sun-application inside.
[Message sent by forum member 'kumarjayanti']

http://forums.java.net/jive/thread.jspa?messageID=394511