Skip to content

Commit

Permalink
cloud-2003 fix inconsistencies in eap admin.sh and jdg management-rea…
Browse files Browse the repository at this point in the history
…lm.sh
  • Loading branch information
wdecoste authored and rcernich committed Oct 6, 2017
1 parent 6073cc2 commit 98d343c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 0 additions & 2 deletions os-eap64-launch/added/launch/admin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,5 @@ function configure_administration() {

local mgmt_iface_replace_str="security-realm=\"ManagementRealm\""
sed -i "s|><!-- ##MGMT_IFACE_REALM## -->| ${mgmt_iface_replace_str}>|" "$CONFIG_FILE"
else
sed -i "s|##MGMT_IFACE_REALM##||" "$CONFIG_FILE"
fi
}
2 changes: 0 additions & 2 deletions os-eap7-launch/added/launch/admin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,5 @@ function configure_administration() {

local mgmt_iface_replace_str="security-realm=\"ManagementRealm\""
sed -i "s|><!-- ##MGMT_IFACE_REALM## -->| ${mgmt_iface_replace_str}>|" "$CONFIG_FILE"
else
sed -i "s|##MGMT_IFACE_REALM##||" "$CONFIG_FILE"
fi
}
10 changes: 6 additions & 4 deletions os-jdg7-launch/added/launch/management-realm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ function configure() {
}

function add_management_interface_realm() {
if [ -n "$MGMT_IFACE_REALM" ]; then
local mgmt_iface_replace_str="security-realm=\"$MGMT_IFACE_REALM\""
fi
if [ -n "$MGMT_IFACE_REALM" ]; then
local mgmt_iface_replace_str="security-realm=\"$MGMT_IFACE_REALM\" "

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"
sed -i "s|><!-- ##MGMT_IFACE_REALM## -->| ${mgmt_iface_replace_str}>|" "$CONFIG_FILE"

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"
fi
}
9 changes: 9 additions & 0 deletions tests/features/datagrid/7.1/datagrid-authentication.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ Feature: JDG OpenShift simple authentication
| variable | value |
| MGMT_IFACE_REALM | ApplicationRealm |
Then XML file /opt/datagrid/standalone/configuration/clustered-openshift.xml should contain value ApplicationRealm on XPATH //*[local-name()='http-interface']/@security-realm

Scenario: check management interface security realm
When container is started with env
| variable | value |
| ADMIN_USERNAME | tombrady |
| ADMIN_PASSWORD | 5Rings!!! |
| MGMT_IFACE_REALM | ApplicationRealm |
Then XML file /opt/datagrid/standalone/configuration/clustered-openshift.xml should contain value ApplicationRealm on XPATH //*[local-name()='http-interface']/@security-realm

6 changes: 0 additions & 6 deletions tests/features/datagrid/datagrid-authentication.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ Feature: JDG OpenShift simple authentication
Then file /opt/datagrid/standalone/configuration/application-users.properties should contain openshift=7d540d09717694371fc426a7190c6021
And file /opt/datagrid/standalone/configuration/application-roles.properties should contain openshift=REST,admin

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

0 comments on commit 98d343c

Please sign in to comment.