Skip to content

Commit

Permalink
Merge pull request #18 from buession/development
Browse files Browse the repository at this point in the history
Release 2.3.3
  • Loading branch information
eduosi authored May 6, 2024
2 parents c76dbe9 + 8e61f96 commit 01122b3
Show file tree
Hide file tree
Showing 97 changed files with 1,059 additions and 1,655 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@
===========================


## [2.3.3](https://github.com/buession/buession-cas/releases/tag/v2.3.3) (2024-05-06)

### 🔨依赖升级

- [依赖库版本升级和安全漏洞修复](https://github.com/buession/buession-parent/releases/tag/v2.3.3)


### 🔔 变化

- **buession-cas-logging:** 基本日志控制台模式,集成 com.buession.logging:buession-logging-support-console


### ⏪ 优化

- **buession-cas-logging:** 优化和规范 LogHandler bean 初始化
- **buession-cas-logging:** 优化日志数据参数


---


## [2.3.2](https://github.com/buession/buession-cas/releases/tag/v2.3.2) (2023-12-27)

### 🔨依赖升级
Expand Down
2 changes: 1 addition & 1 deletion buession-cas-audit-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.buession.cas</groupId>
<artifactId>buession-cas-parent</artifactId>
<relativePath>../buession-cas-parent</relativePath>
<version>2.3.2</version>
<version>2.3.3</version>
</parent>
<artifactId>buession-cas-audit-core</artifactId>
<url>https://cas.buession.com/</url>
Expand Down
2 changes: 1 addition & 1 deletion buession-cas-audit-couchbase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.buession.cas</groupId>
<artifactId>buession-cas-parent</artifactId>
<relativePath>../buession-cas-parent</relativePath>
<version>2.3.2</version>
<version>2.3.3</version>
</parent>
<artifactId>buession-cas-audit-couchbase</artifactId>
<url>https://cas.buession.com/</url>
Expand Down
2 changes: 1 addition & 1 deletion buession-cas-audit-couchdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.buession.cas</groupId>
<artifactId>buession-cas-parent</artifactId>
<relativePath>../buession-cas-parent</relativePath>
<version>2.3.2</version>
<version>2.3.3</version>
</parent>
<artifactId>buession-cas-audit-couchdb</artifactId>
<url>https://cas.buession.com/</url>
Expand Down
2 changes: 1 addition & 1 deletion buession-cas-audit-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.buession.cas</groupId>
<artifactId>buession-cas-parent</artifactId>
<relativePath>../buession-cas-parent</relativePath>
<version>2.3.2</version>
<version>2.3.3</version>
</parent>
<artifactId>buession-cas-audit-jdbc</artifactId>
<url>https://cas.buession.com/</url>
Expand Down
2 changes: 1 addition & 1 deletion buession-cas-audit-mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.buession.cas</groupId>
<artifactId>buession-cas-parent</artifactId>
<relativePath>../buession-cas-parent</relativePath>
<version>2.3.2</version>
<version>2.3.3</version>
</parent>
<artifactId>buession-cas-audit-mongodb</artifactId>
<url>https://cas.buession.com/</url>
Expand Down
2 changes: 1 addition & 1 deletion buession-cas-audit-redis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.buession.cas</groupId>
<artifactId>buession-cas-parent</artifactId>
<relativePath>../buession-cas-parent</relativePath>
<version>2.3.2</version>
<version>2.3.3</version>
</parent>
<artifactId>buession-cas-audit-redis</artifactId>
<url>https://cas.buession.com/</url>
Expand Down
2 changes: 1 addition & 1 deletion buession-cas-audit-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.buession.cas</groupId>
<artifactId>buession-cas-parent</artifactId>
<relativePath>../buession-cas-parent</relativePath>
<version>2.3.2</version>
<version>2.3.3</version>
</parent>
<artifactId>buession-cas-audit-rest</artifactId>
<url>https://cas.buession.com/</url>
Expand Down
2 changes: 1 addition & 1 deletion buession-cas-audit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.buession.cas</groupId>
<artifactId>buession-cas-parent</artifactId>
<relativePath>../buession-cas-parent</relativePath>
<version>2.3.2</version>
<version>2.3.3</version>
</parent>
<artifactId>buession-cas-audit</artifactId>
<url>https://cas.buession.com/</url>
Expand Down
2 changes: 1 addition & 1 deletion buession-cas-authentication/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.buession.cas</groupId>
<artifactId>buession-cas-parent</artifactId>
<relativePath>../buession-cas-parent</relativePath>
<version>2.3.2</version>
<version>2.3.3</version>
</parent>
<artifactId>buession-cas-authentication</artifactId>
<url>https://cas.buession.com/</url>
Expand Down
2 changes: 1 addition & 1 deletion buession-cas-captcha/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.buession.cas</groupId>
<artifactId>buession-cas-parent</artifactId>
<relativePath>../buession-cas-parent</relativePath>
<version>2.3.2</version>
<version>2.3.3</version>
</parent>
<artifactId>buession-cas-captcha</artifactId>
<url>https://cas.buession.com/</url>
Expand Down
2 changes: 1 addition & 1 deletion buession-cas-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.buession.cas</groupId>
<artifactId>buession-cas-parent</artifactId>
<relativePath>../buession-cas-parent</relativePath>
<version>2.3.2</version>
<version>2.3.3</version>
</parent>
<artifactId>buession-cas-client</artifactId>
<url>https://cas.buession.com/</url>
Expand Down
2 changes: 1 addition & 1 deletion buession-cas-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.buession.cas</groupId>
<artifactId>buession-cas-parent</artifactId>
<relativePath>../buession-cas-parent</relativePath>
<version>2.3.2</version>
<version>2.3.3</version>
</parent>
<artifactId>buession-cas-core</artifactId>
<url>https://cas.buession.com/</url>
Expand Down
8 changes: 7 additions & 1 deletion buession-cas-logging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.buession.cas</groupId>
<artifactId>buession-cas-parent</artifactId>
<relativePath>../buession-cas-parent</relativePath>
<version>2.3.2</version>
<version>2.3.3</version>
</parent>
<artifactId>buession-cas-logging</artifactId>
<url>https://cas.buession.com/</url>
Expand Down Expand Up @@ -80,6 +80,12 @@
<artifactId>buession-logging-spring</artifactId>
<version>${buession.logging.version}</version>
</dependency>
<dependency>
<groupId>com.buession.logging</groupId>
<artifactId>buession-logging-support-console</artifactId>
<version>${buession.logging.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.buession.logging</groupId>
<artifactId>buession-logging-support-elasticsearch</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ public interface Constants {

String BASIC_LOGIN_LOGGING_JDBC_TRANSACTION_TEMPLATE_BEAN_NAME = "basicLoginLoggingJdbcTransactionTemplate";

String BASIC_LOGIN_LOGGING_MANAGER_FACTORY_BEAN_NAME = "basicLoginLoggingManagerFactory";

String BASIC_LOGIN_LOGGING_MANAGER_BEAN_NAME = "basicLoginLoggingManager";

String HISTORY_LOGIN_LOGGING_MANAGER_FACTORY_BEAN_NAME = "historyLoginLoggingManagerFactory";

String HISTORY_LOGIN_LOGGING_MANAGER_BEAN_NAME = "historyLoginLoggingManager";

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,38 @@
* @author Yong.Teng
* @since 2.3.0
*/
public abstract class AbstractLogHandlerConfiguration<P extends HandlerProperties> {
public abstract class AbstractLogHandlerConfiguration {

public final static String PREFIX = CasLoggingConfigurationProperties.PREFIX + ".history";
protected final static PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull();

protected final P handlerProperties;
public static class AbstractBasicLogHandlerConfiguration<P extends HandlerProperties>
extends AbstractLogHandlerConfiguration {

protected final PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull();
public final static String PREFIX = CasLoggingConfigurationProperties.PREFIX + ".basic";

public final static String LOG_HANDLER_BEAN_NAME = "basicLoggingLogHandler";

protected final P handlerProperties;

public AbstractBasicLogHandlerConfiguration(final P handlerProperties) {
this.handlerProperties = handlerProperties;
}

}

public static class AbstractHistoryLogHandlerConfiguration<P extends HandlerProperties>
extends AbstractLogHandlerConfiguration {

public final static String PREFIX = CasLoggingConfigurationProperties.PREFIX + ".history";

public final static String LOG_HANDLER_BEAN_NAME = "historyLoggingLogHandler";

protected final P handlerProperties;

public AbstractHistoryLogHandlerConfiguration(final P handlerProperties) {
this.handlerProperties = handlerProperties;
}

public AbstractLogHandlerConfiguration(final P handlerProperties) {
this.handlerProperties = handlerProperties;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional information regarding copyright ownership.
* The ASF licenses this file to you 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.
*
* =========================================================================================================
*
* This software consists of voluntary contributions made by many individuals on behalf of the
* Apache Software Foundation. For more information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* +-------------------------------------------------------------------------------------------------------+
* | License: http://www.apache.org/licenses/LICENSE-2.0.txt |
* | Author: Yong.Teng <[email protected]> |
* | Copyright @ 2013-2024 Buession.com Inc. |
* +-------------------------------------------------------------------------------------------------------+
*/
package org.apereo.cas.logging.autoconfigure;

import com.buession.core.validator.Validate;
import com.buession.geoip.Resolver;
import com.buession.logging.core.handler.LogHandler;
import com.buession.logging.core.handler.PrincipalHandler;
import com.buession.logging.core.request.RequestContext;
import com.buession.logging.spring.LogManagerFactoryBean;
import org.apereo.cas.core.CasCoreConfigurationProperties;
import org.springframework.beans.factory.ObjectProvider;

/**
* @author Yong.Teng
* @since 2.3.3
*/
public abstract class BaseLoginLoggingConfiguration {

protected final CasCoreConfigurationProperties casCoreConfigurationProperties;

public BaseLoginLoggingConfiguration(CasCoreConfigurationProperties casCoreConfigurationProperties) {
this.casCoreConfigurationProperties = casCoreConfigurationProperties;
}

protected LogManagerFactoryBean createLogManagerFactoryBean(
final ObjectProvider<PrincipalHandler<?>> principalHandler,
final ObjectProvider<RequestContext> requestContext,
final ObjectProvider<LogHandler> logHandler,
final ObjectProvider<Resolver> geoResolver) {
final LogManagerFactoryBean logManagerFactoryBean = new LogManagerFactoryBean();

requestContext.ifAvailable(logManagerFactoryBean::setRequestContext);
geoResolver.ifAvailable(logManagerFactoryBean::setGeoResolver);
principalHandler.ifAvailable(logManagerFactoryBean::setPrincipalHandler);
logHandler.ifAvailable(logManagerFactoryBean::setLogHandler);

if(Validate.isNotBlank(casCoreConfigurationProperties.getClientRealIpHeaderName())){
logManagerFactoryBean.setClientIpHeaderName(casCoreConfigurationProperties.getClientRealIpHeaderName());
}

return logManagerFactoryBean;
}

}
Loading

0 comments on commit 01122b3

Please sign in to comment.