익명 03:21

How to use mod_auth_openidc to authenticate multiple Google domains?

How to use mod_auth_openidc to authenticate multiple Google domains?

I am using this answer to do authentication for an Apache reverse proxy to Gerrit. However, I'd like to add a second domain as well — so authenticate either against foo.com or bar.com (both of which are google apps domains so google is used for both).

I've tried several obvious things like adding multiple OIDCAuthRequestParams lines and then adding several Require statements (for example: Require claim hd:foo.com and Require claim hd:bar.com) it just accepts the first one I list and ignores the second domain.

When I try to add a comma separated list, it just allows all domains in (for example OIDCAuthRequestParams=foo.com, bar.com). In fact the Require statements don't seem to anything, only the OIDCAuthRequestParams seems to work and only for one domain. Any ideas on how I can make two different domains work given the set up for Gerrit as listed above?

I'm using Apache 2.4 on Ubuntu 15.10 and libapache2-mod-auth-openidc 1.6.0.



Top Answer/Comment:

Those who are following the Gerrit example, what worked for me was to not have a OIDCAuthRequestParams line at all, add the Require claim hd: lines that I needed and remove the Require valid-user line.

If I don't remove the Require valid-user it will allow any Google domain including Gmail.com.

상단 광고의 [X] 버튼을 누르면 내용이 보입니다