hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trejkaz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1106) Use character arrays for passwords in Credentials objects, not Strings
Date Thu, 29 Jan 2015 00:42:35 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14296160#comment-14296160
] 

Trejkaz commented on HTTPCLIENT-1106:
-------------------------------------

+1. All the work we do to protect the user's credentials is for nothing because of APIs which
force us to wrap it in a string.

> Credentials need to be stored in memory for a duration of an HTTP session

Not necessarily. If you're using Digest auth, then you need only keep around a hash of the
password and other information for that session. This is vaguely similar to keeping a password
in memory, but at least an attacker can't steal it to impersonate the user on a different
web server.


> Use character arrays for passwords in Credentials objects, not Strings
> ----------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1106
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1106
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpAuth
>    Affects Versions: 4.1.1
>            Reporter: John Karp
>             Fix For: Future
>
>
> Its fairly conventional to use char[] to represent passwords in Java, because using Strings
can present security issues:
> http://securesoftware.blogspot.com/2009/01/java-security-why-not-to-use-string.html
> http://download.oracle.com/javase/1.5.0/docs/guide/security/jce/JCERefGuide.html#PBEEx



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message