You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Michael Tyler - ISD <Mi...@wal-mart.com> on 2012/04/02 20:35:50 UTC

Trying to get the username in the web service

Folks,

What I am trying to do is build a way to track which user calls which operation within the service.

I am attempting to determine what the username was that was setup in the rampart structure from within the web service.

From within the service_invoke function I am doing this:

                        conf_ctx = axis2_msg_ctx_get_conf_ctx( msg_ctx, env );

                        if( conf_ctx == NULL )
                        {
                                Log( "Failed to find configuration context" );
                        }
                        else
                        {
                                Log( "about to get axis2_conf_ctx_get_conf" );

                                conf = axis2_conf_ctx_get_conf( conf_ctx, env );

                                if( conf == NULL )
                                {
                                        Log( "Failed to get axis2_conf_ctx_get_conf" );
                                }
                                else
                                {
                                        Log( "about to get axis2_conf_get_security_context" );

                                        rampart_context =
                                                ( rampart_context_t * )axis2_conf_get_security_context(
                                                conf
                                                , env
                                        );

                                        if( rampart_context  == NULL )
                                        {
                                                Log( "Failed to find security param" );
                                        }

The rampart_context is NULL;

I have found this in axis2c/src/core/engine/conf.c

/* This is a hack to keep rampart_context at client side */
    void *security_context;

Is this possible?  Does anyone have an example?  Is this a security issue?


L. Michael Tyler, II
System Analyst - ISD Aps Dev Store Systems Services
Phone 479.277.2811
BlackBerry 479.420.3798
Michael.Tyler@wal-mart.com<ma...@wal-mart.com>
page Tyler Michael<mailto:pageLMTYLER>





This email and any files transmitted with it are confidential and
intended solely for the individual or entity to whom they are
addressed. If you have received this email in error destroy it
immediately. 

                                               *** Walmart
Confidential ***

RE: Trying to get the username in the web service

Posted by Michael Tyler - ISD <Mi...@wal-mart.com>.
Ok, after many hours of work and searching to no avail thus prompting the email, I just found this.

http://wso2.org/library/3096

Guess I should have asked the question earlier! ;-)


L. Michael Tyler, II
System Analyst - ISD Aps Dev Store Systems Services
Phone 479.277.2811
BlackBerry 479.420.3798
Michael.Tyler@wal-mart.com<ma...@wal-mart.com>
page Tyler Michael<mailto:pageLMTYLER>

From: Michael Tyler - ISD
Sent: Monday, April 02, 2012 1:36 PM
To: axis-c-user@ws.apache.org
Subject: Trying to get the username in the web service

Folks,

What I am trying to do is build a way to track which user calls which operation within the service.

I am attempting to determine what the username was that was setup in the rampart structure from within the web service.

>From within the service_invoke function I am doing this:

                        conf_ctx = axis2_msg_ctx_get_conf_ctx( msg_ctx, env );

                        if( conf_ctx == NULL )
                        {
                                Log( "Failed to find configuration context" );
                        }
                        else
                        {
                                Log( "about to get axis2_conf_ctx_get_conf" );

                                conf = axis2_conf_ctx_get_conf( conf_ctx, env );

                                if( conf == NULL )
                                {
                                        Log( "Failed to get axis2_conf_ctx_get_conf" );
                                }
                                else
                                {
                                        Log( "about to get axis2_conf_get_security_context" );

                                        rampart_context =
                                                ( rampart_context_t * )axis2_conf_get_security_context(
                                                conf
                                                , env
                                        );

                                        if( rampart_context  == NULL )
                                        {
                                                Log( "Failed to find security param" );
                                        }

The rampart_context is NULL;

I have found this in axis2c/src/core/engine/conf.c

/* This is a hack to keep rampart_context at client side */
    void *security_context;

Is this possible?  Does anyone have an example?  Is this a security issue?


L. Michael Tyler, II
System Analyst - ISD Aps Dev Store Systems Services
Phone 479.277.2811
BlackBerry 479.420.3798
Michael.Tyler@wal-mart.com<ma...@wal-mart.com>
page Tyler Michael<mailto:pageLMTYLER>



________________________________

This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately.
*** Walmart Confidential ***

RE: Trying to get the username in the web service

Posted by Michael Tyler - ISD <Mi...@wal-mart.com>.
Axis2/C (1.4.0)

Rampart/C 1.1.0

Thanks for the reply, but I found the answer here already.

http://wso2.org/library/3096



L. Michael Tyler, II
System Analyst - ISD Aps Dev Store Systems Services
Phone 479.277.2811
BlackBerry 479.420.3798
Michael.Tyler@wal-mart.com<ma...@wal-mart.com>
page Tyler Michael<mailto:pageLMTYLER>

From: Stadelmann Josef [mailto:josef.stadelmann@axa-winterthur.ch]
Sent: Tuesday, April 03, 2012 3:35 AM
To: Apache AXIS C User List
Subject: AW: Trying to get the username in the web service

Which version of axis2/C and rampart/C are you using?
Josef

Von: Michael Tyler - ISD [mailto:Michael.Tyler@wal-mart.com]
Gesendet: Montag, 2. April 2012 20:36
An: axis-c-user@ws.apache.org
Betreff: Trying to get the username in the web service

Folks,

What I am trying to do is build a way to track which user calls which operation within the service.

I am attempting to determine what the username was that was setup in the rampart structure from within the web service.

>From within the service_invoke function I am doing this:

                        conf_ctx = axis2_msg_ctx_get_conf_ctx( msg_ctx, env );

                        if( conf_ctx == NULL )
                        {
                                Log( "Failed to find configuration context" );
                        }
                        else
                        {
                                Log( "about to get axis2_conf_ctx_get_conf" );

                                conf = axis2_conf_ctx_get_conf( conf_ctx, env );

                                if( conf == NULL )
                                {
                                        Log( "Failed to get axis2_conf_ctx_get_conf" );
                                }
                                else
                                {
                                        Log( "about to get axis2_conf_get_security_context" );

                                        rampart_context =
                                                ( rampart_context_t * )axis2_conf_get_security_context(
                                                conf
                                                , env
                                        );

                                        if( rampart_context  == NULL )
                                        {
                                                Log( "Failed to find security param" );
                                        }

The rampart_context is NULL;

I have found this in axis2c/src/core/engine/conf.c

/* This is a hack to keep rampart_context at client side */
    void *security_context;

Is this possible?  Does anyone have an example?  Is this a security issue?


L. Michael Tyler, II
System Analyst - ISD Aps Dev Store Systems Services
Phone 479.277.2811
BlackBerry 479.420.3798
Michael.Tyler@wal-mart.com<ma...@wal-mart.com>
page Tyler Michael<mailto:pageLMTYLER>



________________________________

This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately.
*** Walmart Confidential ***

AW: Trying to get the username in the web service

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Which version of axis2/C and rampart/C are you using?

Josef

 

Von: Michael Tyler - ISD [mailto:Michael.Tyler@wal-mart.com] 
Gesendet: Montag, 2. April 2012 20:36
An: axis-c-user@ws.apache.org
Betreff: Trying to get the username in the web service

 

Folks,

 

What I am trying to do is build a way to track which user calls which
operation within the service.  

 

I am attempting to determine what the username was that was setup in the
rampart structure from within the web service. 

 

>From within the service_invoke function I am doing this:

 

                        conf_ctx = axis2_msg_ctx_get_conf_ctx( msg_ctx,
env );

 

                        if( conf_ctx == NULL )

                        {

                                Log( "Failed to find configuration
context" );

                        }

                        else

                        {

                                Log( "about to get
axis2_conf_ctx_get_conf" );

 

                                conf = axis2_conf_ctx_get_conf(
conf_ctx, env );

 

                                if( conf == NULL )

                                {

                                        Log( "Failed to get
axis2_conf_ctx_get_conf" );

                                }

                                else

                                {

                                        Log( "about to get
axis2_conf_get_security_context" );

 

                                        rampart_context = 

                                                ( rampart_context_t *
)axis2_conf_get_security_context(

                                                conf

                                                , env

                                        );

 

                                        if( rampart_context  == NULL )

                                        {

                                                Log( "Failed to find
security param" );

                                        }

 

The rampart_context is NULL;

 

I have found this in axis2c/src/core/engine/conf.c

 

/* This is a hack to keep rampart_context at client side */

    void *security_context;

 

Is this possible?  Does anyone have an example?  Is this a security
issue?

 

 

L. Michael Tyler, II

System Analyst - ISD Aps Dev Store Systems Services

Phone 479.277.2811

BlackBerry 479.420.3798

Michael.Tyler@wal-mart.com <ma...@wal-mart.com> 

page Tyler Michael <mailto:pageLMTYLER>  

 

 

 

________________________________

This email and any files transmitted with it are confidential and
intended solely for the individual or entity to whom they are addressed.
If you have received this email in error destroy it immediately. 

*** Walmart Confidential ***