WSO2 how to Integrate ESB with Identity Server
Asked Answered
F

1

2

Maybe my understanding is wrong, please advice.

Requirement:

(1) user A, and user B wanna to access a web service SayHello.

(2) only user A has permission.

(3) SayHello web service simply return a string "hello"

Previously:

(1) To invoke SayHello, create a client according to SayHello?wsdl. -- Success

(2) Create a proxy service SayHelloProxyService through ESB, host this proxy service to SayHello service, create a client according to SayHelloProxyService?wsdl. --Success

Now:

Add Identity Server inside, only give user A access permission, something like the following diagram : enter image description here

Question:

for now, I'm thinking if I still wanna to invoke SayHelloProxyService, should I change the client's code? carrying some tokens like username or what to SayHelloProxyService? if so how to write the client code? maybe my understanding is totally wrong, but if there is a small example regarding will be a great help, could anyone know about this?

thank you in advance.

Faggoting answered 26/3, 2013 at 9:54 Comment(0)
E
2

My understanding is that you are setting the wrong permissions. Role permissions in "Configure > Users and Roles > Roles" are only valid locally for the server itself, which is IS in your scenario, but not for external services.

If you need IS to authorize some service, rather than changing your client's code, you might want to create a simple XACML policy like it is described in [1], and enable WSO2IS as a policy decision point.

[1] http://wso2.org/library/articles/2010/10/using-xacml-fine-grained-authorization-wso2-platform

Endamage answered 26/3, 2013 at 11:29 Comment(3)
yes, that link is which I followed, until now, I succeeded to set up IS and ESB according to the server, but for the java client side, I saw options.setUserName("admin");options.setPassword("admin"); so that if I can access to the property service(am I right?), but how about the other language? c#, php etc. they don't have a 'options' library, so for them how to invoke the service ?Faggoting
Once you locate the WSDL url for your service, you can generate Java stub classes as described in here and use them in your client to consume the web services. For any other language, you should find yourself a similar way to generate the stub from the WSDL service description, which will depend on the languages and tools you use. While you can find many Java based WSO2 tutorials, documentation, and samples on the internet, I am afraid that for other languages you are on your own.Endamage
thank you for your reply, I think you misunderstand my purpose, in this tutorial I set up a proxy webservice which need an authentication before invoking, what I concerned is the authentication, how to do the authentication, seems I need purpose some username and password stuffs, still don't have a clearly point of view about hereFaggoting

© 2022 - 2024 — McMap. All rights reserved.