ColdFusion supports using Solr natively. Solr collections can be created both via ColdFusion Administrator or in your application code. By default the Solr in not secured with the built-in installation.
Solr has security frameworks for supporting the authentication and authorization of users. This allows for verifying a user’s identity and for restricting access to resources in a Solr Download the zip file from the link provided in this doc and unzip the files. You’ll then copy these files to their respective locations. To secure Solr, follow the steps below:
- Stop all CF services.
- Copy start.ini and replace under [CFUSION_HOME]//jetty directory.
- Copy security.json and place it under [CFUSION_HOME]//jetty//multicore directory.
- Go to [CFUSION_HOME]//bin//felix-cache and delete all files.
- Go to [CFUSION_HOME]//wwwroot//WEB-INF//cfclasses and delete all files.
- Restart CF services and access the CF admin page.
- Navigate to Data & Services — > Solr and update the username and password fields with “credentials” file in zip.
- Access the URL http://localhost:8993/solr and enter the credentails. For CF2023, use 8995 port and for CF2025, use the built-in “start.ini” file and use port 8997.
All authentication and authorization configuration, including users and permission rules, are stored in a file named security.json. Ref documentation here The credentials hash used if from here. In case you face issue related to index/reload the collections, please refer to this CF-4225450 and contact cfsup@adobe.com for the fix.
Helpful stuff. Thanks, Abhishek! 🙂
Sadly, though, there’s a problem with the Solr docs site–at least with regard to the Solr 8 version of the docs. If one views the link to the security page offered here, on a desktop it shows nothing but its table of contents (at least currently), while on mobile the content is hidden UNDER the TOC.
In case the Solr teams doesn’t fix their site anytime soon, I wanted to note first that the version 9 Solr docs work fine–and here is the current version of that Solr security page linked to here. (The current Solr version, as I write, is 9.8.)
Of course, there’s always a chance that those “latest docs” might say something which doesn’t apply to the Solr version currently implemented within CF (which is Solr 8.11.3 as of the current update of CF2023 as I write, and 7.2 as of the current update of CF2021). I’m simply sharing the updated link because of the problem with simply VIEWING the Solr 8 docs as offered in the link here.
FWIW, Solr 8 reached end-of-life in 2024 (and Solr 7 ended in 2022). Some good news is that CF2025 comes out of the box with Solr 9.7. (And yes, if one wants to they can setup their own later Solr version that is outside of CF–then point CF to that. That will often “work”, but as far as CF’s intergration via cfsearch, cfcollection and cfindex, that’s only confirmed by Adobe to work with the Solr version provided with that CF version. One can also call out of CF to any solr using cfhttp–that’s really all that cfsearch does, under the covers.)
But we’re getting far afield of the point of this post! 🙂 Again, thanks to Abhishek for the helpful info and resources you have offered here.
You must be logged in to post a comment.