From 8934cb28e5046f533360c9543f3771e1f30f729f Mon Sep 17 00:00:00 2001 From: Diana Krepinska Date: Mon, 8 Aug 2022 18:56:03 +0200 Subject: [PATCH] [WFLY-16764] Migrate ejb-txn-remote-call quickstart from legacy security to elytron --- ejb-txn-remote-call/README.adoc | 2 +- ejb-txn-remote-call/client/configuration/custom-config.xml | 5 ++++- .../client/extensions/remote-configuration.cli | 7 +++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ejb-txn-remote-call/README.adoc b/ejb-txn-remote-call/README.adoc index 880d1b456c..8762ff6d96 100644 --- a/ejb-txn-remote-call/README.adoc +++ b/ejb-txn-remote-call/README.adoc @@ -213,7 +213,7 @@ cd ${jbossHomeName}_2 xa-data-source add --name=ejbJtaDs --driver-name=postgresql --jndi-name=java:jboss/datasources/ejbJtaDs --user-name=test --password=test --xa-datasource-properties=ServerName=localhost,\ /subsystem=datasources/xa-data-source=ejbJtaDs/xa-datasource-properties=PortNumber:add(value=5432),\ /subsystem=datasources/xa-data-source=ejbJtaDs/xa-datasource-properties=DatabaseName:add(value=test)" -cd cd ${jbossHomeName}_3 +cd ${jbossHomeName}_3 # -- ditto -- ---- diff --git a/ejb-txn-remote-call/client/configuration/custom-config.xml b/ejb-txn-remote-call/client/configuration/custom-config.xml index d3abdc88dc..e2ae46beb1 100644 --- a/ejb-txn-remote-call/client/configuration/custom-config.xml +++ b/ejb-txn-remote-call/client/configuration/custom-config.xml @@ -16,7 +16,7 @@ --> - + @@ -33,6 +33,9 @@ + + + diff --git a/ejb-txn-remote-call/client/extensions/remote-configuration.cli b/ejb-txn-remote-call/client/extensions/remote-configuration.cli index 89e6421e4a..f1c6bbd151 100644 --- a/ejb-txn-remote-call/client/extensions/remote-configuration.cli +++ b/ejb-txn-remote-call/client/extensions/remote-configuration.cli @@ -24,13 +24,12 @@ echo "System properties defined" echo "Outbound socket binding 'server2' created" # adding password realm where secret is password 'quickstartUser' converted to base64 format -/core-service=management/security-realm=RemotePasswordRealm:add() -/core-service=management/security-realm=RemotePasswordRealm/server-identity=secret:add(value="cXVpY2tzdGFydFB3ZDEh") # reload # when would be run not in embed mode -echo "Security realm 'RemotePasswordRealm' created" +/subsystem=elytron/authentication-configuration=auth_config:add(authentication-name=quickstartUser,authorization-name=quickstartUser, credential-reference={clear-text=quickstartPwd1!}, realm="ApplicationRealm", sasl-mechanism-selector="DIGEST-MD5") +/subsystem=elytron/authentication-context=auth_context:add(match-rules=[{authentication-configuration=auth_config}]) -/subsystem=remoting/remote-outbound-connection=remote-ejb-connection:add(outbound-socket-binding-ref=server2, username=${remote.server.username}, security-realm=RemotePasswordRealm, protocol=remote+http) +/subsystem=remoting/remote-outbound-connection=remote-ejb-connection:add(outbound-socket-binding-ref=server2, authentication-context=auth_context) /subsystem=remoting/remote-outbound-connection=remote-ejb-connection/property=SASL_POLICY_NOANONYMOUS:add(value=false) /subsystem=remoting/remote-outbound-connection=remote-ejb-connection/property=SSL_ENABLED:add(value=false) /subsystem=remoting/remote-outbound-connection=remote-ejb-connection/property=SASL_DISALLOWED_MECHANISMS:add(value=JBOSS-LOCAL-USER)