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

Invalid signature 40103 when using duo_client_java v0.6.0

JDev
Level 1
Level 1

I have a Java 8 Maven project that’s using the duo_client_java v0.6.0 and I’m trying to call my own version of the getUsersWithPaging example.

My code is:

Admin request = new
Admin.AdminBuilder(“GET”, “XXXXX.duosecurity.com”, “/admin/v1/users”).build();

request.signRequest(“myIKey”, “mySKey”);
result = (JSONObject) request.executeJSONRequest();

All I’ve done is add my iKey, sKey, and URL and it keeps returning:
java.lang.Exception: Duo error code (40103): Invalid signature in request credentials

Ironically, I’m able to successfully call the endpoint using the same credentials in Postman.

I can see the Basic authorization being generated in the Java client for the request is significantly more characters than the one being generated in Postman. 84 vs. 200 for the same request parameters/body.

Any ideas?

2 Replies 2

JDev
Level 1
Level 1

I should mention the getUsersWithPaging method is in the example DuoAdmin.java here:

I think the reason is internally duo-client-java is using SHA-512 as hashing algorithm whereas in the documentation it is mentioned to use SHA-1. Can anyone please provide the solution for this?

Quick Links