Skip to content

Commit

Permalink
Added .htaccess for mod_auth_openidc for name environment
Browse files Browse the repository at this point in the history
Added a modified .htaccess file that is COPY'd into the image from the
Dockerfile. The modified .htaccess file adds three RewriteRule lines
to add environment variables OIDC_CLAIM_NAME_GIVEN,
OIDC_CLAIM_NAME_FAMILY, and OIDC_CLAIM_NAME_MIDDLE if the standard
OIDC claims are asserted so that they can then be consumed during
an enrollment flow as the default value for a name entry such as
Name (Official, CO Person).
  • Loading branch information
skoranda committed Mar 24, 2018
1 parent b710fc3 commit d182d37
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions comanage-registry-mod-auth-openidc/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ RUN mkdir -p "$COMANAGE_REGISTRY_DIR" \

COPY docker-comanage-entrypoint /usr/local/bin/

COPY htaccess /srv/comanage-registry/app/webroot/.htaccess

# expose COmanage Registry local directory
VOLUME ["/local"]

Expand Down
11 changes: 11 additions & 0 deletions comanage-registry-mod-auth-openidc/htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]

RewriteRule .* - [E=OIDC_CLAIM_NAME_GIVEN:%{HTTP:OIDC_CLAIM_given_name}]
RewriteRule .* - [E=OIDC_CLAIM_NAME_FAMILY:%{HTTP:OIDC_CLAIM_family_name}]
RewriteRule .* - [E=OIDC_CLAIM_NAME_MIDDLE:%{HTTP:OIDC_CLAIM_middle_name}]

</IfModule>

0 comments on commit d182d37

Please sign in to comment.