One URL for Agents and Customer

Moderator: crythias

Locked
Orichinal
Znuny newbie
Posts: 5
Joined: 02 Sep 2020, 10:43
Znuny Version: 6.0.26
Real Name: Richard

One URL for Agents and Customer

Post by Orichinal »

Hello Guys,

once again i´ve got a question.
I want to use one URL for both types of users. Agents and Customers.

Agents are created automatically out of the Active Directory. Customers too.
I already made it to work. For that i use a Kerberos SSO.
I used the Index.pl URL and as Logout URL the Customer.pl URL. So if a user wasnt allowed to login as Agent he automatically got redirected to the customer login page and got logged in.
But with that solution my system log got full of error messages, of users trying to login as agent.

Is there a better way to solve my request, if not is it bad that there are countless login attempts as agent especially in terms of performance?

Thank you!
Greetings from Germany,
Richi
zzz
Znuny superhero
Posts: 914
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: One URL for Agents and Customer

Post by zzz »

Hello Richi,

If it's okay that your DC generates that many audit logon events, you should be fine.
You should, however, comment out the code that logs the "No UserID found for..." message for failed SSO agent login attempts to keep the logs clear.

Best regards
Emin
Professional Znuny and OTRS services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
Orichinal
Znuny newbie
Posts: 5
Joined: 02 Sep 2020, 10:43
Znuny Version: 6.0.26
Real Name: Richard

Re: One URL for Agents and Customer

Post by Orichinal »

Hey Emin,

okay perfect.
How does that work to filter the system log?
So this message doesn't appear.

Best regards
Richi
zzz
Znuny superhero
Posts: 914
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: One URL for Agents and Customer

Post by zzz »

In Kernel/System/Auth/HTTPBasicAuth.pm l:70-77

Turn

Code: Select all

    if ( !$User ) {
        $Kernel::OM->Get('Kernel::System::Log')->Log(
            Priority => 'notice',
            Message =>
                "User: No \$ENV{REMOTE_USER} or \$ENV{HTTP_REMOTE_USER} !(REMOTE_ADDR: $RemoteAddr).",
        );
        return;
    }
into

Code: Select all

    if ( !$User ) {
#        $Kernel::OM->Get('Kernel::System::Log')->Log(
#            Priority => 'notice',
#            Message =>
#                "User: No \$ENV{REMOTE_USER} or \$ENV{HTTP_REMOTE_USER} !(REMOTE_ADDR: $RemoteAddr).",
#        );
        return;
    }
— Emin
Professional Znuny and OTRS services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
Orichinal
Znuny newbie
Posts: 5
Joined: 02 Sep 2020, 10:43
Znuny Version: 6.0.26
Real Name: Richard

Re: One URL for Agents and Customer

Post by Orichinal »

Thank you very much Emin.
Worked perfectly fine!

Looks like a good solution for me. Have a great day.
Locked