DocuSign API integration issue with RESTful Web Services : javax.ws.rs-api-2.0.1.jar - api

My project is using DocuSign API to post Envelope with the Java client:
docusign-esign-java-3.2.0.jar
It works fine, but the project also needs to use jCloud with another lib dependency:
javax.ws.rs-api-2.0.1.jar
The server (tomcat) gets an exception when calling the JWT authent of DocuSign:
Could not initialize class com.sun.jersey.core.header.MediaTypes
Is it possible to fix this dependency problem without exploring the DocuSign sources?

welcome to SO.
depending on the dependency management program you are using , you can print a tree and then investigate if there is any conflict.
for gradle,
./gradlew app:dependencies
for Maven
mvn dependency:tree
Also, generally before that message you will see a Java Exception. If you add that or look at it, it may throw more light on the problem.
best wishes.

Yes, we (DocuSign) have this issue logged as an issue for the SDK and as DocuSign internal ticket DCM-3324.
Please ask your DocuSign representative to add your organization information to DCM-3324 to help raise the priority of the issue. Thank you.

Related

How to test gRPC APIs?

I have been assigned to test a gRPC API (written in Golang) but I don't know how to go about testing it and I couldn't find any tutorials online for this type of testing. The only method that I can think of is to write unit tests to test the methods themselves but I would like to also test it with a client. For example, I have tested REST APIs in the past using JMeter as a client to send requests and verify the response data. Is there a method for testing gRPC APIs with a client or is unit testing the only way?
Well, I was in search for a client like Postman, then i found bloomrpc, which helps in calling grpc services. But i am not sure if it serves your purpose, if you are looking for a tool like jmeter.
If you are searching for a tool like Postman, there is also https://kreya.app. With it, you can call your gRPC services and view the responses.
Disclaimer: I'm one of the authors of Kreya.
Since you mentiond you've done testing before with JMeter, I assume that you're looking for an external test client that can call the gRPC service. There are several that you can use. The common ones are
BloomRPC
Kreya
Wombat
Fint
With those 4 clients, you can dynamically call gRPC services. However, if you are looking a test client that can also do load testing, Fint is the one you will need.
There can be two type of testing.
Testing just the implementation of the gRPC method by ignoring the networking
this question answers this aspect of the testing. By just writing the unit test for the RPC method
If you want to test both the implementation and the gRPC networking aspects as well then you need write the gRPC client for the service you want to test.
Here a code snippet about creating a gRPC client
// Set up a connection to the server.
conn, err := grpc.Dial(address, grpc.WithInsecure())
// Execute RPC you want to test
r, err := c.SayHello(context.Background(), &pb.HelloRequest{Name: name})
Check here for complete code example
Postman just published they have grpc in beta :
https://blog.postman.com/postman-now-supports-grpc/
I tested it just now and it worked perfectly for me 👍🏻🙂
You can also try this command line tool, evans, for testing gRPC
For anyone who stumbles upon this thread ...
All the previous answers have already provided good tools. We used BloomRPC & Kreya in our team (individual choices).
What I want to add is this gRPC Ecosystem Page. It contains a curated lists of all related tools. There are other GUI test tools (see GUI section), or Load testing, benchmarking tools (Testing)
https://github.com/grpc-ecosystem/awesome-grpc
PS : I'll be honest, I have not able to check all tools besides BloomRPC & Kreya.

Symfony 3.1: configuration of ldap component as service

I'm writing my first Symfony app and and I need authenticate users over LDAP/AD, but I run out of documentation...
I found many solutions for use LdapClient, but it tagged as deprecated. So, i check for use the new one Ldap class as recommended, but I not found documentation for use it. The documentation of Ldap component for the current version (3.1) suggest to use LdapClient yet! It isn't updated yet?
I don't know how to do: must we create an adapter for add a Ldap service? If so, how to proceed?
Any help will be appreciated, thanks!
Check out this cookbook article for configuring LDAP authentication using the builtin Symfony component:
http://symfony.com/doc/current/cookbook/security/ldap.html
I also have a bundle I maintain that includes LDAP authentication that works well with AD called LdapToolsBundle. It has documentation on the main page for the app/config/config.yml entries needed to configure your domain for use in the bundle, and also some details on configuring authentication in app/config/security.yml here.
The bundle above provides a LDAP service called ldap_tools.ldap_manager that can be used to query/create/modify different types AD objects.
take a look at my Blog:
https://alvinbunk.wordpress.com/2016/03/25/symfony-ad-integration/
This requires FOSUserBundle and FR3DLdapBundle, but I think if you go through all that documentation you should be able to get LDAP/AD integration with Symfony3 working.
EDIT #2
Below is a second easier solution:
https://alvinbunk.wordpress.com/2017/09/07/symfony-ldap-component-ad-authentication/

How to integrate CAS authentification in SonarQube

we want to integrate CAS authentication into Sonar 3.7 LTS. We want to start working with the deprecated CAS plugin, which of course doesn't work. We already compared it with the LDAP plugin from here whose Authenticator interestingly implements the deprecated interface LoginPasswordAuthenticator. One of the main differences is that the CAS Authenticator plugin implements Authenticator. So we altered the CAS Plugin that it implements LoginPasswordAuthenticator instead.
Now comes the clue:
In both cases, the authenticator implementing Authenticator or LoginPasswordAuthenticator, the username passed to it is null. The authentication against the CAS server works like a charm, the plugin knows the username, but Sonar asks the plugin, if it knows the user with the name null. The effect is that when we click on login we get redirected to CAS, fill in the login form and get redirected back to Sonar, still not authenticated to Sonar itself.
We also considered using container authentication but are not sure if that works with Sonar.
Now the question(s):
Has someone got the CAS plugin working with Sonar 3.7? If yes, how and can you provide the sources/solution/plugin?
Is there another way besides the suggested ones above?
One additional note: We want to use Sonar in our existing Tomcat 7, so using Sonar 4 is a way we do not really want to go because the Sonar team decided to stop war support. If anything else fails though, using it is a pain-in-the-ass-but-acceptable solution.
Thanks for your help.
Try this fork: https://github.com/jerzykrlk/sonar-cas.
I restored the behaviour of the original plugin - it should work with Sonar 3.7. It is unofficial at the moment, and will require a manual build. But maybe it will become an official plugin at some point, again.
Thanks to #psqita we got the CAS plugin for Sonar up and running with Saml 1.1. Business requirements said that no anonymous access shall be allowed. Sadly, setting forceAuthentication to true sent us into an endless loop of painful redirecting between CAS and Sonar. So we figured out that Sonar alters its behavior drastically in a way that it ignores all authentication plugins.
Our solution: As of business requirement we could not allow anonymous access. So we implemented another Filter that redirects conditionally to CAS. Authentication and stuff is still done by the plugin. Sadly, we still do not know why there was this endless loop in the first place but now it doesn't happen anymore. Well that's IT I think...
Thank you for your support and happy holidays.

Rest resource API in JIRA Plugin

Is it possible to create Rest Resource API into JIRA Plugin or have to create separate refapp as below and reference in JIRA plugin project?
https://developer.atlassian.com/display/DOCS/Developing+a+REST+Service+Plugin#DevelopingaRESTServicePlugin-Step6.Adjustthetestcode
And what will be the url of rest api method to access ?
I mean how it compose to use.
Thank you.
As found,
Yes, it's possible. Follow below tutorial to add REST RESOURCE module in jira project.
https://developer.atlassian.com/display/DOCS/REST+Plugin+Module
Below is another ticket related to URL composition for rest resource service:
https://answers.atlassian.com/questions/156650/development-in-jira-plugin-how-to-use-rest-api-in-velocity-template-through-json
Thank You,
Dhaval Soni

How To Approach Authentication In My Web App? JSF2 + Spring3 + GlassFish3 + Hibernate

I'm building a new web app from scratch for a client.
The tools are JSF2, PrimeFaces, Spring3, GlassFish3, Hibernate.
I have a basic web app working fine. Now I have to put authentication in.
My first thought was to hack together a login form that sets a session variable and have a phase listener check for the session variable and redirect to "logged out" when the variable is invalid or too old. But that sounds like a total hack.
I've googled, but I don't really know where to start. What's the REAL way of doing authentication in my web app on my platform?
Can anyone help, or point me to a tutorial, or the relevant documentation?
Any help is greatly appreciated,
rh
The phaselistener you thought about is one of the solution in JSF. Another solution is Spring security. If you are not thinking about any of these, you can try Servlet filter