From fd0665cd551e03de78bc4a755eba0f03aa4fbeb5 Mon Sep 17 00:00:00 2001 From: Marc Parisi Date: Fri, 10 Oct 2025 06:41:40 -0400 Subject: [PATCH] fixup --- .local.env | 4 ++-- .local.env.bak | 4 ++-- .../sso/startup/ConfigurationApplicationTask.java | 9 ++++----- .../java/io/sentrius/sso/core/dto/HostSystemDTO.java | 3 ++- core/src/main/java/io/sentrius/sso/core/dto/UserDTO.java | 3 +++ .../main/java/io/sentrius/sso/core/model/HostSystem.java | 6 ++++++ docker/sentrius/demoInstaller.yml | 6 ++++++ 7 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.local.env b/.local.env index 7ca63534..cfa37f72 100644 --- a/.local.env +++ b/.local.env @@ -1,4 +1,4 @@ -SENTRIUS_VERSION=1.1.507 +SENTRIUS_VERSION=1.1.510 SENTRIUS_SSH_VERSION=1.1.45 SENTRIUS_KEYCLOAK_VERSION=1.1.60 SENTRIUS_AGENT_VERSION=1.1.51 @@ -7,4 +7,4 @@ LLMPROXY_VERSION=1.0.88 LAUNCHER_VERSION=1.0.91 AGENTPROXY_VERSION=1.0.92 SSHPROXY_VERSION=1.0.91 -RDPPROXY_VERSION=1.0.121 \ No newline at end of file +RDPPROXY_VERSION=1.0.122 \ No newline at end of file diff --git a/.local.env.bak b/.local.env.bak index 7ca63534..cfa37f72 100644 --- a/.local.env.bak +++ b/.local.env.bak @@ -1,4 +1,4 @@ -SENTRIUS_VERSION=1.1.507 +SENTRIUS_VERSION=1.1.510 SENTRIUS_SSH_VERSION=1.1.45 SENTRIUS_KEYCLOAK_VERSION=1.1.60 SENTRIUS_AGENT_VERSION=1.1.51 @@ -7,4 +7,4 @@ LLMPROXY_VERSION=1.0.88 LAUNCHER_VERSION=1.0.91 AGENTPROXY_VERSION=1.0.92 SSHPROXY_VERSION=1.0.91 -RDPPROXY_VERSION=1.0.121 \ No newline at end of file +RDPPROXY_VERSION=1.0.122 \ No newline at end of file diff --git a/api/src/main/java/io/sentrius/sso/startup/ConfigurationApplicationTask.java b/api/src/main/java/io/sentrius/sso/startup/ConfigurationApplicationTask.java index c9034615..729b18ca 100644 --- a/api/src/main/java/io/sentrius/sso/startup/ConfigurationApplicationTask.java +++ b/api/src/main/java/io/sentrius/sso/startup/ConfigurationApplicationTask.java @@ -584,7 +584,7 @@ protected List createUsers( throws SQLException, GeneralSecurityException { List users = new ArrayList<>(); Map> assignments = new HashMap<>(); - if (null != installConfiguration.getUsers()) { + if (null != installConfiguration.getNpes()) { for (var userDTO : installConfiguration.getUsers()) { if (userDTO.getPassword() == null || userDTO.getPassword().isEmpty()) { log.warn("User {} has no password"); @@ -613,8 +613,6 @@ protected List createUsers( User user = User.from(userDTO, type.get()); - user.setIdentityType(IdentityType.NON_PERSON_ENTITY); - User finalUser = user; @@ -714,8 +712,8 @@ protected List createNPEs( throws SQLException, GeneralSecurityException { List users = new ArrayList<>(); Map> assignments = new HashMap<>(); - if (null != installConfiguration.getUsers()) { - for (var userDTO : installConfiguration.getUsers()) { + if (null != installConfiguration.getNpes()) { + for (var userDTO : installConfiguration.getNpes()) { if (userDTO.getPassword() == null || userDTO.getPassword().isEmpty()) { log.warn("User {} has no password"); userDTO.setPassword(UUID.randomUUID().toString()); @@ -742,6 +740,7 @@ protected List createNPEs( } User user = User.from(userDTO, type.get()); + user.setIdentityType(IdentityType.NON_PERSON_ENTITY); diff --git a/core/src/main/java/io/sentrius/sso/core/dto/HostSystemDTO.java b/core/src/main/java/io/sentrius/sso/core/dto/HostSystemDTO.java index b56c55a7..10c5a4dc 100644 --- a/core/src/main/java/io/sentrius/sso/core/dto/HostSystemDTO.java +++ b/core/src/main/java/io/sentrius/sso/core/dto/HostSystemDTO.java @@ -25,7 +25,8 @@ public class HostSystemDTO { private String authorizedKeys; - private boolean isRdp; + @Builder.Default + private boolean isRdp = false; private boolean rdpUser; private boolean rdpPassword; diff --git a/core/src/main/java/io/sentrius/sso/core/dto/UserDTO.java b/core/src/main/java/io/sentrius/sso/core/dto/UserDTO.java index 3c306749..a1918a67 100644 --- a/core/src/main/java/io/sentrius/sso/core/dto/UserDTO.java +++ b/core/src/main/java/io/sentrius/sso/core/dto/UserDTO.java @@ -23,6 +23,9 @@ public class UserDTO { public String team; public String password; + @Builder.Default + public Boolean isNpe= false; + @Builder.Default public String status = "ACTIVE"; diff --git a/dataplane/src/main/java/io/sentrius/sso/core/model/HostSystem.java b/dataplane/src/main/java/io/sentrius/sso/core/model/HostSystem.java index 4270c327..9325492a 100644 --- a/dataplane/src/main/java/io/sentrius/sso/core/model/HostSystem.java +++ b/dataplane/src/main/java/io/sentrius/sso/core/model/HostSystem.java @@ -209,6 +209,12 @@ public static HostSystem fromDTO(HostSystemDTO dto) { hostSystem.setErrorMsg(dto.getErrorMsg()); hostSystem.setPort(dto.getPort()); hostSystem.setSshUser(dto.getSshUser()); + if (dto.isRdp()) { + hostSystem.setRdpEnabled(dto.isRdp()); + hostSystem.setRdpUser(dto.isRdpUser() ? dto.getSshUser() : ""); + hostSystem.setRdpPassword(dto.isRdpPassword() ? dto.getPassword() : ""); + } + return hostSystem; } diff --git a/docker/sentrius/demoInstaller.yml b/docker/sentrius/demoInstaller.yml index 0fb5884d..e7a0c12e 100644 --- a/docker/sentrius/demoInstaller.yml +++ b/docker/sentrius/demoInstaller.yml @@ -53,6 +53,11 @@ systems: port: 22 host: sentrius-bad-ssh authorizedKeys: ~/.ssh/authorized_keys + - displayName: sentrius-rdp-test + sshUser: ubuntu + password: ubuntu + rdp: true + host: sentrius-rdp ## Define groups of users who are assigned to systems ## also entails the configuration that is applied to groupf @@ -63,6 +68,7 @@ managementGroups: description: test group systems: - SSH-HOST + - sentrius-rdp-test configuration: configurationName: testConfig terminalsLocked: false