Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
f90dfb1
chore: set version and update changelog
mjabascal10 Mar 19, 2025
846dd00
chore: set version and update changelog
mjabascal10 Mar 19, 2025
a356684
feat: add organization name configuration parameter
mjabascal10 Mar 19, 2025
7f31741
feat: add organization name configuration parameter
mjabascal10 Mar 19, 2025
b7a35d8
feat: add organization name configuration parameter
mjabascal10 Mar 20, 2025
729beb3
feat: Added new compliance reports for PCI DSS standard
mjabascal10 Mar 20, 2025
15b9e0d
fix: adjust responsive text alignment for action buttons
mjabascal10 Mar 20, 2025
1c0ab04
feat: add organization name configuration parameter
mjabascal10 Mar 20, 2025
e4b7533
Merge remote-tracking branch 'origin/main' into bugfix/10.6.3/add-org…
mjabascal10 Mar 24, 2025
1e75a39
Merge remote-tracking branch 'origin/bugfix/10.6.3/add-compliance-rep…
mjabascal10 Mar 24, 2025
e2fb8c1
Merge remote-tracking branch 'origin/bugfix/10.6.3/add-organization-n…
mjabascal10 Mar 24, 2025
bbda0de
chore: set version and update changelog file
mjabascal10 Mar 24, 2025
0ae93d0
Merge remote-tracking branch 'origin/bugfix/10.6.3/add-organization-n…
mjabascal10 Mar 24, 2025
bc203cb
feat: add organization name configuration parameter
mjabascal10 Mar 24, 2025
b488ca2
feat: add organization name configuration parameter
mjabascal10 Mar 24, 2025
623c845
Merge remote-tracking branch 'origin/bugfix/10.7.1/add-organization-n…
mjabascal10 Mar 24, 2025
d868b64
Fixing id criteria specification to avoid errors when querying the in…
c3s4rfred Mar 24, 2025
8cf44c7
Updating changelog.md
c3s4rfred Mar 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# UTMStack 10.7.0 Release Notes
## New Features and Improvements
- **Agent & Collector Dependencies**: agents and collectors now fetch their dependencies from the **agent-manager**, improving consistency and centralizing dependency management.

- **Agent Installation**: improved the installation messages for the agent to provide clearer instructions during the setup process.

- **Agent Service Cleanup**: removed unnecessary services to streamline the system and reduce overhead.
# UTMStack 10.7.1 Release Notes

- **Error Recovery**: enhanced the agent's ability to recover from certain data streaming errors when interacting with the agent-manager, improving stability and fault tolerance.
### Bug Fixes
- Fixed responsive text alignment for action buttons in Log Explorer to enhance visual consistency.

- **Debug Mode for Agents**: Added a debug mode for agents, allowing better troubleshooting and logging for debugging purposes.

- **Certificate Verification Improvements**: Improved certificate verification in agents to enhance security and prevent connection issues.

- **Windows ARM64 Agent Support**: Added support for a Windows ARM64 agent, expanding compatibility to more architectures.
## New Features and Improvements
- Added organization name in app settings to distinguish alert and notification emails for better clarity.
- Enhanced the email notification system by including the organization name to improve recipient identification.
- Introduced new compliance reports aligned with the PCI DSS standard to expand auditing capabilities.
- Resolves issues with malformed queries when filtering incidents by id.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public final class Constants {
public static final String PROP_MAIL_PORT = "utmstack.mail.port";
public static final String PROP_MAIL_PASSWORD = "utmstack.mail.password";
public static final String PROP_MAIL_USERNAME = "utmstack.mail.username";
public static final String PROP_MAIL_ORGNAME = "utmstack.mail.organization";
public static final String PROP_MAIL_SMTP_AUTH = "utmstack.mail.properties.mail.smtp.auth";

public static final String PROP_EMAIL_PROTOCOL_VALUE = "smtp";
Expand Down
25 changes: 7 additions & 18 deletions backend/src/main/java/com/park/utmstack/service/MailService.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import org.thymeleaf.context.Context;
import org.thymeleaf.extras.java8time.dialect.Java8TimeDialect;
import org.thymeleaf.spring5.SpringTemplateEngine;
Expand Down Expand Up @@ -62,6 +61,8 @@ public class MailService {

private static final String BASE_URL = "baseUrl";

private static final String ORG_NAME = "orgName";

private final MessageSource messageSource;
private final SpringTemplateEngine templateEngine;
private final ApplicationEventService eventService;
Expand All @@ -79,22 +80,6 @@ public MailService(MessageSource messageSource,
this.templateEngine.addDialect(new Java8TimeDialect());
}

// private JavaMailSender getJavaMailSender() {
// JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
// mailSender.setHost(Constants.CFG.get(Constants.PROP_MAIL_HOST));
// mailSender.setPort(Integer.parseInt(Constants.CFG.get(Constants.PROP_MAIL_PORT)));
// mailSender.setPassword(Constants.CFG.get(Constants.PROP_MAIL_PASSWORD));
// mailSender.setUsername(Constants.CFG.get(Constants.PROP_MAIL_USERNAME));
// mailSender.setProtocol(Constants.CFG.get(Constants.PROP_MAIL_PROTOCOL));
//
// Properties props = mailSender.getJavaMailProperties();
// props.put("mail.smtp.auth", Constants.CFG.get(Constants.PROP_MAIL_SMTP_AUTH));
// props.put("mail.smtp.starttls.enable", Constants.CFG.get(Constants.PROP_MAIL_SMTP_STARTTLS_ENABLE));
// props.put("mail.smtp.ssl.trust", Constants.CFG.get(Constants.PROP_MAIL_SMTP_SSL_TRUST));
//
// return mailSender;
// }

private MailSenderStrategy getSender(String type){
return mailSenders.stream()
.filter(s -> s.getEncryptionType().equals(type))
Expand Down Expand Up @@ -277,11 +262,12 @@ public void sendAlertEmail(List<String> emailsTo, AlertType alert, List<LogType>
context.setVariable("relatedLogs", relatedLogs);
context.setVariable("timestamp", alert.getTimestampFormatted());
context.setVariable(BASE_URL, Constants.CFG.get(Constants.PROP_MAIL_BASE_URL));
context.setVariable(ORG_NAME, Constants.CFG.get(Constants.PROP_MAIL_ORGNAME));

final MimeMessage mimeMessage = javaMailSender.createMimeMessage();
final MimeMessageHelper message = new MimeMessageHelper(mimeMessage, true, "UTF-8");
message.setSubject(String.format("%1$s[%2$s]: %3$s", alert.getIncident() ? "INFOSEC-" : "", alert.getId().substring(0, 5), alert.getName()));
message.setFrom(Constants.CFG.get(Constants.PROP_MAIL_FROM));
message.setFrom(new InternetAddress(Constants.CFG.get(Constants.PROP_MAIL_FROM), Constants.CFG.get(Constants.PROP_MAIL_ORGNAME)));
message.setTo(emailsTo.toArray(new String[0]));

final String htmlContent = templateEngine.process("mail/alertEmail", context);
Expand Down Expand Up @@ -314,9 +300,12 @@ public void sendIncidentEmail(List<String> emailsTo, List<AlertType> alerts, Utm
context.setVariable("alerts", alerts);
context.setVariable("incident", incident);
context.setVariable(BASE_URL, Constants.CFG.get(Constants.PROP_MAIL_BASE_URL));
context.setVariable(ORG_NAME, Constants.CFG.get(Constants.PROP_MAIL_ORGNAME));

final MimeMessage mimeMessage = javaMailSender.createMimeMessage();
final MimeMessageHelper message = new MimeMessageHelper(mimeMessage, true, "UTF-8");
message.setSubject(String.format("%1$s[%2$s]: %3$s", "INFOSEC- New Incident ", incident.getId().toString(), incident.getIncidentName()));
message.setFrom(new InternetAddress(Constants.CFG.get(Constants.PROP_MAIL_FROM), Constants.CFG.get(Constants.PROP_MAIL_ORGNAME)));
message.setFrom(Constants.CFG.get(Constants.PROP_MAIL_FROM));
message.setTo(emailsTo.toArray(new String[0]));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private Specification<UtmIncident> createSpecification(UtmIncidentCriteria crite
Specification<UtmIncident> specification = Specification.where(null);
if (criteria != null) {
if (criteria.getId() != null) {
specification = specification.and(buildSpecification(criteria.getId(), UtmIncident_.id));
specification = specification.and(buildRangeSpecification(criteria.getId(), UtmIncident_.id));
}
if (criteria.getIncidentName() != null) {
specification = specification.and(buildStringSpecification(criteria.getIncidentName(), UtmIncident_.incidentName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
import com.park.utmstack.domain.mail_sender.MailConfig;
import org.springframework.stereotype.Service;

import javax.mail.internet.InternetAddress;
import java.io.UnsupportedEncodingException;
import java.util.List;

@Service
public class MailConfigService {
public MailConfig getMailConfigFromParameters(List<UtmConfigurationParameter> parameters){
public MailConfig getMailConfigFromParameters(List<UtmConfigurationParameter> parameters) throws UnsupportedEncodingException {
MailConfig mailConfig = new MailConfig();

mailConfig.setHost(getParamValue(parameters, Constants.PROP_MAIL_HOST));
mailConfig.setUsername(getParamValue(parameters, Constants.PROP_MAIL_USERNAME));
mailConfig.setPassword(getParamValue(parameters, Constants.PROP_MAIL_PASSWORD));
mailConfig.setAuthType(getParamValue(parameters, Constants.PROP_MAIL_SMTP_AUTH));
mailConfig.setFrom(getParamValue(parameters, Constants.PROP_MAIL_FROM));
mailConfig.setFrom(String.valueOf(new InternetAddress(Constants.CFG.get(Constants.PROP_MAIL_FROM), getParamValue(parameters, Constants.PROP_MAIL_ORGNAME))));
mailConfig.setPort(Integer.parseInt(getParamValue(parameters, Constants.PROP_MAIL_PORT)));

return mailConfig;
Expand All @@ -26,7 +28,7 @@ public String getParamValue(List<UtmConfigurationParameter> parameters, String s
return parameters.stream()
.filter(p -> p.getConfParamShort().equals(shortName))
.findFirst()
. map(UtmConfigurationParameter::getConfParamValue)
.map(UtmConfigurationParameter::getConfParamValue)
.orElse(Constants.CFG.get(shortName));
}
}
Loading
Loading