JAVA-18523 Upgrade cas module and related articles (#14504)
* JAVA-18523 Upgrade cas module and related articles * JAVA-18523 Remove deprecated WebSecurityConfigurerAdapter
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
package org.apereo.cas.config;
|
||||
|
||||
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
//import org.apereo.cas.configuration.CasConfigurationProperties;
|
||||
|
||||
@AutoConfiguration
|
||||
//@EnableConfigurationProperties(CasConfigurationProperties.class)
|
||||
public class CasOverlayOverrideConfiguration {
|
||||
|
||||
/*
|
||||
@Bean
|
||||
public MyCustomBean myCustomBean() {
|
||||
...
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -1,22 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
#echo -e "\nChecking java..."
|
||||
#java -version
|
||||
ENTRYPOINT_DEBUG=${ENTRYPOINT_DEBUG:-false}
|
||||
JVM_DEBUG=${JVM_DEBUG:-false}
|
||||
JVM_DEBUG_PORT=${JVM_DEBUG_PORT:-5000}
|
||||
JVM_DEBUG_SUSPEND=${JVM_DEBUG_SUSPEND:-n}
|
||||
JVM_MEM_OPTS=${JVM_MEM_OPTS:--Xms512m -Xmx4096M}
|
||||
JVM_EXTRA_OPTS=${JVM_EXTRA_OPTS:--server -noverify -XX:+TieredCompilation -XX:TieredStopAtLevel=1}
|
||||
|
||||
#echo -e "\nCreating CAS configuration directories..."
|
||||
mkdir -p /etc/cas/config
|
||||
mkdir -p /etc/cas/services
|
||||
if [ $JVM_DEBUG = "true" ]; then
|
||||
JVM_EXTRA_OPTS="${JVM_EXTRA_OPTS} -Xdebug -Xrunjdwp:transport=dt_socket,address=*:${JVM_DEBUG_PORT},server=y,suspend=${JVM_DEBUG_SUSPEND}"
|
||||
fi
|
||||
|
||||
#echo "Listing provided CAS docker artifacts..."
|
||||
#ls -R docker/cas
|
||||
if [ $ENTRYPOINT_DEBUG = "true" ]; then
|
||||
JVM_EXTRA_OPTS="${JVM_EXTRA_OPTS} -Ddebug=true"
|
||||
|
||||
echo "\nChecking java..."
|
||||
java -version
|
||||
|
||||
#echo -e "\nMoving CAS configuration artifacts..."
|
||||
mv docker/cas/thekeystore /etc/cas 2>/dev/null
|
||||
mv docker/cas/config/*.* /etc/cas/config 2>/dev/null
|
||||
mv docker/cas/services/*.* /etc/cas/services 2>/dev/null
|
||||
if [ -d /etc/cas ] ; then
|
||||
echo "\nListing CAS configuration under /etc/cas..."
|
||||
ls -R /etc/cas
|
||||
fi
|
||||
echo "\nRemote debugger configured on port ${JVM_DEBUG_PORT} with suspend=${JVM_DEBUG_SUSPEND}: ${JVM_DEBUG}"
|
||||
echo "\nJava args: ${JVM_MEM_OPTS} ${JVM_EXTRA_OPTS}"
|
||||
fi
|
||||
|
||||
#echo -e "\nListing CAS configuration under /etc/cas..."
|
||||
#ls -R /etc/cas
|
||||
|
||||
echo -e "\nRunning CAS..."
|
||||
exec java -Xms512m -Xmx2048M -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -jar docker/cas/war/cas.war
|
||||
echo "\nRunning CAS @ cas.war"
|
||||
# shellcheck disable=SC2086
|
||||
exec java $JVM_EXTRA_OPTS $JVM_MEM_OPTS -jar cas.war "$@"
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
org.apereo.cas.config.CasOverlayOverrideConfiguration
|
||||
@@ -1,4 +0,0 @@
|
||||
server.port=8443
|
||||
spring.main.allow-bean-definition-overriding=true
|
||||
server.ssl.key-store=classpath:/etc/cas/thekeystore
|
||||
server.ssl.key-store-password=changeit
|
||||
@@ -0,0 +1,10 @@
|
||||
# Application properties that need to be
|
||||
# embedded within the web application can be included here
|
||||
server:
|
||||
port: 8443
|
||||
ssl:
|
||||
key-store: classpath:/etc/cas/thekeystore
|
||||
key-store-password: changeit
|
||||
spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
@@ -1,15 +1,17 @@
|
||||
cas.serviceRegistry.initFromJson=true
|
||||
cas.serviceRegistry.json.location=classpath:/etc/cas/services
|
||||
cas.authn.accept.users=casuser::Mellon
|
||||
cas.service-Registry.core.init-from-json=true
|
||||
cas.service-Registry.json.location=classpath:/etc/cas/services
|
||||
|
||||
# cas.authn.accept.users=
|
||||
|
||||
# cas.authn.jdbc.query[0].sql=SELECT * FROM users WHERE email = ?
|
||||
# cas.authn.jdbc.query[0].url=jdbc:mysql://127.0.0.1:3306/test?# useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
|
||||
# cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MySQLDialect
|
||||
# cas.authn.jdbc.query[0].user=root
|
||||
# cas.authn.jdbc.query[0].password=smattroot
|
||||
# cas.authn.jdbc.query[0].ddlAuto=none
|
||||
# cas.authn.jdbc.query[0].driverClass=com.mysql.cj.jdbc.Driver
|
||||
# cas.authn.jdbc.query[0].fieldPassword=password
|
||||
# cas.authn.jdbc.query[0].passwordEncoder.type=NONE
|
||||
|
||||
|
||||
cas.authn.accept.users=
|
||||
|
||||
cas.authn.jdbc.query[0].sql=SELECT * FROM users WHERE email = ?
|
||||
cas.authn.jdbc.query[0].url=jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
|
||||
cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MySQLDialect
|
||||
cas.authn.jdbc.query[0].user=root
|
||||
cas.authn.jdbc.query[0].password=smattroot
|
||||
cas.authn.jdbc.query[0].ddlAuto=none
|
||||
cas.authn.jdbc.query[0].driverClass=com.mysql.cj.jdbc.Driver
|
||||
cas.authn.jdbc.query[0].fieldPassword=password
|
||||
cas.authn.jdbc.query[0].passwordEncoder.type=NONE
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"@class" : "org.apereo.cas.services.RegexRegisteredService",
|
||||
"serviceId" : "http://cas-client:8900/login/cas",
|
||||
"serviceId" : "http://localhost:8900/login/cas",
|
||||
"name" : "casSecuredApp",
|
||||
"id" : 8900,
|
||||
"logoutType" : "BACK_CHANNEL",
|
||||
"logoutUrl" : "http://cas-client:8900/exit/cas"
|
||||
"logoutUrl" : "http://localhost:8900/exit/cas"
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user