lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl (JIRA) <j...@apache.org>
Subject [jira] [Commented] (SOLR-11279) It is necessary to specify how to generate a password when used Basic Authentication!
Date Wed, 23 Aug 2017 09:07:02 GMT

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

Jan Høydahl commented on SOLR-11279:
------------------------------------

The docs encourage users to add users/passwords using the API and not hand-edit the {{security.json}}
file.
If you wish to learn how to generate the password hash using Java, have a look at my simple
example: https://github.com/cominvent/solr-tools which can also be run from the command line.

> It is necessary to specify how to generate a password when used  Basic Authentication!
> --------------------------------------------------------------------------------------
>
>                 Key: SOLR-11279
>                 URL: https://issues.apache.org/jira/browse/SOLR-11279
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 5.3.1
>            Reporter: chenmin
>
>          Follow the documentation ,"Usernames and passwords (as a sha256(password+salt)
hash) could be added when the file is created.
>          Actually, I do not know how to generate a password.
>          Finding code as:
>           public static String getSaltedHashedValue(String pwd) {
>                  final Random r = new SecureRandom();
>                  byte[] salt = new byte[32];
>                  r.nextBytes(salt);
>                  String saltBase64 = Base64.encodeBase64String(salt);
>                  String val = sha256(pwd, saltBase64) + " " + saltBase64;
>                  return val;
>           }
>          I  think we shoud give an example to generate password in ref guide! 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message