Hi I tried to reproduce, but I can successfully search both the collection and the alias. Both collection and alias promt for password, and when giving the password the search succeeds.
What was your expectation? Jan > 11. jun. 2020 kl. 16:53 skrev Isabelle Giguere > <igigu...@opentext.com.INVALID>: > > Some extra info: > Collections have 1 shard, 1 replica. Only 1 Solr node running. > > The HTTP 401 is not intermittent, as reported in SOLR-13421 and SOLR-13510. > > Any request to the alias fails. > > Thanks; > > Isabelle Giguère > Computational Linguist & Java Developer > Linguiste informaticienne & développeur java > > > ________________________________ > De : Isabelle Giguere <igigu...@opentext.com.INVALID> > Envoyé : 10 juin 2020 16:11 > À : solr-user@lucene.apache.org <solr-user@lucene.apache.org> > Objet : Re: [EXTERNAL] - Re: HTTP 401 when searching on alias in secured Solr > > Hi Jan; > > Thank you for your reply. > > This is security.json as seen in Zookeeper. Credentials are admin / admin > > { > "authentication":{ > "blockUnknown":false, > "realm":"MTM Solr", > "forwardCredentials":true, > "class":"solr.BasicAuthPlugin", > "credentials":{"admin":"0rTOgObKYwzSyPoYuj2su2/90eQCfysF1aasxTx+wrc= > +tCMmpawYYtTsp3JfkG9avb8bKZlm/IGTZirsufYvns="}, > "":{"v":2}}, > "authorization":{ > "class":"solr.RuleBasedAuthorizationPlugin", > "permissions":[{ > "name":"all", > "role":"admin"}], > "user-role":{"admin":"admin"}, > "":{"v":8}}} > > Thanks for feedback > > Isabelle Giguère > Computational Linguist & Java Developer > Linguiste informaticienne & développeur java > > > ________________________________ > De : Jan Høydahl <jan....@cominvent.com> > Envoyé : 10 juin 2020 16:01 > À : solr-user@lucene.apache.org <solr-user@lucene.apache.org> > Objet : [EXTERNAL] - Re: HTTP 401 when searching on alias in secured Solr > > Please share your security.json file > > Jan Høydahl > >> 10. jun. 2020 kl. 21:53 skrev Isabelle Giguere >> <igigu...@opentext.com.invalid>: >> >> Hi; >> >> I'm using Solr 8.5.0. I have uploaded security.json to Zookeeper. I can >> log in the Solr Admin UI. I can create collections and aliases, and I can >> index documents in Solr. >> >> Collections : test1, test2 >> Alias: test (combines test1, test2) >> >> Indexed document "solr-word.pdf" in collection test1 >> >> Searching on a collection works: >> http://localhost:8983/solr/test1/select?q=*:*&wt=xml >> <result name="response" numFound="1" start="0"> >> >> But searching on an alias results in HTTP 401 >> http://localhost:8983/solr/test/select?q=*:*&wt=xml >> >> Error from server at null: Expected mime type application/octet-stream but >> got text/html. <html> <head> <meta http-equiv="Content-Type" >> content="text/html;charset=utf-8"/> <title>Error 401 Authentication failed, >> Response code: 401</title> </head> <body><h2>HTTP ERROR 401 Authentication >> failed, Response code: 401</h2> <table> >> <tr><th>URI:</th><td>/solr/test1_shard1_replica_n1/select</td></tr> >> <tr><th>STATUS:</th><td>401</td></tr> >> <tr><th>MESSAGE:</th><td>Authentication failed, Response code: 401</td></tr> >> <tr><th>SERVLET:</th><td>default</td></tr> </table> </body> </html> >> >> Even if >> https://urldefense.com/v3/__https://issues.apache.org/jira/browse/SOLR-13510__;!!Obbck6kTJA!P6ugA-rw1I80PaH0U_GVasNqn8EXwmVQ33lwcPOU-cvNgTJK6-3zAf8ukzvv3ynJ$ >> is fixed in Solr 8.5.0, I did try to start Solr with -Dsolr.http1=true, >> and I set "forwardCredentials":true in security.json. >> >> Nothing works. I just cannot use aliases when Solr is secured. >> >> Can anyone confirm if this may be a configuration issue, or if this could >> possibly be a bug ? >> >> Thank you; >> >> Isabelle Giguère >> Computational Linguist & Java Developer >> Linguiste informaticienne & développeur java >> >>