[Archivesspace_Users_Group] Authentication and External Solr
Stephen Schor
stephenschor at nypl.org
Wed May 11 15:28:46 EDT 2016
Hello.
Here's a small walkthrough of what I ended up doing.
*Edited the content of ./wars/indexer.war/indexer_common.rb*
Developers will be running embeded solr - but our stage and prod machines
will
use an external solr. So I added this bit to do_http_request()
if AppConfig[:solr_url] && !AppConfig[:solr_url].include?('localhost')
req.basic_auth AppConfig[:solr_http_basic_user],
AppConfig[:solr_http_basic_pass]
end
*Added HTTP Basic Auth credentials to config/config.rb*
AppConfig[:solr_http_basic_user] = '[string-read-from-properties-file]'
AppConfig[:solr_http_basic_pass] =
'[string-read-from-properties-file]'
On Wed, May 11, 2016 at 1:11 PM, Stephen Schor <stephenschor at nypl.org>
wrote:
> Hi.
>
> Coming back to this since I've spent some more time poking around the
> ASpace code and have a little better
> understanding of its layout and Solr in general.
>
> Seems like I could add basic_auth credentials on the NetHTTP request
> object
> <http://ruby-doc.org/stdlib-2.3.1/libdoc/net/http/rdoc/Net/HTTP.html#class-Net::HTTP-label-Basic+Authentication>
> in ./wars/indexer.war/indexer_common#do_http_request().
>
> Does anyone have experience monkey-patching methods defined in the warred
> files?
> I tried to do it in a plugin but it seems that plugins load before the
> content of indexer.war.
>
> I don't *mind* hand-editing and regenerating indexer.war - but it seems
> less palatable (believe it or not)
> than monkey patching and more oral history to maintain once it's time to
> update our version of ASpace.
>
> Stephen
>
>
>
> On Fri, May 6, 2016 at 1:30 PM, Majewski, Steven Dennis (sdm7g) <
> sdm7g at eservices.virginia.edu> wrote:
>
>>
>> I think you would have to add authentication to the indexer code
>> depending on what authentication method you are using for Solr. I’m
>> guessing that there are just too many possible authentication methods to
>> support, so that’s why ASpace is shipped with it’s own Solr that you can
>> firewall restrict to localhost.
>>
>>
>> — Steve Majewski
>>
>>
>>
>> > On May 6, 2016, at 12:45 PM, Stephen Schor <stephenschor at nypl.org>
>> wrote:
>> >
>> > Hi.
>> >
>> > I'm thinking about running ASpace with an external Solr.
>> > After looking at the documentation on using an external Solr - I didn't
>> > see anything regarding Solr username/password.
>> >
>> > I'd be grateful if someone could point me in the right direction.
>> >
>> > Thanks for your time,
>> > Stephen
>> > _______________________________________________
>> > Archivesspace_Users_Group mailing list
>> > Archivesspace_Users_Group at lyralists.lyrasis.org
>> > http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>>
>> _______________________________________________
>> Archivesspace_Users_Group mailing list
>> Archivesspace_Users_Group at lyralists.lyrasis.org
>> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20160511/62f851a1/attachment.html>
More information about the Archivesspace_Users_Group
mailing list