Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java SecHub client - Authentication 401 problems #2553

Closed
de-jcup opened this issue Sep 19, 2023 · 0 comments · Fixed by #2560
Closed

Java SecHub client - Authentication 401 problems #2553

de-jcup opened this issue Sep 19, 2023 · 0 comments · Fixed by #2560
Assignees
Labels
bug Something isn't working java api client

Comments

@de-jcup
Copy link
Member

de-jcup commented Sep 19, 2023

Situation

The current implementation of the Java SecHub client does use the JDK http client.

But when we call methods which needs authentication (and credentials are given to client) , it seems there are multiple connections but not all use the credientials! This leads internally to 401 authentication problems! If this happens multiple times the SecHub java client throws a client exception and stops processing.

Wanted

The java client shall operate without any authentication problems.

@de-jcup de-jcup self-assigned this Sep 19, 2023
@de-jcup de-jcup added the bug Something isn't working label Sep 19, 2023
de-jcup added a commit that referenced this issue Sep 21, 2023
- created unit test to reproduce problem (wire mock test)
- changed login behavior, instead of using a authenticator object
  we use now a request interceptor and set the basic auth header
  directly
- removed server url and trust all setters
- introduced new constructor inside abstract SecHub client to have
  fields inside mocked client as well
de-jcup added a commit that referenced this issue Sep 21, 2023
- created unit test to reproduce problem (wire mock test)
- changed login behavior, instead of using a authenticator object
  we use now a request interceptor and set the basic auth header
  directly
- removed server url and trust all setters
- introduced new constructor inside abstract SecHub client to have
  fields inside mocked client as well
de-jcup added a commit that referenced this issue Sep 27, 2023
…client-auth-problems

Changed behavior of java api client to avoid 401 problems #2553
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working java api client
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant