Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2016-02-22 03:06:49

jstephens576
Member
Registered: 2016-01-26
Posts: 31

API Key Code 401 on Check Authentication

If I turn on htaccess authentication through my dreamhost admin "goodies" - It breaks the authentication in publisher. I get an error "Error performing function. (Code: 401)" when I enable the security, works fine when I disable it. Is there a user name I can add to the "user accounts for this area" to allow htaccess (it requires username password) to allow the publisher service to update? Is there something else I need to set? if so, what?
Thanks

Offline

#2 2016-02-22 10:15:43

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: API Key Code 401 on Check Authentication

How about adding an .htaccess file w/o access control inside the ttg-be folder? This way you have access control for your site, but disable it for the ttg-be directory where none of your images/content resides?


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#3 2016-02-22 11:02:31

jstephens576
Member
Registered: 2016-01-26
Posts: 31

Re: API Key Code 401 on Check Authentication

I understand that would probably be a good solution - Here is the current contents of the .htaccess file in the top level directory
### Generated by Dreamhost. DO NOT modify!!! ###
AuthType Basic
AuthUserFile /home/stephens576/stephens-gallery.com/.htpasswd
AuthName "Members Area"
require valid-user
################################################

I have limited knowledge of this. Can you advise on what the .htaccess file content should be in the ttg-be directory?
Thanks again

Offline

#4 2016-02-22 19:07:53

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: API Key Code 401 on Check Authentication

Publisher doesn't provide a place to add htaccess authentication credentials.  The only location within ttg-be that needs protection is ttg-be/data.  That directory should already have in it an .htaccess file with the following contents:

Deny from all
Options All -Indexes

You can test that this is working for you by browsing to /ttg-be/data on your server.  You should receive a 503 forbidden.  Adding an html file into the directory, e.g. /ttg-be/data/test.html should also result in a 503.

If you really want to add .htaccess to ttg-be, do so in directories other than /ttg-be/publisher.  e.g. /ttg-be/admin/

Offline

#5 2016-02-23 04:50:27

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: API Key Code 401 on Check Authentication

Ben, the reason to add an .htaccess to ttg-be is because jstephens576 wants to protect his main site. Since Publisher doesn't support authentication credentials, this has to be disabled for ttg-be.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#6 2016-02-23 04:55:34

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: API Key Code 401 on Check Authentication

jstephens576,

The new .htaccces file in ttg-be should just contain this:

Satisfy Any

Or in case you are running on apache 2.4

Require all granted

Once you have added this and Publisher works, check that you can't access /ttg-be/data.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#7 2016-02-23 05:27:30

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: API Key Code 401 on Check Authentication

Placing that .htaccess file withing ttg-be/publisher should fix the Publisher authentication without also removing htpasswd protection from the rest of ttg-be (less data).

Offline

#8 2016-02-23 07:00:46

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: API Key Code 401 on Check Authentication

I've added basic HTTP authentication support in the Publisher LR plugin. It works well in my testing. Let me know if you're keen on trying it out and I will email you a copy.

Offline

#9 2016-02-27 22:39:07

jstephens576
Member
Registered: 2016-01-26
Posts: 31

Re: API Key Code 401 on Check Authentication

Thanks for the discussion - Ben  - I will try your advice below and would be the willing to give for update for the LR plugin a try. email jstephens576@gmail.com
Thanks!

Offline

#10 2016-02-29 10:53:37

jstephens576
Member
Registered: 2016-01-26
Posts: 31

Re: API Key Code 401 on Check Authentication

dl - your .htaccess in the publisher directory above worked well. data still protected
Thank you.

Offline

Board footer

Powered by FluxBB