-
Notifications
You must be signed in to change notification settings - Fork 61
mod auth openidc setup authentication
Mike Schwartz edited this page Dec 20, 2019
·
8 revisions
Based on instructions on mod_auth_oidc doc
- Gluu Server 4.0.
- Apache 2 web server
- mod_auth_openidc plugin
- Log in to oxtrust admin panel.
- Navigate to OpenID connect
- In client section, click on add client.
- Create a client by providing appropriate login redirect_uri, scope , grant uri and response type.
- Note down client secret and client id.
- Login in to oxtrust admin panel.
- In Configuration section move to manage custom script.
- Enable and setup duo script by following the document (https://gluu.org/docs/ce/authn-guide/duo/)
Note Since we don't need duo as default authentication so don't enable under Configuration > Manage Authentication > Default Authentication Method.
We need to setup two authentication for two level of the site, suppose top level '/' only requires password authentication while within the site, there is folder '/2fa' which requires two factor authentication.
vi /etc/apache2/sites-available/default-ssl.conf
OIDCProviderMetadataURL <gluu server host name>/.well-known/openid-configuration
OIDCClientID client id
OIDCClientSecret client secret
OIDCRedirectURI <web server hostname >
OIDCResponseType code
OIDCScope "openid profile email"
OIDCSSLValidateServer Off
OIDCCryptoPassphrase test1
OIDCPassClaimsAs environment
OIDCClaimPrefix USERINFO_
OIDCPassIDTokenAs payload
<Location "/">
Require valid-user
AuthType openid-connect
</ Location>
<Location "/2fa/">
AuthType openid-connect
Require claim acr:duo
OIDCUnAutzAction auth
OIDCPathAuthRequestParams acr_values=duo
Require valid-user
</ Location>