generated from apereo/cas-overlay-template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/upgrade-to-cas-6.6' into upgrade…
…-to-cas-6.6 # Conflicts: # gradle.properties
- Loading branch information
Showing
15 changed files
with
188 additions
and
17 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,51 @@ | ||
# Quick reference | ||
|
||
- **Maintained by**: | ||
[georchestra.org](https://www.georchestra.org/) | ||
|
||
- **Where to get help**: | ||
the [geOrchestra Github repo](https://github.com/georchestra/georchestra), [IRC chat](https://kiwiirc.com/nextclient/irc.libera.chat/georchestra), Stack Overflow | ||
|
||
# Featured tags | ||
|
||
- `latest`, `23.0.x` | ||
|
||
# Quick reference | ||
|
||
- **Where to file issues**: | ||
[https://github.com/georchestra/georchestra/issues](https://github.com/georchestra/georchestra/issues) | ||
[https://github.com/georchestra/georchestra-cas-server/issues](https://github.com/georchestra/georchestra-cas-server/issues) | ||
|
||
- **Supported architectures**: | ||
[`amd64`](https://hub.docker.com/r/amd64/docker/) | ||
|
||
- **Source of this description**: | ||
[docs repo's directory](https://github.com/georchestra/georchestra-cas-server/blob/master/DOCKER_HUB.md) | ||
|
||
# What is `georchestra/cas` | ||
|
||
**CAS** is a module for geOrchestra which offers | ||
- Single Sign On (SSO) for all geOrchestra webapps with a custom interface | ||
- Authentication against a LDAP directory | ||
|
||
# How to use this image | ||
|
||
As for every other geOrchestra webapp, its configuration resides in the data directory ([datadir](https://github.com/georchestra/datadir)), typically something like /etc/georchestra, where it expects to find a cas sub-directory. | ||
|
||
It is recommended to use the official docker composition: https://github.com/georchestra/docker. | ||
|
||
For this specific component, see the section `cas` in the [`georchestra/docker/docker-compose.yml`](https://github.com/georchestra/docker/blob/master/docker-compose.yml) file. | ||
|
||
## Where is it built | ||
|
||
This image is built using Dockerfile in `cas` repo. | ||
|
||
# License | ||
|
||
View [license information](https://www.georchestra.org/software.html) for the software contained in this image. | ||
|
||
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). | ||
|
||
[//]: # (Some additional license information which was able to be auto-detected might be found in [the `repo-info` repository's georchestra/ directory]().) | ||
|
||
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. |
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
File renamed without changes.
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,20 @@ | ||
#!/bin/bash | ||
|
||
DIR=/docker-entrypoint.d | ||
|
||
# Executing custom scripts located in CUSTOM_SCRIPTS_DIRECTORY if environment variable is set | ||
if [[ -z "${CUSTOM_SCRIPTS_DIRECTORY}" ]]; then | ||
echo "[INFO] No CUSTOM_SCRIPTS_DIRECTORY env variable set" | ||
else | ||
echo "[INFO] CUSTOM_SCRIPTS_DIRECTORY env variable set to ${CUSTOM_SCRIPTS_DIRECTORY}" | ||
cp -v "${CUSTOM_SCRIPTS_DIRECTORY}"/* "$DIR" | ||
echo "[INFO] End copying custom scripts" | ||
fi | ||
|
||
if [[ -d "$DIR" ]] | ||
then | ||
# Regex is needed to execute all kind of files, including sh files. Warning : --regex not available in alpine images. | ||
/bin/run-parts --verbose "$DIR" --regex='.*' | ||
fi | ||
|
||
exec "$@" |
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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
62 changes: 62 additions & 0 deletions
62
src/main/java/org/georchestra/cas/MessagesConfiguration.java
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,62 @@ | ||
package org.georchestra.cas; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.CommandLineRunner; | ||
import org.springframework.core.annotation.Order; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.io.File; | ||
import java.io.FileInputStream; | ||
import java.io.FileOutputStream; | ||
import java.io.IOException; | ||
import java.util.Properties; | ||
|
||
|
||
@Component | ||
@Order(1) | ||
class MessagesConfiguration implements CommandLineRunner { | ||
|
||
@Autowired GeorchestraConfiguration georchestraConfiguration; | ||
public static final String FILE_PATH = "webapps/cas/WEB-INF/classes/messages.properties"; | ||
public static final String EXPIRE_PASS_KEY = "screen.expiredpass.message"; | ||
public static final String EXPIRE_PASS_VALUE = "Please <a href=\"%s\">change your password</a>."; | ||
public static final String WARNING_PASS_KEY = "password.expiration.warning"; | ||
public static final String WARNING_PASS_VALUE = "Your password expires in {0} day(s). Please <a href=\"%s\">change your password</a> now."; | ||
public static final String CHANGE_PASSWORD_URL_NOT_CONNECTED = "../console/account/passwordRecovery"; | ||
public static final String CHANGE_PASSWORD_URL_CONNECTED = "../console/account/changePassword"; | ||
|
||
@Override | ||
public void run(String... args) { | ||
boolean success = false; | ||
Properties props = new Properties(); | ||
FileOutputStream output = null; | ||
FileInputStream configStream = null; | ||
try { | ||
File propsFile = new File(FILE_PATH); | ||
configStream = new FileInputStream(propsFile); | ||
props.load(configStream); | ||
props.setProperty(EXPIRE_PASS_KEY, String.format(EXPIRE_PASS_VALUE, CHANGE_PASSWORD_URL_NOT_CONNECTED)); | ||
props.setProperty(WARNING_PASS_KEY, String.format(WARNING_PASS_VALUE, CHANGE_PASSWORD_URL_CONNECTED)); | ||
output = new FileOutputStream(propsFile); | ||
props.store(output, "message.properties file updated to set url for password change"); | ||
} catch (IOException ex) { | ||
System.out.println(ex.getMessage()); | ||
} finally { | ||
if (configStream != null) { | ||
try { | ||
configStream.close(); | ||
} catch (IOException e) { | ||
System.out.println(e.getMessage()); | ||
} | ||
} | ||
if (output != null) { | ||
try { | ||
output.close(); | ||
} catch (IOException e) { | ||
System.out.println(e.getMessage()); | ||
} | ||
} | ||
} | ||
|
||
} | ||
} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=org.georchestra.cas.GeorchestraConfiguration | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=org.georchestra.cas.GeorchestraConfiguration, org.georchestra.cas.MessagesConfiguration |
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