GithubHelp home page GithubHelp logo

Comments (12)

Firesphere avatar Firesphere commented on August 12, 2024

Yep, that should be fixed indeed. I've not personally dealt with authentication but any input is welcome!

from silverstripe-solr-search.

Firesphere avatar Firesphere commented on August 12, 2024

What do you mean with the parts that don't work?
You mean, those two are not passing the credentials correctly?

from silverstripe-solr-search.

kinglozzer avatar kinglozzer commented on August 12, 2024

What do you mean with the parts that don't work?
You mean, those two are not passing the credentials correctly?

Yeah exactly, they manually build a Guzzle Client instance and ignore the rest of the configuration. Normally, everything is passed to Solarium: https://github.com/Firesphere/silverstripe-solr-search/blob/87dbf70/src/Services/SolrCoreService.php#L95-L96 so it’s easy to include username/password parameters

from silverstripe-solr-search.

Firesphere avatar Firesphere commented on August 12, 2024

They're moving to PSR18 connector, so it may need a bit more work. If you have any idea or plans, please update on tag 1.0, so we can merge upstream

from silverstripe-solr-search.

Firesphere avatar Firesphere commented on August 12, 2024

Documentation on Auth is quite "meh" on Solarium, it seems to need more than just a little bit.

I'd appreciate any help! I've not yet properly figured it out.

from silverstripe-solr-search.

Firesphere avatar Firesphere commented on August 12, 2024

@kinglozzer Could you provide us with some (pseudo) code on what your hack is?

I've gotten a bit a better understanding on how to do the authentication now, but I'm still not sure how to use it with Solarium itself. It seems to be in the adapter instead of the connection, which is a tad confusing

from silverstripe-solr-search.

kinglozzer avatar kinglozzer commented on August 12, 2024

I’m afraid not, sorry! I directly modified the two methods linked in the original issue just to test it, but eventually I removed auth entirely and went for IP address-based restrictions instead.

SolrCoreService did work, so I think the Solarium part is fine (it just passes the $config array which contains anything/everything you want to add in YAML). The problem with the two other methods is that they manually construct Guzzle client instances, so the need authentication parameters (username/password, I think that’s all?) added manually. I can’t remember if they’re added as headers or GET/POST vars...

from silverstripe-solr-search.

Firesphere avatar Firesphere commented on August 12, 2024

I'm trying to get this solved, but my main problem at the moment is getting Solr to cooperate! :D

from silverstripe-solr-search.

Firesphere avatar Firesphere commented on August 12, 2024

@kinglozzer the two methods you mentioned aren't available in the Solarium module, so that's why it's "hacky"

I'm "hacking" my way around it now, and then see if I can get it to work. BasicAuth only for now

from silverstripe-solr-search.

Firesphere avatar Firesphere commented on August 12, 2024

@kinglozzer Could you try the branch dev-hans/authentication and see if it solves the issues you had?

from silverstripe-solr-search.

kinglozzer avatar kinglozzer commented on August 12, 2024

Thanks @Firesphere, workloads are high at the moment so I might not get a chance to test for a little while. I’ve added a couple of comments to the commits but the approach looks good

from silverstripe-solr-search.

Firesphere avatar Firesphere commented on August 12, 2024

Please continue discussion in the Pull Request

from silverstripe-solr-search.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.