From 58addf75edacf35e162c0756ba63062896c49a38 Mon Sep 17 00:00:00 2001 From: John Gasper Date: Mon, 29 Jan 2018 15:43:36 -0800 Subject: [PATCH] Added some additional details; setup authn for the SCIM Server; commented out the default WS/SCIM tomcat-users's accounts with its default password(s). --- README.md | 13 ++++- container_files/tomcat/conf/tomcat-users.xml | 46 +++++++++++++++++ container_files/tomee/conf/tomcat-users.xml | 51 +++++++++++++++++++ test-compose/README.md | 3 +- test-compose/scim/Dockerfile | 3 ++ .../scim/container_files/tomcat-users.xml | 51 +++++++++++++++++++ test-compose/scim/container_files/web.xml | 30 +++++++++++ test-compose/ws/Dockerfile | 5 +- .../container_files/{tomcat => }/server.xml | 4 +- .../ws/container_files/tomcat-users.xml | 46 +++++++++++++++++ .../ws/container_files/{WEB-INF => }/web.xml | 0 11 files changed, 246 insertions(+), 6 deletions(-) create mode 100644 container_files/tomcat/conf/tomcat-users.xml create mode 100644 container_files/tomee/conf/tomcat-users.xml create mode 100644 test-compose/scim/container_files/tomcat-users.xml create mode 100644 test-compose/scim/container_files/web.xml rename test-compose/ws/container_files/{tomcat => }/server.xml (95%) create mode 100644 test-compose/ws/container_files/tomcat-users.xml rename test-compose/ws/container_files/{WEB-INF => }/web.xml (100%) diff --git a/README.md b/README.md index 78470a7..646ead5 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ Amongst others variables defined in the `catalina.sh`, the following variables w # File System Endpoints -Here is a list of significant directories and files that deployers should be aware of. +Here is a list of significant directories and files that deployers should be aware of: - `/opt/grouper/conf/`: a common directory to place non-sensitive config files that will be placed into the appropriate location for each Grouper component at container start-up. - `/opt/grouper/lib/`: a common directory to place additional jar files that will be placed into the appropriate location for each Grouper component at container start-up. @@ -214,6 +214,15 @@ Here is a list of significant directories and files that deployers should be awa To examine baseline image files, one might run `docker run --name=temp -it tier/grouper bash` and browse through these file system endpoints. While the container is running one may copy files out of the image/container using something like `docker cp containerId:/opt/grouper/grouper.api/conf/grouper.properties .`, which will copy the `grouper.properties` to the Docker client's present working directory. These files can then be edited and applied via the mechanisms outlined above. +# Web Application Endpoints +Here is a list of significant web endpoints that deployers should be aware of: + +- `/grouper/`: location of the Grouper UI application +- `grouper-ws/`: location of the Grouper WS application. +- `/grouper-ws-scim/`: location of the Grouper SCIM Server application. + +The endpoint that is available is dependent upon the role of the container. + # Provisioning a Grouper Database Using standard methods, create a MariaDb Server and an empty Grouper database. Create a database user with privileges to create and populate schema objects. Set the appropriate database connection properties in `grouper.hibernate.properties`. Be sure to the user created with schema manipulation privileges as the db user. @@ -232,6 +241,8 @@ Note: a less privileged database user maybe used when running the typical Groupe - [HTTP Strict Transport Security (HSTS)](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) is enabled on the Apache HTTP Server. - morphStrings functionality in Grouper is supported. It is recommended that the various morphString files be associated with the containers as Docker Secrets. Set the configuration file properties to use `/var/run/secrets/secretname`. +- Grouper UI has been pre-configured to authenticate users via Shibboleth SP. +- By default, Grouper WS (hosted by `/opt/tomcat/`) and the Grouper SCIM Server (hosted by `/opt/tomee/`) use tomcat-users.xml for authentication, but by default no users are enabled. LDAP-backed authentication or other methods can be used and must be configured by the deployer. # License diff --git a/container_files/tomcat/conf/tomcat-users.xml b/container_files/tomcat/conf/tomcat-users.xml new file mode 100644 index 0000000..cef36cd --- /dev/null +++ b/container_files/tomcat/conf/tomcat-users.xml @@ -0,0 +1,46 @@ + + + + + + + + + \ No newline at end of file diff --git a/container_files/tomee/conf/tomcat-users.xml b/container_files/tomee/conf/tomcat-users.xml new file mode 100644 index 0000000..f1484fc --- /dev/null +++ b/container_files/tomee/conf/tomcat-users.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/test-compose/README.md b/test-compose/README.md index 8145494..d1d7199 100644 --- a/test-compose/README.md +++ b/test-compose/README.md @@ -39,8 +39,9 @@ This command will clear out any remaining containers, as defined by the `docker- The components can be accessed at the following urls, with -Grouper UI: https://localhost/grouper (username: banderson, password: password) +Grouper UI: https://localhost/grouper (username: banderson, password: password (from ldap) or password1 (from tomcat-users.xml)) Grouper WS: https://localhost:8443/grouper-ws/status?diagnosticType=all +Grouper SCIM: https://localhost:9443/grouper-ws-scim/ (username: banderson, password: password (from tomcat-users.xml)) RabbmitMQ: http://localhost:15672/ (username: guest, password: guest) MariaDB: Port 3306 (username: root, password: (no password) ) 389-ds Directory: Port 389 (username: cn=Directory Manager, password: password) diff --git a/test-compose/scim/Dockerfile b/test-compose/scim/Dockerfile index 52bfb24..6b62e1f 100644 --- a/test-compose/scim/Dockerfile +++ b/test-compose/scim/Dockerfile @@ -2,4 +2,7 @@ FROM tier/grouper:latest LABEL author="tier-packaging@internet2.edu " +COPY container_files/web.xml /opt/grouper/grouper.scim/WEB-INF/ +COPY container_files/tomcat-users.xml /opt/tomee/conf/ + CMD ["scim"] diff --git a/test-compose/scim/container_files/tomcat-users.xml b/test-compose/scim/container_files/tomcat-users.xml new file mode 100644 index 0000000..be015e1 --- /dev/null +++ b/test-compose/scim/container_files/tomcat-users.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/test-compose/scim/container_files/web.xml b/test-compose/scim/container_files/web.xml new file mode 100644 index 0000000..c57461b --- /dev/null +++ b/test-compose/scim/container_files/web.xml @@ -0,0 +1,30 @@ + + + + + + Web services + /* + + + * + + + + + + BASIC + Grouper Application + + + + + + The role that is required to log in to web service + + * + + + \ No newline at end of file diff --git a/test-compose/ws/Dockerfile b/test-compose/ws/Dockerfile index b163f51..f5c06b9 100644 --- a/test-compose/ws/Dockerfile +++ b/test-compose/ws/Dockerfile @@ -2,7 +2,8 @@ FROM tier/grouper:latest LABEL author="tier-packaging@internet2.edu " -COPY container_files/WEB-INF/ /opt/grouper/grouper.ws/WEB-INF/ -COPY container_files/tomcat/ /opt/tomcat/conf/ +COPY container_files/web.xml /opt/grouper/grouper.ws/WEB-INF/ +COPY container_files/tomcat-users.xml /opt/tomcat/conf/ +COPY container_files/server.xml /opt/tomcat/conf/ CMD ["ws"] diff --git a/test-compose/ws/container_files/tomcat/server.xml b/test-compose/ws/container_files/server.xml similarity index 95% rename from test-compose/ws/container_files/tomcat/server.xml rename to test-compose/ws/container_files/server.xml index 1b9f22d..3c29b31 100644 --- a/test-compose/ws/container_files/tomcat/server.xml +++ b/test-compose/ws/container_files/server.xml @@ -142,7 +142,7 @@ that are performed against this UserDatabase are immediately available for use by the Realm. --> + resourceName="UserDatabase"/> + allRolesMode="authOnly" /> + + + + + + + \ No newline at end of file diff --git a/test-compose/ws/container_files/WEB-INF/web.xml b/test-compose/ws/container_files/web.xml similarity index 100% rename from test-compose/ws/container_files/WEB-INF/web.xml rename to test-compose/ws/container_files/web.xml