Designing HTTPCLIENT-1625

This page tracks the design goals of the complete redesign of the GSS-based authentication in HttpClient. Namely, implementation decisions, known issues, questions, testing, etc. All code will be developed in a separate branch.

Implementation Decisions

Implemenation decisions are comprised of several blocks like interface implementations, exception handling, logging, etc.

Interface Implementations

Exception Handling

TBD

Logging

TBD

Open Issues

  1. Response token is not handed over to GSSBasedScheme, thus authentication can never be completed. It is highly likely that the HttpAuthenticator needs to be changed. There must be a notion of isClientFirst just as in SASL (RFC 4422, section 5, 2a).

Important Notes

Testing

Testing is comprised of two sections: unit tests and integration tests.

Unit Tests

It has to be determined how one can reasonably mock GSS objects to test the new implementation.

Integration Tests

Integeration tests will be performed in a corporate environment with the following setup:

Note

Not all combinations can be tested.

Concrete requests are still open.

Questions

  1. Why does MalformedChallengeException not extend AuthenticationException though it is documented for authentication purposes?
    OK: MalformedChallengeException signals syntax violation of some sort presenting the client from understanding the challenge whereas AuthenticationException signals inability or unwillingness to respond to the challenge. To me these are different type of issues, but I am open to changing it in 5.0.
  2. The name of ChallengeState is quite confusing. Where is the state? This is merely a ChallengeHostType.
    OK: We can deprecate it and replace with AuthCounterpartType or some such in 4.5.
  3. Can a ContextAwareAuthScheme instance be reused?
    OK: It can be re-used and will automatically be re-used within the same context (requests executed with the same instance of HttpContext).
  4. Can an HttpContext be used concurrently?
    MO: in theory, yes. See Javadoc of HttpContext.

Todos