cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring Login Modules on SAP Web AS 640 preview

Former Member
0 Kudos

Hello,

I'm trying to make available the jaas login module HTTPCookieLoginModule.java provided with the SAP TechEd '03 Las Vegas. In the slides it says to place the jar in a folder called additional-lib which isn't included in the SAP Web AS 640 preview so I've guessed and put it in c:\usr\sap\J2E\J200\j2ee\cluster\server0\bin\ext\ (is this correct?)

It then says to add items to library.txt but this file isn't included in the SAP Web AS 640 preview. Is there a different file that needs to be modified?

Is the functionality available in the SAP Web AS 640 preview to use a custom JAAS login module?

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

thanks, but I'm having trouble when I try to deploy after adding the login module to web-j2ee-engine.xml

I'm using the sample Calculator and have set it up so that users have to log in to use it.

I've added my login module to the project (as the first link from the last note says), after adding the login module to web-j2ee-engine.xml and attempting to deploy, it aborts deployment.

As a side effect of this problem, if I remove it from web-j2ee-engine.xml and compile and deploy this works fine...until I go to use the Calculator. Its not running any more. So after starting it from "Application Tracing", I go back to attempting to use the calculator at the browser. However this time, the user is no longer authorized to access it. Some how the authorization drops out from doing the above...so back into "Security Provider" I go and re-add the group that the users I want to access it belong to...strange.

Any ideas what I'm doing wrong in adding the module to web-j2ee-engine.xml or if there is another step?

Thanks

0 Kudos

Hello Mr. Bloggs,

Why does the deploy abort? It probably returns a message saying that the login module is not recognized by the user store?

If this is the case change the service property of the Security Provider service named "VerifyLoginModulesOnDeploy" from "true" to "false" or add your custom login module to the configuration of the active user store via the runtime control of Security Provider service.

Then deploy your application (with the login module in the ear and in web-j2ee-engine.xml).

Former Member
0 Kudos

Thanks!

Adding my custom login module to the Security Provider Service did the trick.

Since then I've been trying to get the HttpGetterCallback to work. The code segment from "Using the HTTP Callback Classes" has some bugs...does anyone know how to get the .handle line to work?

//code from that page

// Shows that data from the HTTP headers of the request is required

HttpGetterCallback getterCallback = new HttpGetterCallback ();

//Next line with "HttpHeader" doesn't work...I think it should be getterCallback.setType(HttpCallback.HEADER);

getterCallback.setType("HttpHeader");

// Shows that the header with the name "address" is required

getterCallback.setName("address");

// tells the server that the address of the user is required. Then the server sets it to the callback

//This next line has an error, the method handle is not static

CallbackHandler.handle(new Callback[] );

// Gets the address that is contained in the header field "address" or null if the client did not specified an address

Object value = getterCallback.getValue();

Thanks

0 Kudos

Hi Joe,

You are right - you should use HttpCallback.HEADER for setting the type.

You receive an instance of CallbackHandler as a parameter of the initialize() method of your login module. You should use this instance to call method handle().

Kind Regards,

Svetlana

Former Member
0 Kudos

Hi Joe,

the functionality is available in Web AS 6.40. But the way you use custom login modules in 6.40 is different than it was used to be in 6.20.

I think the answer to your question can be found in this topic:

In addition, I'd add just a link from the documentation about configuring login modules for web applications: http://help.sap.com/saphelp_webas630/helpdata/en/3e/ee7aa1ab8b4442bab00ba3171cef72/frameset.htm

Good luck,

Ivo