[Closed] Remote Authentication (with Azure AD)

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
wyphorn
Posts: 2
Joined: Wed May 12, 2021 1:36 am

[Closed] Remote Authentication (with Azure AD)

Post by wyphorn »

Hi,

I am trying to get remote authentication run.
For testing purposes I just added

<Location />
RequestHeader set REMOTE_USER "admin"
</Location>

to my apache configuration. I created some small php page which is displaying, that the REMOTE_USER RequestHeader is filled with "admin", which will result in a page like:

Code: Select all

Host: my.domain
Connection: keep-alive
sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="90", "Google Chrome";v="90"
sec-ch-ua-mobile: ?0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: ZMSESSID=jboduse5qjv9jti3v11ud9g7m2
REMOTE_USER: admin
So I tried to browse to my https://my.domain/zm URL. But I will not logged in although I changed the AUTH_TYPE to "remote".

What did I missed?

In future I try to connect my Azure AD with apache auth_mod_mellon and use the SAML claim with username mapping to Zoneminder.
Last edited by wyphorn on Thu May 13, 2021 1:51 am, edited 1 time in total.
wyphorn
Posts: 2
Joined: Wed May 12, 2021 1:36 am

Re: Remote Authentication (with Azure AD)

Post by wyphorn »

Ok, I solved my problem.

mod_auth_mellon always add a remote-user based on its nameid from SAML response in default.
you can set it with 'MellonUser "<attribute>"'
Then my nameid-format was wrong. Once I set the nameid-format in my SP metadata definition to "nameid-format:emailAddress", mellon will use my email address as nameid and this nameid as "REMOTE_USER".

Now I can access my users in zoneminder with the email adress as username. With this, I learned a lot new things with apache and mellon. And I did some debugging in zoneminder.

My users are now able to browse the zoneminder gui with their azure ad accounts. thats really nice.
Post Reply