Skip to content

Commit 98d343c

Browse files
wdecostercernich
authored andcommitted
cloud-2003 fix inconsistencies in eap admin.sh and jdg management-realm.sh
1 parent 6073cc2 commit 98d343c

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

os-eap64-launch/added/launch/admin.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,5 @@ function configure_administration() {
2525

2626
local mgmt_iface_replace_str="security-realm=\"ManagementRealm\""
2727
sed -i "s|><!-- ##MGMT_IFACE_REALM## -->| ${mgmt_iface_replace_str}>|" "$CONFIG_FILE"
28-
else
29-
sed -i "s|##MGMT_IFACE_REALM##||" "$CONFIG_FILE"
3028
fi
3129
}

os-eap7-launch/added/launch/admin.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,5 @@ function configure_administration() {
2525

2626
local mgmt_iface_replace_str="security-realm=\"ManagementRealm\""
2727
sed -i "s|><!-- ##MGMT_IFACE_REALM## -->| ${mgmt_iface_replace_str}>|" "$CONFIG_FILE"
28-
else
29-
sed -i "s|##MGMT_IFACE_REALM##||" "$CONFIG_FILE"
3028
fi
3129
}

os-jdg7-launch/added/launch/management-realm.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ function configure() {
99
}
1010

1111
function add_management_interface_realm() {
12-
if [ -n "$MGMT_IFACE_REALM" ]; then
13-
local mgmt_iface_replace_str="security-realm=\"$MGMT_IFACE_REALM\""
14-
fi
12+
if [ -n "$MGMT_IFACE_REALM" ]; then
13+
local mgmt_iface_replace_str="security-realm=\"$MGMT_IFACE_REALM\" "
1514

16-
sed -i "s|<http-interface http-upgrade-enabled=\"true\" console-enabled=\"false\">|<http-interface http-upgrade-enabled=\"true\" console-enabled=\"false\" ${mgmt_iface_replace_str}>|" "$CONFIG_FILE"
15+
sed -i "s|><!-- ##MGMT_IFACE_REALM## -->| ${mgmt_iface_replace_str}>|" "$CONFIG_FILE"
16+
17+
sed -i "s|<http-interface http-upgrade-enabled=\"true\" console-enabled=\"false\" security-realm=\"ManagementRealm\">|<http-interface http-upgrade-enabled=\"true\" console-enabled=\"false\" ${mgmt_iface_replace_str}>|" "$CONFIG_FILE"
18+
fi
1719
}

tests/features/datagrid/7.1/datagrid-authentication.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,12 @@ Feature: JDG OpenShift simple authentication
66
| variable | value |
77
| MGMT_IFACE_REALM | ApplicationRealm |
88
Then XML file /opt/datagrid/standalone/configuration/clustered-openshift.xml should contain value ApplicationRealm on XPATH //*[local-name()='http-interface']/@security-realm
9+
10+
Scenario: check management interface security realm
11+
When container is started with env
12+
| variable | value |
13+
| ADMIN_USERNAME | tombrady |
14+
| ADMIN_PASSWORD | 5Rings!!! |
15+
| MGMT_IFACE_REALM | ApplicationRealm |
16+
Then XML file /opt/datagrid/standalone/configuration/clustered-openshift.xml should contain value ApplicationRealm on XPATH //*[local-name()='http-interface']/@security-realm
17+

tests/features/datagrid/datagrid-authentication.feature

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,3 @@ Feature: JDG OpenShift simple authentication
99
Then file /opt/datagrid/standalone/configuration/application-users.properties should contain openshift=7d540d09717694371fc426a7190c6021
1010
And file /opt/datagrid/standalone/configuration/application-roles.properties should contain openshift=REST,admin
1111

12-
@jboss-datagrid-7
13-
Scenario: check management interface security realm
14-
When container is started with env
15-
| variable | value |
16-
| MGMT_IFACE_REALM | ApplicationRealm |
17-
Then XML file /opt/datagrid/standalone/configuration/clustered-openshift.xml should contain value ApplicationRealm on XPATH //*[local-name()='http-interface']/@security-realm

0 commit comments

Comments
 (0)