Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External connection on site with HTTP Auth #79

Open
goranseric opened this issue Mar 6, 2018 · 5 comments
Open

External connection on site with HTTP Auth #79

goranseric opened this issue Mar 6, 2018 · 5 comments
Labels
type:bug Something isn't working.
Milestone

Comments

@goranseric
Copy link

Hi guys.

I am having trouble in establishing a valid connection with our staging sites.

All of them are behind Basic HTTP Auth, and it looks like at the moment there is no way around it except removing it and using the recommend Application Passwords plugin.

Is this authorization type permanent solution? It could be an issue for any site that is behind Basic HTTP Auth for any reason.

@tlovett1
Copy link
Member

tlovett1 commented Mar 9, 2018

There is a way to pass basic auth via the url - https://username:password@www.example.com

I know Chrome is moving away from that method. There is another filter you can use here - https://github.com/10up/distributor/blob/master/includes/classes/Authentication.php#L40

@tlovett1 tlovett1 added the type:question Further information is requested. label Mar 9, 2018
@goranseric
Copy link
Author

Hi Taylor.
I am aware of what you have written above, but this is what I found to be a problem, https://github.com/10up/distributor/blob/master/includes/classes/Authentications/WordPressBasicAuth.php#L106.

HTTP Basic Auth header is sent by default and if I add correct one via the provided filter, I am getting limited connectivity and push unavailable notice as it overwrites the one containing admin account info from settings.

If I enter the connection URL in a format https://username:password@www.example.com I get "No connection found".
When HTTP Basic Auth info is added as admin/username combo the following notice is displayed:

Limited connection established. Authentication failed.
Push distribution unavailable.
Pull distribution limited to basic content, i.e. title and content body.

The only way I could get it working is after I have removed HTTP auth we had and added the Application Passwords.

@tlovett1
Copy link
Member

Yep, you're right. We need a way to get around this. Adding this bug to our queue.

@tlovett1 tlovett1 added type:bug Something isn't working. and removed type:question Further information is requested. labels Jul 28, 2018
@jeffpaul jeffpaul added this to the 2.0.0 milestone Apr 4, 2019
@dhanendran
Copy link
Member

Does #368 solved this issue?

@jeffpaul
Copy link
Member

jeffpaul commented Feb 9, 2021

@dhanendran perhaps.

@goranseric have you updated to Distributor 1.6 or later (1.6.2 is current latest) and tried out the new External Connections setup flow to see if that resolves your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

4 participants