https://issues.apache.org/bugzilla/show_bug.cgi?id=53480

Philippe Mouawad <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #11 from Philippe Mouawad <[email protected]> ---
Hello,
Many thanks you for new update.

It's better but still there is something that I would like to improve.

It seems to me in HttpHC4Impl, it would be nice to do something like this:
authManager.configureCredentials(url, (AbstractHttpClient)client);

AuthManager would take care of applying the auth policy.

Same for executeRequest, it would be nice to just have this:
    private HttpResponse executeRequest(final HttpClient httpClient,
            final HttpRequestBase httpRequest, final HttpContext localContext,
final URL url)
            throws IOException, ClientProtocolException {
        AuthManager authManager = getAuthManager();
        if (authManager != null) {
            if(authManager.getSubject(url) != null) {
                Subject subject = authManager.getSubject(url);
                try {
                    return Subject.doAs(subject,
                            new PrivilegedExceptionAction<HttpResponse>() {

                                @Override
                                public HttpResponse run() throws Exception {
                                    return httpClient.execute(httpRequest,
                                            localContext);
                                }
                            });
                } catch (PrivilegedActionException e) {
                    log.warn(
                            "Can't execute httpRequest with kerberos-subject",
                            e);
                    return null;
                }
            }

        }
        // perform the non-kerberos sample
        return httpClient.execute(httpRequest, localContext);
    }


The issue is that KerberosManager is not visible to AuthManager.

So wouldn't it be better to remove KerberosManager GUI and enhance HTTP
Authorization Manager to have a GUI that changes depending on Mechanism. In
this case Mechanism would not be an additional column but a select box outside
of table and depending on value additional attributes would appear:

BASIC => Nothing
Kerberos => krb5.cong, jaas file, debug
DIGEST => Nothing
...


Another little question, why does KerberosManager implement
TestIterationListener and TestStateListener, it does not seem useful to me as
methods are empty.

sebb, milamber what's your opinion ?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to