Score:0

Authenticate single domain with multiple open id connect clients in Apache webserver

pg flag

I want to be able to use different OIDC clients for authentication in a single domain hosted by a webserver.

This means I want to serve mydomain.example.com and have multiple OIDC clients that are able to connect to this domain.

For one client this easily can be done using mod_oidc in an Apache webserver by providing

OIDCRedirectURI           https://mydomain.example.com/auth0/redirect_uri/
OIDCClientID              CLIENT_ID
OIDCClientSecret          CLIENT_SECRET
OIDCCryptoPassphrase      CRYPTO_PASSPHRASE
OIDCScope                 "scope"
OIDCProviderMetadataURL   https://oidc.mydomain.example.com/.well-known/openid-configuration

But this way I only can allow one OIDC client to access mydomain.example.com.

So my question is how can I achieve this? Is it possible using only one virtual host? Can I configure multiple virtual hosts pointing to the same domain? Or do I need a completely different approach?

Refering to Apache documentation I think using the same domain in different hosts with different OIDC settings will not work because Apache chooses exactly one virtual host for serving a request. This means authentication via OIDC can work only for some requests that are lucky to run into a matching virtual host.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.