-
Notifications
You must be signed in to change notification settings - Fork 6
/
wildlfly-commands.cli
40 lines (33 loc) · 2.24 KB
/
wildlfly-commands.cli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# These commands will configure wildfly 9 for dukes-forest
# First, add a mysql driver module into the wildfly server
module add --name=com.mysql --resources=C:\Progra~2\MySQL\CONNEC~1.31\mysql-connector-java-5.1.31-bin.jar --dependencies=javax.api,javax.transaction.api
# create a mysql driver
/subsystem=datasources/jdbc-driver=mysql:add(driver-name="mysql",driver-module-name="com.mysql",driver-class-name=com.mysql.jdbc.Driver,driver-xa-datasource-class-name=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource)
# create a ForestDataSource
xa-data-source add --name=ForestXADS --driver-name=mysql --jndi-name=java:jboss/ForestXADS --user-name=forest --password=forest --xa-datasource-properties=[{URL=jdbc:mysql://localhost:3306/forest}]
# Add a JMS OrderQueue
jms-queue add --queue-address=OrderQueue --entries=java:global/jms/queue/OrderQueue
# Create a dukes-forest security-domain
/subsystem=security/security-domain=dukes-forest:add(cache-type="default")
/subsystem=security/security-domain=dukes-forest/authentication=classic:add(login-modules=[{ \
"code"="org.jboss.security.auth.spi.DatabaseServerLoginModule", \
"flag"="required", \
"module-options"=[ \
dsJndiName=>"java:/jboss/ForestXADS", \
principalsQuery=>"select PASSWORD from forest.PERSON where EMAIL=?", \
rolesQuery=>"select NAME as 'ROLES', 'Roles' as 'ROLEGROUP' from forest.GROUPS g inner join forest.PERSON_GROUPS pg on g.ID = pg.GROUPS_ID join forest.PERSON p on p.EMAIL = pg.EMAIL where p.EMAIL = ?", \
hashAlgorithm=>"MD5", \
hashEncoding=>"HEX", \
] }] )
/subsystem=security/security-domain=dukes-forest/authorization=classic:add(policy-modules=[{ \
"code"="org.jboss.security.auth.spi.DatabaseServerLoginModule", \
"flag"="required", \
"module-options"=[ \
dsJndiName=>"java:/jboss/ForestXADS", \
principalsQuery=>"select PASSWORD from forest.PERSON where EMAIL=?", \
rolesQuery=>"select NAME as 'ROLES', 'Roles' as 'ROLEGROUP' from forest.GROUPS g inner join forest.PERSON_GROUPS pg on g.ID = pg.GROUPS_ID join forest.PERSON p on p.EMAIL = pg.EMAIL where p.EMAIL = ?", \
hashAlgorithm=>"MD5", \
hashEncoding=>"HEX", \
] }] )
# reload the server
reload