Browse Source

Generate full content for sasl configuration files

Change-Id: Id8b0eb735733135e9584db93aaf3d1b96dd42c74
Andrew Smith 2 years ago
parent
commit
590aef9fbe
1 changed files with 15 additions and 3 deletions
  1. 15
    3
      devstack/plugin.sh

+ 15
- 3
devstack/plugin.sh View File

@@ -112,7 +112,13 @@ acl deny all all
112 112
 EOF
113 113
         # Add user to SASL database
114 114
         local sasl_conf_file=/etc/sasl2/qpidd.conf
115
-        sudo sed -i.bak '/PLAIN/!s/mech_list: /mech_list: PLAIN /' $sasl_conf_file
115
+        cat <<EOF | sudo tee $sasl_conf_file
116
+pwcheck_method: auxprop
117
+auxprop_plugin: sasldb
118
+sasldb_path: /var/lib/qpidd/qpidd.sasldb
119
+mech_list: PLAIN
120
+sql_select: dummy select
121
+EOF
116 122
         local sasl_db
117 123
         sasl_db=`sudo grep sasldb_path $sasl_conf_file | cut -f 2 -d ":" | tr -d [:blank:]`
118 124
         if [ ! -e $sasl_db ]; then
@@ -202,13 +208,19 @@ EOF
202 208
             read_password AMQP1_PASSWORD "ENTER A PASSWORD FOR QPID DISPATCH USER $AMQP1_USERNAME"
203 209
         fi
204 210
         cat <<EOF | sudo tee --append $qdr_conf_file
205
-        authenticatePeer: yes
211
+    authenticatePeer: yes
206 212
 }
207 213
 
208 214
 EOF
209 215
         # Add user to SASL database
210 216
         local sasl_conf_file=/etc/sasl2/qdrouterd.conf
211
-        sudo sed -i.bak '/PLAIN/!s/mech_list: /mech_list: PLAIN /' $sasl_conf_file
217
+        cat <<EOF | sudo tee $sasl_conf_file
218
+pwcheck_method: auxprop
219
+auxprop_plugin: sasldb
220
+sasldb_path: /var/lib/qdrouterd/qdrouterd.sasldb
221
+mech_list: PLAIN
222
+sql_select: dummy select
223
+EOF
212 224
         local sasl_db
213 225
         sasl_db=`sudo grep sasldb_path $sasl_conf_file | cut -f 2 -d ":" | tr -d [:blank:]`
214 226
         if [ ! -e $sasl_db ]; then

Loading…
Cancel
Save