Giter Club home page Giter Club logo

Comments (10)

mdaneri avatar mdaneri commented on July 25, 2024

Let me run a test, and I'll get back to you

from safekeeping.

mdaneri avatar mdaneri commented on July 25, 2024

I made some update to the WSDL file and the sapi.jar file. Can you please resync the repo and retry?

from safekeeping.

adrienchabot avatar adrienchabot commented on July 25, 2024

Many thanks for your quick reply !

Same thing with fresh new deployment.
Can you confirm I am requesting soap service the right way ?

In cxf-test you are using a boolean to switch between CSP or PSC login ; is there something I need to specify to login using PSC and SOAP ? I haven't found any detection mechanism in code that instantiate pscConnectOptions or cspConnectOptions.

Have you a working authentication example request/scenario using SOAP requests ?

from safekeeping.

mdaneri avatar mdaneri commented on July 25, 2024

I never tried to use soap directly.
The only thing I can do is use Java or C# and dump the soap call

from safekeeping.

adrienchabot avatar adrienchabot commented on July 25, 2024

Ok.

Is it possible to expose directly "loginPsc + loginCsp" additionally to "login" soap actions ? (each one linked to corresponding type "pscConnectOptions + cspConnectOptions")

Or adding another parameter in "login" to specify "auth_type(psc|csp)" in order to create the object with the right class ? ("pscConnectOptions"/"cspConnectOptions" and not "connectOptions" => like you do in your cxf-test app with a boolean)

I suppose it's this test that fails (or equivalent method in safekeeping-external/etc) :

if (options instanceof CspConnectOptions) {
if (connect.connectSso(racs, ((CspConnectOptions) options).getRefreshToken())) {
final User user = new User(connect.getConnectionManager());
getUsersList().put(racs.getToken(), user);
}
} else if (options instanceof PscConnectOptions) {
if (connect.connectSso(racs, ((PscConnectOptions) options).getPassword())) {
final User user = new User(connect.getConnectionManager());
getUsersList().put(racs.getToken(), user);
}
} else {
racs.failure("Unsupported authentication method");
}

Object never match conditions instanceOf(pscConnectOptions|cspConnectOptions) because it's always created with parent ConnectOptions class through soap service (instead of child classes pscConnectOptions/cspConnectOptions)

from safekeeping.

mdaneri avatar mdaneri commented on July 25, 2024

Yes I can. Let me work on that

from safekeeping.

mdaneri avatar mdaneri commented on July 25, 2024

I created 2 new API loginCsp and LoginPsc
Please use LoginPsc should solve your issue

from safekeeping.

adrienchabot avatar adrienchabot commented on July 25, 2024

It works !! :) (I've made some corrections in prepare.sh to make it work)

I get a token in xml response, I've tried to pass it to HTTP Auth-token header but it throws a 500 with UnrecognizedToken exception. Am I using it the right way ?

from safekeeping.

mdaneri avatar mdaneri commented on July 25, 2024

do you get this error with the connect method?
What language are you using? Why can you not use the WSDL to generate the stub?
if you want to see a fully working client for the SOAP service, please check the sample https://github.com/vmware/safekeeping/tree/master/safekeeping-cxf-test

from safekeeping.

adrienchabot avatar adrienchabot commented on July 25, 2024

I was getting this error with isConnected (loginPsc, then isConnected [with Auth-token]).

I've made new tests, so now :

  • loginPsc return 200 with token
  • connect (with Auth-token header) return 500 with Can't load library: /opt/safekeeping/safekeeping-cxf/build/install/safekeeping-cxf/lib/lib64/libjDiskLib.so (there are some .so in this path but not this one - and I haven't found it in another location on disk)
  • isConnected (with Auth-token header) return 200 with false
  • ... other actions (getAllDumps/getRepositories/...) return 200 (with Auth-token header), but all body are empty => I suppose it's the expected behavior because of isConnected=false

I confirm that using workflow loginPsc/connect/isConnected (instead of loginPsc/isConnected) fixes UnrecognizedToken exception (even if I get a 500 on connect action).

I'm not using any language, only pure SOAP requests ; I'm querying /sdk entrypoint with SoapUI - wich generates stubs from SOAP wsdl/xsd url (great for basic/quick testing : in soapUI, create new SOAP project and paste /sdk?wsdl url in "initial wsdl" field, it will construct some tree views and generate sample requests).

EDIT : I'm using VMware-vix-disklib-7.0.3-19513565.x86_64.tar.gz (with openjdk 11.0.15 / debian 11)

from safekeeping.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.