Tuesday Sep 21, 2010

Security annotations support in Sailfin CAFE

Recently we added security annotations support to CAFE on Sailfin. Though there is lot of work to be
done in this area, please give it a try.

@org.glassfish.cafe.api.security.LoginConfig
@org.glassfish.cafe.api.security.TransportProtected
@javax.annotation.security.RolesAllowed
@javax.annotation.security.DeclareRoles

JavaDocs can be found here

Here is musicstore sample bean annotated with security annotations. Though this eliminates the need for sip.xml for
security configuration, you still need to declare role to group or principal mapping in sun-sip.xml

Cafe Security Annotations

Sample security role mappings in sun-sip.xml

Security Role to Group mapping

Permanent link to this entry | Comments [0]

Thursday Jan 21, 2010

Metro performance comparision with Axis2

Its good to see Metro performance comparision (with and without security) against Axis2 from Dennis , please read his articleto find out more. Finally streaming security implementation from Metro team has payed off.

Wednesday Jan 06, 2010

Sun Diameter 1.0 now available on sunsolve

Sun Diameter Adapter is now available on SunSolve as a patch [No : 142949-01 ], this needs to be used with Sun GlassFish Communications Server 2.0 Patch01. Again you can find Sun Diameter documentation and release notes here

Friday Dec 18, 2009

Diameter documentation

Diameter documentation and release notes can be found here

Thursday Oct 29, 2009

Diameter Administration on SailFIn 2.0

Yamini has blogged about diameter configuration elements and Admin Cli commands here.

Installing diameter on Sailfin 2.0

Diameter will be soon available as a pay for Addon module on Sailfin 2.0. Naman has written how to install and configure diameter on sailfin 2.0 here.

Wednesday Oct 28, 2009

Subscribing to user state using Sun Diameter Sh API.

Here is a code snippet that shows how to subscribe to a user state using Sun Diameter Sh API . The Notifications from the Home subscriber server(HSS) can be received by a Message Driver Bean(MDB). The code snippet of the MDB is also shown below.

The below Admin console snaps of Sailfin 2.0 show Home Subscriber server (pone) configured with Connector Pool(openims_pool) and Connector resource (openims)

PeerConfiguration
Connector Pool and Resource configuration

Here are simple steps :
1.Using Sailfin 2.0 Admin console(Sailfin 2.0 also supports cli commands)
a)Create a Diameter application
b)Create a Diameter Peer ---- Diameter Peer screen also allows you to configure connector pool and resource.
2.Write a SIP Servlet with code snippet shown above
3.Write a MDB as shown above
4.Deploy the sar and jar and you should be done.

Friday Oct 16, 2009

Reading AVP value not directly exposed by Response API's in Sun Diameter stack


Here is a code snippet that shows how to read AVP’s that any of the response API’s does not directly expose.
In this case we see how to read Experimental Result Code AVP value.


Tuesday Jul 28, 2009

Diameter Online Charging(Ro) Javadocs available

Javadocs for Sun Diameter Online charging API's are now available here.

Monday Jul 20, 2009

Code Syntax highlighter


A nice set of scripts from http://code.google.com/p/syntaxhighlighter/

Thursday Jul 16, 2009

Updating user profile information in HSS using Sailfin diameter Sh API.

In the below code snippet we see how to read the user repository data from HSS,modify the data and update the HSS. Sh API makes this operation a breeze. OpenIMS HSS is one of the HSS server being used to test SH API's.

In simple steps :

1.Look up HSS server
2.Create ReadProfileKey with required information and validate it to ensure required information to construct a valid message is there.
3.convert the retrieved profile data into JAXB objects
4.Update the profile data using setter methods provided by JAXB
5.Create a UpdateKey
6.send out the modified information.


Use ViewImage option to look @ the code snippet...

Update userprofile information.

Wednesday Jul 15, 2009

Quick look @ Online Charging in Sailfin Communication server



Wrapping up development on Online and Offline charging API in Sailfin communication server. Here is a sample that shows a charging client accessing Ericsson Charging Server.

PartOne: Initial Request in Session based online charging.

View image to look at the source.
Session Charging

PartTwo: Update and Terminate Request in Session based online charging.
The below code snippet shows how to update a charging session and terminate one. The code snippet has comments to help you understand the code.

Updating and terminating charging session

Highlights of Diameter support in Sailfin
1.Easy to use API , interfaces provided for AVP's defined in 3GPP specs and RFC's
2.Easy to query additional AVP's in a Grouped AVP.
3.Easy to add new AVP support using dictionary or annotations.
4.Ability to send messages in a synchronous or asynchronous manner(Listener support to receive asynchronous responses)
5.Interfaces defined to build messages as per 3GPP specifications.
6.Easy to build custom messages as shown in the code snippet.
7.Diameter Resource adapter.
8.Sailfin Admin console and Admin GUI support for local/remote configuration
9.TLS support.

more later....

If you have questions write to dev-AT-sailfin.dev.java-DOT-net.

Thursday Jun 25, 2009

Code Generation API

While I was looking at tools to generate code, I found Codemodel[codemodel.dev.java.net] to be a pretty good one. It is used by JAXB and by quite a number of internal projects within SUN. If you are not looking for a template based approach for generating JAVA code[as in http://apt-jelly.sourceforge.net/] I strongly recommend using Codemodel, nice thing I found in Codemodel is that generated code is nicely formatted :), it was a onestop solution for me.

Friday May 29, 2009

Annotations and AVP code generation tool

As we progressed through adding features to diameter module in sailfin, we felt the need to speed up the process of adding new application support into Diameter base protocol. Inorder to enable this we added few annotations and came up with a tool that uses metadata from the dictionary to generate the huge number of AVP's the 3GPP specs define.
Hoping to improve the tool as we progress.... Will publish the updated API's and Annotations soon...

Tuesday Apr 14, 2009

Support for Diameter Sh API in sailfin

Sailfin project will soon support Diameter protocol and will have API's to enable applications to use Sh,Ro,Rf functionality. As we progress towards providing Diameter support in Sailfin, we have released Sh API's to solicit your valuable feedback. In course of time we will publish API's for Ro and Rf applications too.

Javadocs for Sh API is published here. I will keep writing here on Sh API', to start with let us quickly look at a simple sample on how to use Sh API in a SIP Servlet.








public class RegisterServlet extends SipServlet {
     protected void doInvite(SipServletRequest req) throws ServletException, IOException {

      
       ProfileData data = readUserState(req.getSubscriberURI().toString());
       SipServletResponse resp = req.createResponse(180);
       req.setExpires(2000000);
       resp.send();
     }

     private ProfileData readUserState(String user) {
      try {
        InitialContext context = new InitialContext();
        //configuration of HSS server is configured using Sailfin Admin UI.
        UserProfileServer connectionFactory = (UserProfileServer) context.lookup("eis/SH");
        UserProfileConnection connection = connectionFactory.createConnection();
        // Configure Key specifying information to read.
        ReadProfileKey rpk = new ReadProfileKey();
        rpk.addDataReference(DataReference.IMS_USER_STATE);
        eg:"sip:bob-AT-open-ims-DOT-test"
        UserIdentity uID = new UserIdentity(user, UserIdentityType.PUBLIC_USER_ID);
        rpk.setUserIdentity(uID);
        //validate if the constructed key is correct and all information needed is provided.
        rpk.validate();
        //perform a read operation from HSS server in synchronous mode.
        UserProfileReadResponse urr = connection.read(rpk, false);
        ProfileData data = urr.getProfileData();
        //read the information as bytes,XMLStream or JAXBObject
        System.out.println("User Profile data is" + new String(data.toBytes()));
        return data;
      } catch (KeyValidationException ex) {
       Logger.getLogger(RegisterServlet.class.getName()).log(Level.SEVERE, null, ex);
      } catch (ConnectException ex) {
       Logger.getLogger(RegisterServlet.class.getName()).log(Level.SEVERE, null, ex);
      } catch (NamingException ex) {
       Logger.getLogger(RegisterServlet.class.getName()).log(Level.SEVERE, null, ex);
      }
      return null;
}
}

We encourage users to look at Javadocs and provide us feedback. Please write to us at dev-AT-sailfin.dev.java.net

About

venu

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today