forked from docker/midPoint_container
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add demo/grouper scenario
This is basically a clone of demo/complex2s from the laboratory branch. Main differences: 1. Fixed "unknown host directory" error message when building grouper_data container. The initialization script is no longer run at build time in grouper_data. It is instead run at first start of grouper_daemon container, when LDAP server is already up. 2. banderson and sysadmingroup is now created when building LDAP container. So the Grouper resource test action can be executed directly, without the need to prepare midPoint objects for banderson & sysadmingroup first. Note that tests were not updated yet.
Showing
140 changed files
with
7,787 additions
and
2 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,14 @@ | ||
AUTHENTICATION=internal | ||
ENV=demo | ||
REPO_DATABASE_TYPE=mariadb | ||
REPO_JDBC_URL=default | ||
REPO_HOST=midpoint_data | ||
REPO_PORT=default | ||
REPO_DATABASE=registry | ||
REPO_USER=registry_user | ||
REPO_MISSING_SCHEMA_ACTION=create | ||
REPO_UPGRADEABLE_SCHEMA_ACTION=stop | ||
MP_MEM_MAX=2048m | ||
MP_MEM_INIT=1024m | ||
SSO_HEADER=uid | ||
TIMEZONE=UTC |
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,9 @@ | ||
This is a demonstration of using midPoint dockerization for TIER environment in a broader context. It is a work in progress. | ||
|
||
# Building and execution | ||
``` | ||
$ ../../build.sh | ||
$ docker-compose up --build | ||
``` | ||
|
||
Please see a detailed description [here](https://spaces.at.internet2.edu/display/MID/Complex+midPoint+integration+demo). |
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,26 @@ | ||
|
||
def addGroups(gs,stem,owner,regexp) { | ||
for (group in stem.childGroups) { | ||
if (!group.name.endsWith('_includes') && | ||
!group.name.endsWith('_excludes') && | ||
!group.name.endsWith('_systemOfRecord') && | ||
!group.name.endsWith('_systemOfRecordAndIncludes') && | ||
(regexp == null || group.extension ==~ regexp)) { | ||
println 'Adding: ' + group | ||
def s = SubjectFinder.findById(group.getId(), 'group', 'g:gsa') | ||
owner.addMember(s, false) | ||
} else { | ||
println 'Ignoring: ' + group | ||
} | ||
} | ||
} | ||
|
||
gs = GrouperSession.startRootSession() | ||
def supergroup = GroupFinder.findByName(gs, "etc:midpointGroups", true) | ||
def cs = GroupFinder.findByName(gs, "app:cs", true) | ||
|
||
addGroups(gs, StemFinder.findByName(gs, 'ref:affiliation'), supergroup, null) | ||
addGroups(gs, StemFinder.findByName(gs, 'ref:dept'), supergroup, null) | ||
addGroups(gs, StemFinder.findByName(gs, 'ref:course'), supergroup, null) | ||
|
||
addGroups(gs, StemFinder.findByName(gs, 'ref:course'), cs, /CS.*/) |
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,4 @@ | ||
#!/bin/bash | ||
source ../../library.bash | ||
|
||
execute_gsh grouper_grouper_daemon_1 add-ref-groups.gsh |
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,15 @@ | ||
#!/bin/bash | ||
|
||
B='\033[1;33m' | ||
N='\033[0m' | ||
|
||
echo -e "${B} * Uploading objects...${N}" | ||
$(dirname "$0")/upload-objects.sh | ||
|
||
echo -e "${B} * Testing resources...${N}" | ||
$(dirname "$0")/test-resources.sh | ||
|
||
echo -e "${B} * Recomputing Grouper admin group and user object...${N}" | ||
$(dirname "$0")/recompute.sh | ||
|
||
echo -e "${B} * Done${N}" |
Empty file.
71 changes: 71 additions & 0 deletions
71
demo/grouper/configs-and-secrets/grouper/application/grouper-loader.properties
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,71 @@ | ||
################################# | ||
## LDAP connections | ||
################################# | ||
# specify the ldap connection with user, pass, url | ||
# the string after "ldap." is the ID of the connection, and it should not have | ||
# spaces or other special chars in it. In this case is it "personLdap" | ||
|
||
#note the URL should start with ldap: or ldaps: if it is SSL. | ||
#It should contain the server and port (optional if not default), and baseDn, | ||
#e.g. ldaps://ldapserver.school.edu:636/dc=school,dc=edu | ||
ldap.demo.url = ldap://directory:389/dc=internet2,dc=edu | ||
|
||
#optional, if authenticated | ||
ldap.demo.user = cn=admin,dc=internet2,dc=edu | ||
#ldap.demo.user = cn=admin | ||
|
||
#optional, if authenticated note the password can be stored encrypted in an external file | ||
#ldap.demo.pass = ${java.lang.System.getenv().get('SUBJECT_SOURCE_LDAP_PASSWORD_FILE') != null ? org.apache.commons.io.FileUtils.readFileToString(java.lang.System.getenv().get('SUBJECT_SOURCE_LDAP_PASSWORD_FILE'), "utf-8") : java.lang.System.getenv().get('SUBJECT_SOURCE_LDAP_PASSWORD')} | ||
ldap.demo.pass = password | ||
|
||
#optional, if you are using tls, set this to true. Generally you will not be using an SSL URL to use TLS... | ||
ldap.demo.tls = false | ||
|
||
#optional, if using sasl | ||
#ldap.personLdap.saslAuthorizationId = | ||
#ldap.personLdap.saslRealm = | ||
|
||
#optional (note, time limit is for search operations, timeout is for connection timeouts), | ||
#most of these default to vt-ldap defaults. times are in millis | ||
#validateOnCheckout defaults to true if all other validate methods are false | ||
#ldap.personLdap.batchSize = | ||
#ldap.personLdap.countLimit = | ||
#ldap.personLdap.timeLimit = | ||
#ldap.personLdap.timeout = | ||
#ldap.personLdap.minPoolSize = | ||
#ldap.personLdap.maxPoolSize = | ||
#ldap.personLdap.validateOnCheckIn = | ||
#ldap.personLdap.validateOnCheckOut = | ||
#ldap.personLdap.validatePeriodically = | ||
#ldap.personLdap.validateTimerPeriod = | ||
#ldap.personLdap.pruneTimerPeriod = | ||
#if connections expire after a certain amount of time, this is it, in millis, defaults to 300000 (5 minutes) | ||
#ldap.personLdap.expirationTime = | ||
|
||
#make the paths fully qualified and not relative to the loader group. | ||
loader.ldap.requireTopStemAsStemFromConfigGroup=false | ||
|
||
|
||
db.sis.user = sis_user | ||
db.sis.pass = 49321420423 | ||
db.sis.url = jdbc:mysql://sources:3306/sis | ||
db.sis.driver = com.mysql.jdbc.Driver | ||
|
||
|
||
##################################### | ||
## Messaging integration with change log | ||
##################################### | ||
changeLog.consumer.rabbitMqMessagingSample.quartzCron = 0 * * * * ? | ||
|
||
# note, change "messagingSample" in key to be the name of the consumer. e.g. changeLog.consumer.someNameAnyName.class | ||
changeLog.consumer.rabbitMqMessagingSample.class = edu.internet2.middleware.grouper.changeLog.esb.consumer.EsbConsumer | ||
|
||
changeLog.consumer.rabbitMqMessagingSample.publisher.class = edu.internet2.middleware.grouper.changeLog.esb.consumer.EsbMessagingPublisher | ||
changeLog.consumer.rabbitMqMessagingSample.publisher.messagingSystemName = rabbitmq | ||
# note, routingKey property is valid only for rabbitmq. For other messaging systems, it is ignored. | ||
changeLog.consumer.rabbitMqMessagingSample.publisher.routingKey = | ||
## queue or topic | ||
changeLog.consumer.rabbitMqMessagingSample.publisher.messageQueueType = queue | ||
changeLog.consumer.rabbitMqMessagingSample.publisher.queueOrTopicName = sampleQueue | ||
## this is optional if not using "id" for subjectId, need to be a subject attribute in the sources.xml | ||
#changeLog.consumer.rabbitMqMessagingSample.publisher.addSubjectAttributes = email |
112 changes: 112 additions & 0 deletions
112
demo/grouper/configs-and-secrets/grouper/application/grouper.client.properties
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,112 @@ | ||
# | ||
# Copyright 2014 Internet2 | ||
# | ||
# Licensed 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. | ||
# | ||
|
||
# | ||
# Grouper client configuration | ||
# $Id: grouper.client.example.properties,v 1.24 2009-12-30 04:23:02 mchyzer Exp $ | ||
# | ||
|
||
# The grouper client uses Grouper Configuration Overlays (documented on wiki) | ||
# By default the configuration is read from grouper.client.base.properties | ||
# (which should not be edited), and the grouper.client.properties overlays | ||
# the base settings. See the grouper.client.base.properties for the possible | ||
# settings that can be applied to the grouper.client.properties | ||
|
||
######################################## | ||
## LDAP connection settings | ||
######################################## | ||
|
||
# url of directory, including the base DN (distinguished name) | ||
# e.g. ldap://server.school.edu/dc=school,dc=edu | ||
# e.g. ldaps://server.school.edu/dc=school,dc=edu | ||
grouperClient.ldap.url = | ||
|
||
# kerberos principal used to connect to ldap | ||
grouperClient.ldap.login = | ||
|
||
# password for shared secret authentication to ldap | ||
# or you can put a filename with an encrypted password | ||
grouperClient.ldap.password = | ||
|
||
######################################## | ||
## Web service Connection settings | ||
######################################## | ||
|
||
# url of web service, should include everything up to the first resource to access | ||
# e.g. http://groups.school.edu:8090/grouper-ws/servicesRest | ||
# e.g. https://groups.school.edu/grouper-ws/servicesRest | ||
grouperClient.webService.url = https://grouper_ws/grouper-ws/servicesRest | ||
|
||
# kerberos principal used to connect to web service | ||
grouperClient.webService.login = banderson | ||
|
||
# password for shared secret authentication to web service | ||
# or you can put a filename with an encrypted password | ||
grouperClient.webService.password.elConfig = ${java.lang.System.getenv().get('GROUPER_CLIENT_WEBSERVICE_PASSWORD_FILE') != null ? org.apache.commons.io.FileUtils.readFileToString(java.lang.System.getenv().get('GROUPER_CLIENT_WEBSERVICE_PASSWORD_FILE'), "utf-8") : java.lang.System.getenv().get('GROUPER_CLIENT_WEBSERVICE_PASSWORD') } | ||
|
||
|
||
################################ | ||
## Grouper Messaging System | ||
################################ | ||
|
||
# name of messaging system which is the default | ||
grouper.messaging.default.name.of.messaging.system = rabbitmq | ||
|
||
# name of a messaging system. note, "grouperBuiltinMessaging" can be arbitrary | ||
# grouper.messaging.system.grouperBuiltinMessaging.name = grouperBuiltinMessaging | ||
|
||
# class that implements edu.internet2.middleware.grouperClient.messaging.GrouperMessagingSystem | ||
# grouper.messaging.system.grouperBuiltinMessaging.class = edu.internet2.middleware.grouper.messaging.GrouperBuiltinMessagingSystem | ||
|
||
# name of a messaging system. note, "grouperBuiltinMessaging" can be arbitrary | ||
grouper.messaging.system.rabbitmqSystem.name = rabbitmqSystem | ||
|
||
# class that implements edu.internet2.middleware.grouperClient.messaging.GrouperMessagingSystem | ||
grouper.messaging.system.rabbitmqSystem.class = edu.internet2.middleware.grouperMessagingRabbitmq.GrouperMessagingRabbitmqSystem | ||
|
||
# host address of rabbitmq queue | ||
grouper.messaging.system.rabbitmqSystem.host = mq | ||
|
||
# virtual host of rabbitmq queue | ||
grouper.messaging.system.rabbitmqSystem.virtualhost = | ||
|
||
# port of rabbitmq queue | ||
grouper.messaging.system.rabbitmqSystem.port = | ||
|
||
grouper.messaging.system.rabbitmqSystem.defaultPageSize = 10 | ||
|
||
grouper.messaging.system.rabbitmqSystem.maxPageSize = 50 | ||
|
||
|
||
# name of a messaging system, required | ||
grouper.messaging.system.rabbitmq.name = rabbitmq | ||
|
||
# default system settings to this messaging system, note, there is only one level of inheritance | ||
grouper.messaging.system.rabbitmq.defaultSystemName = rabbitmqSystem | ||
|
||
grouper.messaging.system.rabbitmq.user = guest | ||
|
||
#pass | ||
grouper.messaging.system.rabbitmq.password.elConfig = ${java.lang.System.getenv().get('RABBITMQ_PASSWORD_FILE') != null ? org.apache.commons.io.FileUtils.readFileToString(java.lang.System.getenv().get('RABBITMQ_PASSWORD_FILE'), "utf-8") : java.lang.System.getenv().get('RABBITMQ_PASSWORD') } | ||
# set the following three properties if you want to use TLS connection to rabbitmq. All three need to be populated. | ||
# TLS Version | ||
#grouper.messaging.system.rabbitmqSystem.tlsVersion = TLSv1.1 | ||
|
||
# path to trust store file | ||
#grouper.messaging.system.rabbitmqSystem.pathToTrustStore = | ||
|
||
# trust passphrase | ||
#grouper.messaging.system.rabbitmqSystem.trustPassphrase = |
29 changes: 29 additions & 0 deletions
29
demo/grouper/configs-and-secrets/grouper/application/grouper.hibernate.properties
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,29 @@ | ||
# | ||
# Grouper Hibernate Configuration | ||
# $Id: grouper.hibernate.example.properties,v 1.9 2009-08-11 20:18:09 mchyzer Exp $ | ||
# | ||
|
||
# The grouper hibernate config uses Grouper Configuration Overlays (documented on wiki) | ||
# By default the configuration is read from grouper.hibernate.base.properties | ||
# (which should not be edited), and the grouper.hibernate.properties overlays | ||
# the base settings. See the grouper.hibernate.base.properties for the possible | ||
# settings that can be applied to the grouper.hibernate.properties | ||
|
||
######################################## | ||
## DB settings | ||
######################################## | ||
|
||
# e.g. mysql: jdbc:mysql://localhost:3306/grouper | ||
# e.g. p6spy (log sql): [use the URL that your DB requires] | ||
# e.g. oracle: jdbc:oracle:thin:@server.school.edu:1521:sid | ||
# e.g. hsqldb (a): jdbc:hsqldb:dist/run/grouper;create=true | ||
# e.g. hsqldb (b): jdbc:hsqldb:hsql://localhost:9001/grouper | ||
# e.g. postgres: jdbc:postgresql://localhost:5432/database | ||
# e.g. mssql: jdbc:sqlserver://localhost:3280;databaseName=grouper | ||
hibernate.connection.url = jdbc:mysql://grouper_data:3306/grouper?CharSet=utf8&useUnicode=true&characterEncoding=utf8 | ||
|
||
hibernate.connection.username = root | ||
# If you are using an empty password, depending upon your version of | ||
# Java and Ant you may need to specify a password of "". | ||
# Note: you can keep passwords external and encrypted: https://bugs.internet2.edu/jira/browse/GRP-122 | ||
hibernate.connection.password.elConfig = ${java.lang.System.getenv().get('GROUPER_DATABASE_PASSWORD_FILE') != null ? org.apache.commons.io.FileUtils.readFileToString(java.lang.System.getenv().get('GROUPER_DATABASE_PASSWORD_FILE'), "utf-8") : java.lang.System.getenv().get('GROUPER_DATABASE_PASSWORD') } |
25 changes: 25 additions & 0 deletions
25
demo/grouper/configs-and-secrets/grouper/application/grouper.properties
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,25 @@ | ||
# | ||
# Grouper Configuration | ||
# $Id: grouper.example.properties,v 1.48 2009-12-16 06:02:30 mchyzer Exp $ | ||
# | ||
|
||
# Grouper uses Grouper Configuration Overlays (documented on wiki) | ||
# By default the configuration is read from grouper.base.properties | ||
# (which should not be edited), and the grouper.properties overlays | ||
# the base settings. See the grouper.base.properties for the possible | ||
# settings that can be applied to the grouper.properties | ||
|
||
#if groups like the wheel group should be auto-created for convenience (note: check config needs to be on) | ||
configuration.autocreate.system.groups = true | ||
|
||
# A wheel group allows you to enable non-GrouperSystem subjects to act | ||
# like a root user when interacting with the registry. | ||
groups.wheel.use = true | ||
|
||
# Set to the name of the group you want to treat as the wheel group. | ||
# The members of this group will be treated as root-like users. | ||
groups.wheel.group = etc:sysadmingroup | ||
|
||
# Used to allow Include Exclude groups | ||
grouperIncludeExclude.use = true | ||
grouperIncludeExclude.requireGroups.use = true |
1 change: 1 addition & 0 deletions
1
demo/grouper/configs-and-secrets/grouper/application/rabbitmq_password.txt
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 @@ | ||
guest |
Oops, something went wrong.