Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move API OpenID-Connect support to Apache configuration #282

Merged
merged 4 commits into from
May 8, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,36 @@ LoadModule auth_openidc_module modules/mod_auth_openidc.so
ServerName https://<%= miq_appliance %>
LogLevel warn

OIDCProviderMetadataURL <%= oidc_provider_metadata_url %>
OIDCCLientID <%= oidc_client_id %>
OIDCClientSecret <%= oidc_client_secret %>
OIDCRedirectURI https://<%= miq_appliance %>/oidc_login/redirect_uri
OIDCCryptoPassphrase sp-cookie
OIDCOAuthRemoteUserClaim username
OIDCProviderMetadataURL <%= oidc_provider_metadata_url %>
OIDCCLientID <%= oidc_client_id %>
OIDCClientSecret <%= oidc_client_secret %>
OIDCRedirectURI https://<%= miq_appliance %>/oidc_login/redirect_uri
OIDCCryptoPassphrase sp-cookie
OIDCOAuthRemoteUserClaim username
OIDCOAuthClientID <%= oidc_client_id %>
OIDCOAuthClientSecret <%= oidc_client_secret %>
OIDCOAuthIntrospectionEndpoint <%= oidc_oauth_introspection_endpoint %>
OIDCOAuthIntrospectionEndpointAuth client_secret_post

<Location /oidc_login>
AuthType openid-connect
Require valid-user
</Location>

<LocationMatch ^/api(?!\/(v[\d\.]+\/)?product_info$)>
SetEnvIf Authorization '^Basic +YWRtaW46' let_admin_in
SetEnvIf X-Auth-Token '^.+$' let_api_token_in
SetEnvIf X-MIQ-Token '^.+$' let_sys_token_in
SetEnvIf X-CSRF-Token '^.+$' let_csrf_token_in

AuthType oauth20
AuthName "External Authentication (oauth20) for API"
Fryguy marked this conversation as resolved.
Show resolved Hide resolved

Require valid-user
Order Allow,Deny
Allow from env=let_admin_in
Allow from env=let_api_token_in
Allow from env=let_sys_token_in
Allow from env=let_csrf_token_in
Satisfy Any
</LocationMatch>