Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFLY-16764] Migrate ejb-txn-remote-call quickstart from legacy security to elytron #577

Merged
merged 1 commit into from Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion ejb-txn-remote-call/README.adoc
Expand Up @@ -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 --
----

Expand Down
Expand Up @@ -16,7 +16,7 @@
-->
<!-- For OpenShift: this xml file will be copied by WildFly s2i scripts under $JBOSS_HOME/configuration directory -->
<configuration>
<authentication-client xmlns="urn:elytron:1.0">
<authentication-client xmlns="urn:elytron:1.5">
<authentication-rules>
<rule use-configuration="jta">
<match-abstract-type name="jta" authority="jboss"/>
Expand All @@ -33,6 +33,9 @@
<clear-password password="quickstartPwd1!"/>
</credentials>
<set-mechanism-realm name="ApplicationRealm"/>
<providers>
<use-service-loader />
</providers>
</configuration>
</authentication-configurations>
</authentication-client>
Expand Down
Expand Up @@ -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)
Expand Down