Ticket #5785 (closed Bugs: worksforme)

Opened 1 year ago

Last modified 1 year ago

authtype=none and still getting web gui admin prompt in 2.10

Reported by: cctelco Assigned to:
Priority: minor Milestone: 2.11
Component: FreePBX Framework Version: 2.10-branch
Keywords: Cc:
Confirmation: Unreviewed Distro:
Backend Engine: Asterisk 10 Distro Ver:
Backend Ver: 10.3.0 SVN Revision (if applicable):

Description

I know quite a few things have changed in 2.10, but I have an issue trying to get authentication workings cleanly. I have apache configured to be the authenticating mechanism with the expectation that FreePBX won't handle any part of it with the exception of providing the ampusers table in the pbx's freepbx database.

Here are my system attributes:

Server: CentOS 6.2 x86_64 FreePBX version: 2.10.0.4 (All modules are only from Basic Repo and updated as of Apr 19, 2012) Asterisk version: 10.3.0

In /etc/amportal.conf I have the following set up for authentication parameters (and I have tried every combination with cleared browser cache to no avail, but this is its current setup):


# Authorization Type # Default Value: database AUTHTYPE=none

# Allow Login With DB Credentials # Default Value: FALSE AMP_ACCESS_DB_CREDS=TRUE ---

I have apache set up to read from the ampusers table like this:

--- <Directory "/var/www/webgui/pbxadmin/">

AllowOverride? AuthConfig? Options Indexes FollowSymLinks? order allow,deny allow from all AuthType? Basic AuthGroupFile? /dev/null AuthName? "PBX Access : Restricted" AuthMySQLEnable On AuthMySQLHost db1dev.classiccitytelco.com AuthMySQLDB 200002_asterisk AuthMySQLUserTable ampusers AuthMySQLUser 200002 AuthMySQLPassword [deleting this from public view] AuthMySQLNameField username AuthMySQLPasswordField password_sha1 AuthMySQLAuthoritative On AuthMySQLPwEncryption sha1 Require valid-user

</Directory> ---

Now the apache authentication works great. When accessing http://[pbx's ip]/pbxadmin/ I get prompted for the password and it is definitely hitting ampusers for that information to test the login attempt against.

My problem comes up in that when I try to access FreePBX in http://[pbx's ip]/pbxadmin/admin/ I get prompted by FreePBX itself for the same authentication information. The exact message says "To get started, please enter your credentials:".

I'm confused as to how exactly to disable that message as it is redundant. I've played around with various configurations of the two amportal.conf entries I stated earlier (again, each time with a clear browser cache) and so far FreePBX will always make me authenticate via its web gui immediately after authenticating properly through apache.

Any idea on how to disable this secondary authentication?

This making me feel like a dunce as this was fairly easy to configure in previous versions of FreePBX :D I'm sure I'm missing something fairly simple.

Thank you, John Knight

Attachments

Screenshot-4.png (44.7 kB) - added by cctelco on 04/19/12 21:35:39.
1) Apache auth is working
Screenshot-5.png (62.0 kB) - added by cctelco on 04/19/12 21:36:15.
2) Then FreePBX asks me again from the web gui

Change History

04/19/12 21:35:39 changed by cctelco

  • attachment Screenshot-4.png added.

1) Apache auth is working

04/19/12 21:36:15 changed by cctelco

  • attachment Screenshot-5.png added.

2) Then FreePBX asks me again from the web gui

04/19/12 21:39:45 changed by cctelco

Cleaner configuration from mangled initial submission:

current amportal auth settings:

# Authorization Type
# Default Value: database
AUTHTYPE=none

# Allow Login With DB Credentials
# Default Value: FALSE
AMP_ACCESS_DB_CREDS=TRUE

Apache configuration for auth using ampusers:

<Directory "/var/www/webgui/pbxadmin/">

AllowOverride AuthConfig
Options Indexes FollowSymLinks
order allow,deny
allow from all
AuthType Basic
AuthGroupFile /dev/null
AuthName "Restricted Area"
AuthMySQLEnable                 On
AuthMySQLHost db1dev.classiccitytelco.com
AuthMySQLDB 200002_asterisk
AuthMySQLUserTable ampusers
AuthMySQLUser 200002
AuthMySQLPassword @Phreak123
AuthMySQLNameField              username
AuthMySQLPasswordField          password_sha1
AuthMySQLAuthoritative          On
AuthMySQLPwEncryption           sha1
Require valid-user

</Directory>

04/20/12 02:24:22 changed by mbrevda

  • status changed from new to closed.
  • resolution set to worksforme.

The ticket tracker is for bugs and feature requests. Please use the the forums or irc for support.

04/22/12 14:50:03 changed by p_lindheimer

you need to use Advanced Settings to change authtype, editing the amportal.conf file is wrong. You may also want to try the setting webuser as opposed to none if you are going to use the msyql table. Beyond that, please use the forum as requested to seek further support as this is all known to work properly.