-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first round of changes for spring 2023 registry and match training
- Loading branch information
Showing
7 changed files
with
253 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| version: '3.7' | ||
|
|
||
| services: | ||
|
|
||
| matchdatabase: | ||
| image: postgres:14.7 | ||
| volumes: | ||
| - /srv/docker/var/lib/postgresql/data:/var/lib/postgresql/data | ||
| - /srv/docker/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d | ||
| environment: | ||
| - POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password | ||
| - COMANAGE_MATCH_DATABASE_USER_PASSWORD_FILE=/run/secrets/comanage_match_database_user_password | ||
| secrets: | ||
| - comanage_match_database_user_password | ||
| - postgres_password | ||
| deploy: | ||
| replicas: 1 | ||
| logging: | ||
| driver: journald | ||
| options: | ||
| tag: "postgresql-{{.Name}}" | ||
|
|
||
| match: | ||
| image: i2incommon/comanage-match:1.1.0-internet2-tap-1 | ||
| volumes: | ||
| - /srv/docker/srv/comanage-match/local:/srv/comanage-match/local | ||
| - /srv/docker/etc/shibboleth/shibboleth2.xml:/etc/shibboleth/shibboleth2.xml | ||
| - /srv/docker/etc/shibboleth/attribute-map.xml:/etc/shibboleth/attribute-map.xml | ||
| - /srv/docker/etc/shibboleth/idp-metadata.xml:/etc/shibboleth/idp-metadata.xml | ||
| - /srv/docker/etc/httpd/conf.d/000-comanagematch.conf:/etc/httpd/conf.d/000-comanage.conf | ||
| environment: | ||
| - COMANAGE_REGISTRY_ADMIN_GIVEN_NAME=Carla | ||
| - COMANAGE_REGISTRY_ADMIN_FAMILY_NAME=Woo | ||
| - COMANAGE_MATCH_ADMIN_USERNAME=carla.woo@comanage.incommon.training | ||
| - COMANAGE_MATCH_DATASOURCE=Database/Postgres | ||
| - COMANAGE_MATCH_DATABASE=match | ||
| - COMANAGE_MATCH_DATABASE_HOST=matchdatabase | ||
| - COMANAGE_MATCH_DATABASE_USER=match_user | ||
| - COMANAGE_MATCH_DATABASE_USER_PASSWORD_FILE=/run/secrets/comanage_match_database_user_password | ||
| - COMANAGE_MATCH_EMAIL_TRANSPORT=Smtp | ||
| - COMANAGE_MATCH_EMAIL_HOST=tls://smtp.gmail.com | ||
| - COMANAGE_MATCH_EMAIL_PORT=465 | ||
| - COMANAGE_MATCH_EMAIL_ACCOUNT=comanagetraining@gmail.com | ||
| - COMANAGE_MATCH_EMAIL_ACCOUNT_PASSWORD_FILE=/run/secrets/comanage_registry_email_account_password | ||
| - COMANAGE_MATCH_EMAIL_FROM_EMAIL=comanagetraining@gmail.com | ||
| - COMANAGE_MATCH_EMAIL_FROM_NAME=Match | ||
| - SHIBBOLETH_SP_ENCRYPT_CERT=/run/secrets/shibboleth_sp_encrypt_cert | ||
| - SHIBBOLETH_SP_ENCRYPT_PRIVKEY=/run/secrets/shibboleth_sp_encrypt_privkey | ||
| - SHIBBOLETH_SP_SIGNING_CERT=/run/secrets/shibboleth_sp_signing_cert | ||
| - SHIBBOLETH_SP_SIGNING_PRIVKEY=/run/secrets/shibboleth_sp_signing_privkey | ||
| secrets: | ||
| - comanage_match_database_user_password | ||
| - comanage_registry_email_account_password | ||
| - shibboleth_sp_encrypt_cert | ||
| - shibboleth_sp_encrypt_privkey | ||
| - shibboleth_sp_signing_cert | ||
| - shibboleth_sp_signing_privkey | ||
| ports: | ||
| - "80:80" | ||
| deploy: | ||
| replicas: 1 | ||
| logging: | ||
| driver: journald | ||
| options: | ||
| tag: "match_{{.Name}}" | ||
|
|
||
|
|
||
| secrets: | ||
| comanage_registry_email_account_password: | ||
| external: true | ||
| shibboleth_sp_encrypt_cert: | ||
| external: true | ||
| shibboleth_sp_encrypt_privkey: | ||
| external: true | ||
| shibboleth_sp_signing_cert: | ||
| external: true | ||
| shibboleth_sp_signing_privkey: | ||
| external: true | ||
| comanage_match_database_user_password: | ||
| external: true | ||
| postgres_password: | ||
| external: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/bin/bash -x | ||
| set -e | ||
|
|
||
| declare COMANAGE_MATCH_DATABASE_USER_PASSWORD=$(< ${COMANAGE_MATCH_DATABASE_USER_PASSWORD_FILE}) | ||
|
|
||
| psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL | ||
| CREATE USER match_user PASSWORD '${COMANAGE_MATCH_DATABASE_USER_PASSWORD}'; | ||
| CREATE DATABASE match; | ||
| GRANT ALL PRIVILEGES ON DATABASE match TO match_user; | ||
| EOSQL | ||
|
|
||
| psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname match <<-EOSQL | ||
| CREATE EXTENSION fuzzystrmatch; | ||
| EOSQL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # COmanage Match Apache HTTP Server configuration | ||
| # | ||
| # Portions licensed to the University Corporation for Advanced Internet | ||
| # Development, Inc. ("UCAID") under one or more contributor license agreements. | ||
| # See the NOTICE file distributed with this work for additional information | ||
| # regarding copyright ownership. | ||
| # | ||
| # UCAID licenses this file to you under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with the | ||
| # License. You may obtain a copy of the License at: | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| <VirtualHost *:80> | ||
|
|
||
| ServerName https://{{ public_fqdn }}:443 | ||
| UseCanonicalName On | ||
|
|
||
| DocumentRoot /var/www/html | ||
|
|
||
| RedirectMatch ^/$ /match/ | ||
|
|
||
| PassEnv ENV | ||
| PassEnv USERTOKEN | ||
|
|
||
| ErrorLogFormat "httpd;ssl_error_log;%{ENV}e;%{USERTOKEN}e;[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i" | ||
| ErrorLog /tmp/logpipe | ||
| LogLevel warn | ||
|
|
||
| LogFormat "httpd;ssl_access_log;%{ENV}e;%{USERTOKEN}e;%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" ssl_combined | ||
| CustomLog /tmp/logpipe ssl_combined | ||
|
|
||
| <Directory /var/www/html/match> | ||
| Options Indexes FollowSymLinks | ||
| DirectoryIndex index.php | ||
| AllowOverride All | ||
| Require all granted | ||
| </Directory> | ||
|
|
||
| <Location "/Shibboleth.sso"> | ||
| SetHandler shib | ||
| </Location> | ||
|
|
||
| <Directory /var/www/html/match/auth/login> | ||
| AuthType shibboleth | ||
| ShibRequestSetting requireSession 1 | ||
| Require valid-user | ||
| </Directory> | ||
|
|
||
| <Location /> | ||
| AuthType shibboleth | ||
| Require shibboleth | ||
| </Location> | ||
|
|
||
| RewriteEngine On | ||
| RewriteCond %{QUERY_STRING} !after_redirect | ||
| RewriteRule ^/match/auth/logout.* https://%{HTTP_HOST}/Shibboleth.sso/Logout?return=https://%{HTTP_HOST}/match/auth/logout/?after_redirect [L,R] | ||
|
|
||
| </VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters