EasyEngine / auth-command

4 stars 9 forks source link

global auth for all sites is not disabled after deleting user #34

Open aronwp opened 5 years ago

aronwp commented 5 years ago

when creating a new global auth user i.e "ee auth create global" it password protects all sites. deleting the new user does not deactivate the password prompt on all sites. on https://easyengine.io/commands/auth/delete/ it says use the command below but it does not work

Remove global auth on all sites (but not admin tools) with default username(easyengine) $ ee auth delete example.com --site

Error: Parameter errors: unknown --site parameter

I found a workaround by running ee global auth delete (this deletes all users and generates a new auth for ee-admin tools) after you will need to create a new auth for any site on the server i.e "ee auth create example.com" and then delete "ee auth delete example.com"

these steps remove the password prompt from all sites.

mrrobot47 commented 5 years ago

@aronwp to remove the global auth the syntax is ee auth delete global. The syntax in handbook is outdated. Thank you for noticing and reporting the issue. This will be fixed asap.

aronwp commented 5 years ago

@mrrobot47 thanks but it's still not working correctly. The ee auth delete global command deletes the global auth user but the password box still appears on all sites. The only way to remove global auth from sites is after ee auth delete global need to run ee auth create example.com and then ee auth delete example.com and then the password box is removed from all sites.

Basically the ee auth delete global removes the user but not the htpasswd for global auth

mbtamuli commented 5 years ago

@mrrobot47 This looks like a problem. Reopening this issue. Let's investigate the cause of this issue and fix it.

PiyushKhurana commented 2 years ago

Since both HTTP Auth and IP Whitelisting are implemented in similar way the above problem can also occur in case of removing global ip whitelisting from the site using ee auth delete global --ip

Steps to produce the issue :-

the global ip whitelisting is not removed from the site example.test because the site specific ip whitelisting file example.test_acl remains undeleted

PiyushKhurana commented 2 years ago

Since both HTTP Auth and IP Whitelisting are implemented in similar way the above problem can also occur in case of removing global ip whitelisting from the site using ee auth delete global --ip

Steps to produce the issue :-

  • Ensure site specific ip whitelisting or add using below command :- ee auth create example.test --ip=1.1.1.1 _(this creates example.testacl)
  • Ensure global ip whitelisting or add using below command :- ee auth create global --ip=8.8.8.8 _(this creates defaultacl)
  • Now when we remove site specific ip whitelisting ee auth delete example.test --ip _(updates example.testacl)
  • and then remove global ip whitelisting ee auth delete global --ip _(deletes defaultacl)

the global ip whitelisting is not removed from the site example.test because the site specific ip whitelisting file example.test_acl remains undeleted

PR updated https://github.com/EasyEngine/auth-command/pull/53 Fix here https://github.com/EasyEngine/auth-command/pull/53/commits/46571f7a84bffab0041efb58f2ddbe5f0d1951a3