cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP authentication key for hand shake at receiver side for HTTP POST

Former Member
0 Kudos

Hi All,

HTTP post receiver system is expecting an authentication key to be send by PI HTTP_AAE adapter while posting XML message to them.

The receiver system has a utility program in JAVA to validate this key. Has anyone done this kind of scenario in PI 7.31/7.4

How does this simple authentication mechanism works? If this doesn't work, we have to rely on just uname/pwd but that is not really recommended for our landscape because of security concerns. So the key is the only better option as of now. Please help!!

thx

mike

Attached some import packages used in the java util program in the receiver system. for  validating the authentication key send by PI

import java.security.MessageDigest;

import java.util.Calendar;

import java.security.NoSuchAlgorithmException;

import java.io.UnsupportedEncodingException;

import java.io.IOException;

import sun.misc.BASE64Encoder;

import sun.misc.BASE64Decoder;

I am not pasting the java program utility here due to proprietary reasons. thx for understanding

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I am going to rephrase this question according to my exact need to make it more readable

How do I send a value from message mapping to a post parameter in HTTP receiver adapter? In this case, its a secure key which has to be passed as one of the post parameters. I saw the blog by William Li

but this is on header field. I need on one of the query parameters.

thx

mike

engswee
Active Contributor
0 Kudos

Hi Michael

You can construct the target URL to include the query parameter/value using Dynamic Configuration in Message Mapping.

This previously worked on the ABAP HTTP adapter, but from the thread below it seems it is not supported on the HTTP_AAE. Not sure what version you are on, and if SAP has provided support for this in the latest SPs.

HTTP_AAE Adapater - using of dynamic url parame... | SCN

If HTTP_AAE approach can't work for you, you can use the SOAP adapter - check ASMA and "Do not use SOAP envelope"

Here is a snippet of the code you can use in a UDF for your message mapping


   //write your code here

  DynamicConfiguration conf = (DynamicConfiguration)container

    .getTransformationParameters()

    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", "TServerLocation");

String url = "http://local.yahooapis.com/MapsService/V1/mapImage?appid=" + appid + "--&street=" + street + "&city=" + city + "&zip=" + zip;

conf.put(key, url);

return appid;

Rgds

Eng Swee

Former Member
0 Kudos

thanks Eng. I will test and update.

mike