cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
531
Views
0
Helpful
2
Replies

Authentication error customizing SESM

carlosparra
Level 1
Level 1

Hello,

For a specific scenario I need to authenticate an user without using the built in SESM controls.

I am trying to use the provided API and I get the following error:

No account for the identities "{radiususer=cisco}" exists.

The code running within the JSP:

Map LoginInfo = new HashMap();

LoginInfo.put("radiususer","cisco");

sesmSession.authenticate(LoginInfo);

Would anyone have any clues on why doesn't this work? The user password combination works fine if using the non-customized pages. Thanks

2 Replies 2

umedryk
Level 5
Level 5

You could check the document for more information on SESM : http://www.cisco.com/en/US/products/hw/routers/ps314/prod_bulletin09186a0080091f31.html

carlosparra
Level 1
Level 1

Hi, responding to my own question. I would advice to use the Web Services Gateway (WSG) which exposes a Web Services interface (SOAP/HTTP) that emulates the commands between SESM and SSG.

This is what I did, I hope that it helps someone else:

- Create a new com.cisco.sesm.wsg.common.Identity object named id. The Identity class is a simple bean generated from the WSDL file.

- Set the type of id to com.cisco.sesm.types.IdentityType.USER. WSG authenticates subscribers only by user id.

- Use the Identity bean setter method - setType

- Set id's principal with the value of the username variable. Use the Identity bean setter method – setPrincipal.

Then create a Credential array with the id bean and the password of the subscriber

Finally, you can use the authenticate(java.lang.String hostkey, Credential[] credentials) method