On 1/3/19 5:33 PM, kelly.close@lrewater.com wrote:
Thanks Mark. I keep coming back to this and checking it again and again. The two keys match, and there are no quotes on the api_key.
This is what I thought the problem was from the start but I just can't see anything wrong with those two settings. I'm going to look again - maybe entirely re-type the lines - what if there is a trailing space or something...
I don't think trailing white space on the api_key setting is significant, and whitespace following the trailing quote in the MAILMAN_ARCHIVER_KEY setting is not significant, but embedded whitespace in the key itself could be an issue.
Possibly Mailman and/or Hyperkitty aren't getting this info from the files you think they are. The command that you use to start Mailman should have a -C option pointing to Mailman's config. That in turn has a [archiver.hyperkitty] section pointing to the Mailman Hyperkitty config. That in turn contains the api_key.
Then whatever process you use to run the wsgi application will set DJANGO_SETTINGS_MODULE in it's environment to point to settings.py or whatever you call it (without the .py extension) and that in turn imports overrides from settings_local.py. You need to understand what the working directory is of the process that imports the DJANGO_SETTINGS_MODULE.
If you need more info, you could try modifying hyperkitty/hyperkitty/views/mailman.py at around lines 64 - 68 to:
if request.GET.get("key") != settings.MAILMAN_ARCHIVER_KEY:
return HttpResponse(
"""<html><title>Auth required</title><body>
<h1>Authorization Required</h1>
{} != {}</body></html>"""
.format(request.GET.get("key"),
settings.MAILMAN_ARCHIVER_KEY),
content_type="text/html", status=401)
This should display the values that don't match as part of the error response. Note that this is Python and leading whitespace is significant and if you're reading this in HyperKitty, you won't see it unless you "display in fixed font" (the "A" icon), and even then, there may be line wrap.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan