#8568 support basic auth to solr

unreleased
closed
None
General
nobody
2024-10-04
2024-10-02
No

Related

Commit: [ac2b3d]

Discussion

  • Dave Brondsema

    Dave Brondsema - 2024-10-02
    • status: open --> review
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2024-10-02

    db/8568

     
  • Dillon Walls - 2024-10-03

    This all looks good. I have the tiniest note: It looks like self.query_server.auth is unused?

     
  • Dave Brondsema

    Dave Brondsema - 2024-10-03

    self.query_server is a pysolr object, and in most cases gets its auth attribute set in the constructor. This line modifies that for a certain case. And then afterwards it gets used internally by pysolr

     
  • Dillon Walls - 2024-10-04

    Ok, that makes sense.

    In that case though, shouldn't it use push_server_auths[0] since it's using the push server? OTOH I can also see the case for having two sets of credentials for the same host; a set of push credentials and a set of query credentials while the host is the same.

     
  • Dave Brondsema

    Dave Brondsema - 2024-10-04

    Yea the use-case is along those lines. But it still is a bit awkward, I wasn't sure if a better way. Here's the situation (in some non-oss code we have). Calling code was originally:

    make_solr_from_config(solr_mail_server)
    

    and it was only doing queries, so push_server_auths[0] logic was being used. It needed auth and I wanted to provide the query auth since it was only doing queries:

    make_solr_from_config(solr_mail_server, query_server_auth=(some_user, some_pass))
    

    so I ended up with this

     
  • Dillon Walls - 2024-10-04
    • status: review --> closed
     
  • Dillon Walls - 2024-10-04

    merged

     

Log in to post a comment.