Skip to content

Commit

Permalink
feat: allow tenants to be listed in admin console
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoayyed committed Feb 22, 2025
1 parent 05c6138 commit 0134c56
Show file tree
Hide file tree
Showing 20 changed files with 153 additions and 55 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.apereo.cas.multitenancy;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -17,6 +18,7 @@
@Setter
@NoArgsConstructor
@EqualsAndHashCode
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public class DefaultTenantAuthenticationPolicy implements TenantAuthenticationPolicy {
@Serial
private static final long serialVersionUID = -9012299259747093234L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.apereo.cas.multitenancy;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -16,6 +17,7 @@
@Setter
@NoArgsConstructor
@EqualsAndHashCode
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public class DefaultTenantCommunicationPolicy implements TenantCommunicationPolicy {
@Serial
private static final long serialVersionUID = 1810371962642100469L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.apereo.cas.multitenancy;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -17,6 +18,7 @@
@Setter
@NoArgsConstructor
@EqualsAndHashCode
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public class DefaultTenantDelegatedAuthenticationPolicy implements TenantDelegatedAuthenticationPolicy {
@Serial
private static final long serialVersionUID = 1800371962642100469L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.apereo.cas.multitenancy;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -17,6 +18,7 @@
@Setter
@NoArgsConstructor
@EqualsAndHashCode
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public class DefaultTenantMultifactorAuthenticationPolicy implements TenantMultifactorAuthenticationPolicy {
@Serial
private static final long serialVersionUID = -9012299259747093234L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.apereo.cas.multitenancy;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -17,6 +18,7 @@
@Setter
@NoArgsConstructor
@EqualsAndHashCode
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public class TenantCasAuthenticationProtocolPolicy implements TenantAuthenticationProtocolPolicy {
@Serial
private static final long serialVersionUID = -9012299259747093234L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.apereo.cas.multitenancy;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.EqualsAndHashCode;
import lombok.Getter;
Expand All @@ -23,6 +24,7 @@
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
@NoArgsConstructor
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public class TenantDefinition implements Serializable {
@Serial
private static final long serialVersionUID = -9012299259747093234L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.apereo.cas.multitenancy;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -17,6 +18,7 @@
@Setter
@NoArgsConstructor
@EqualsAndHashCode
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public class TenantEmailCommunicationPolicy implements Serializable {
@Serial
private static final long serialVersionUID = 8552529921936294263L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private void initializeWatchService() {
watcherService = new FileWatcherService(jsonResource.getFile(),
file -> {
val resources = readFromJsonResource();
if (resources.isEmpty()) {
if (!resources.isEmpty()) {
tenantDefinitionList.clear();
tenantDefinitionList.addAll(resources);
}
Expand Down
2 changes: 1 addition & 1 deletion docs/cas-server-documentation/logging/Logging-Fluentd.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CAS log data can be automatically routed to Fluentd. Support is enabled by inclu
With the above module, you may then declare a specific appender to communicate with AWS CloudWatch:

```xml
<Configuration packages="io.github.technologize">
<Configuration>
<Appenders>
<Fluentd name="fluentd" tag="yourTag" >
<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ in the logging configuration.</p></div>
This is an example of the logging configuration:

```xml
<Configuration packages="org.apereo.cas.logging">
<Configuration>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<JsonLayout locationInfo="false"
Expand Down
2 changes: 1 addition & 1 deletion docs/cas-server-documentation/logging/Logging-Sentry.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The [Logging](../logging/Logging.html) configuration file must be adjusted to ma

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" packages="org.apache.logging.log4j.core,io.sentry.log4j2">
<Configuration status="warn">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/cas-server-documentation/logging/Logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ such as Ticket Granting Tickets or Proxy Granting Tickets. It may be used via th

```xml
<?xml version="1.0" encoding="UTF-8" ?>
<Configuration monitorInterval="2" packages="org.apereo.cas.logging">
<Configuration monitorInterval="2">
<!-- Wrap the console appender inside -->
<CasAppender name="casConsole" maxEntries="50">
<AppenderRef ref="console" />
Expand Down
8 changes: 2 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ sonarProjectName=cas
#######################
sourceCompatibility=21
targetCompatibility=21
#########################################################
################
# Gradle plugins
#
# Note: We cannot use a plugin or version from
# the version catalog in the settings file.
# Develocity plugin MUST be declared in the settings.file
#########################################################
################
develocityApereoServerUrl=https://develocity.apereo.org/
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Configuration shutdownHook="disable" packages="org.apereo.cas.logging">
<Configuration shutdownHook="disable">

<Appenders>
<Console name="PatternConsole" target="SYSTEM_OUT">
Expand Down
Loading

0 comments on commit 0134c56

Please sign in to comment.