diff --git a/os-eap64-launch/added/launch/admin.sh b/os-eap64-launch/added/launch/admin.sh index 2d2ac1d4..a97d92b6 100644 --- a/os-eap64-launch/added/launch/admin.sh +++ b/os-eap64-launch/added/launch/admin.sh @@ -25,7 +25,5 @@ function configure_administration() { local mgmt_iface_replace_str="security-realm=\"ManagementRealm\"" sed -i "s|>| ${mgmt_iface_replace_str}>|" "$CONFIG_FILE" - else - sed -i "s|##MGMT_IFACE_REALM##||" "$CONFIG_FILE" fi } diff --git a/os-eap7-launch/added/launch/admin.sh b/os-eap7-launch/added/launch/admin.sh index 2d2ac1d4..a97d92b6 100644 --- a/os-eap7-launch/added/launch/admin.sh +++ b/os-eap7-launch/added/launch/admin.sh @@ -25,7 +25,5 @@ function configure_administration() { local mgmt_iface_replace_str="security-realm=\"ManagementRealm\"" sed -i "s|>| ${mgmt_iface_replace_str}>|" "$CONFIG_FILE" - else - sed -i "s|##MGMT_IFACE_REALM##||" "$CONFIG_FILE" fi } diff --git a/os-jdg7-launch/added/launch/management-realm.sh b/os-jdg7-launch/added/launch/management-realm.sh index 260d8d4a..ef03676b 100644 --- a/os-jdg7-launch/added/launch/management-realm.sh +++ b/os-jdg7-launch/added/launch/management-realm.sh @@ -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|||" "$CONFIG_FILE" + sed -i "s|>| ${mgmt_iface_replace_str}>|" "$CONFIG_FILE" + + sed -i "s|||" "$CONFIG_FILE" + fi } diff --git a/tests/features/datagrid/7.1/datagrid-authentication.feature b/tests/features/datagrid/7.1/datagrid-authentication.feature index 37c8ecd5..c02b7fd5 100644 --- a/tests/features/datagrid/7.1/datagrid-authentication.feature +++ b/tests/features/datagrid/7.1/datagrid-authentication.feature @@ -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 + diff --git a/tests/features/datagrid/datagrid-authentication.feature b/tests/features/datagrid/datagrid-authentication.feature index da3283b4..f5958746 100644 --- a/tests/features/datagrid/datagrid-authentication.feature +++ b/tests/features/datagrid/datagrid-authentication.feature @@ -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