Skip to content

Commit ed02fd0

Browse files
committed
commit
1 parent 6f76924 commit ed02fd0

File tree

7 files changed

+15
-7
lines changed

7 files changed

+15
-7
lines changed

.gcp.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SENTRIUS_VERSION=1.0.13
1+
SENTRIUS_VERSION=1.0.15
22
SENTRIUS_SSH_VERSION=1.0.2
33
SENTRIUS_KEYCLOAK_VERSION=1.0.4
44
SENTRIUS_AGENT_VERSION=1.0.11

api/src/main/java/io/sentrius/sso/controllers/api/RuleApiController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,15 @@ public ResponseEntity<List<ProfileRuleDTO>> listRules(HttpServletRequest request
7777
boolean canEditRules = AccessUtil.canAccess(user, RuleAccessEnum.CAN_EDIT_RULES);
7878
boolean canDeleteRules = AccessUtil.canAccess(user, RuleAccessEnum.CAN_MANAGE_RULES);
7979
if (AccessUtil.canAccess(user, ApplicationAccessEnum.CAN_MANAGE_APPLICATION)) {
80-
80+
log.info("User can manage rules {}", user.getAuthorizationType());
8181
for(ProfileRule rule: ruleService.getAllRules()) {
8282
var dto = new ProfileRuleDTO(rule, rule.getHostGroups().stream().toList(), canViewRules, canEditRules,
8383
canDeleteRules);
8484
rules.add(dto);
8585
log.info("Adding {}", dto);
8686
}
8787
} else {
88+
log.info("User can manage own rules");
8889
var groups = hostGroupService.getAllHostGroups(user);
8990
for (HostGroup group : groups) {
9091
for(ProfileRule rule : group.getRules()) {

api/src/main/java/io/sentrius/sso/startup/ConfigurationApplicationTask.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import io.sentrius.sso.core.model.dto.UserTypeDTO;
3030
import io.sentrius.sso.core.model.hostgroup.HostGroup;
3131
import io.sentrius.sso.core.model.security.UserType;
32+
import io.sentrius.sso.core.model.security.enums.ApplicationAccessEnum;
3233
import io.sentrius.sso.core.model.security.enums.AutomationAccessEnum;
3334
import io.sentrius.sso.core.model.security.enums.RuleAccessEnum;
3435
import io.sentrius.sso.core.model.security.enums.SSHAccessEnum;
@@ -337,6 +338,10 @@ protected List<UserType> createUserTypes(List<SideEffect> sideEffects, InstallCo
337338
builder.ztAccessTokenAccess(ZeroTrustAccessTokenEnum.of(List.of(type.getZtAccessTokenAccess())));
338339
}
339340

341+
if (null != type.getApplicationAccess()){
342+
builder.applicationAccess(ApplicationAccessEnum.of(List.of(type.getApplicationAccess())));
343+
}
344+
340345
UserType newType = builder.userTypeName(type.getUserTypeName()).build();
341346
userTypeRepository.findByUserTypeName(type.getUserTypeName())
342347
.ifPresentOrElse(

api/src/main/resources/templates/sso/errors/list_errors.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
</div>
112112
</div>
113113
<div th:replace="~{fragments/alerts}"></div>
114-
<div th:if="${#sets.contains(operatingUser.authorizationType.accessSet, 'CAN_MANAGE_USERS')}">
114+
<div th:if="${#sets.contains(operatingUser.authorizationType.accessSet, 'CAN_MANAGE_SYSTEMS')}">
115115

116116
<h3>Errors</h3>
117117
<table id="error-table" class="display" style="width:100%">

core/src/main/java/io/sentrius/sso/core/services/RuleService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ public void deleteRule(ProfileRule rule) {
3232
public ProfileRule saveRule(ProfileRule rule) {
3333
try {
3434
log.info("Saving rule with id: {}", rule.getId());
35-
return ruleRepository.save(rule);
35+
var newRule = ruleRepository.save(rule);
36+
log.info("Saving rule with id: {}", newRule.getId());
37+
return newRule;
3638
} catch (Exception e) {
3739
log.error("Error while saving Rule", e);
3840
throw new RuntimeException("Failed to save Rule", e);

docker/keycloak/realms/sentrius-realm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"clientAuthenticatorType": "client-secret",
99
"secret": "nGkEukexSWTvDzYjSkDmeUlM0FJ5Jhh0",
1010
"rootUrl": "${ROOT_URL}",
11-
"baseUrl": "/",
11+
"baseUrl": "${ROOT_URL}",
1212
"redirectUris": ["${REDIRECT_URIS}/*"],
1313
"protocol": "openid-connect"
1414
}

sentrius-gcp-chart/templates/keycloak-deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ spec:
4949
- name: ROOT_LOGLEVEL
5050
value: DEBUG
5151
- name: ROOT_URL
52-
value: http://{{ .Values.subdomain }}/
52+
value: https://{{ .Values.subdomain }}/
5353
- name: REDIRECT_URIS
54-
value: http://{{ .Values.subdomain }}
54+
value: https://{{ .Values.subdomain }}
5555
- name: PROXY_ADDRESS_FORWARDING
5656
value: "true"
5757
- name: KC_HOSTNAME_STRICT_HTTPS

0 commit comments

Comments
 (0)