Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
8.2.5. Enable SSL on Windows
Procedure 8.2. Create SSL certificates on the broker
- Execute the following commands on the broker to export a certificate:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Verify that the files exist:
ls
# ls cert8.db client.p12 client.pem key3.db secmod.db ssl_pw_file
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 8.3. Copy the qpid_nss_db
folder to other broker machines and set qpidd
as its owner
- Execute the following commands on the other brokers to copy the files from the first broker:
scp -r qpid_nss_db root@other-broker.com:/var/lib/qpidd chown -R qpidd:qpidd qpid_nss_db
# scp -r qpid_nss_db root@other-broker.com:/var/lib/qpidd # chown -R qpidd:qpidd qpid_nss_db
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Verify the files and their permissions:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 8.4. Modify broker configuration file
- Edit the broker configuration file
/etc/qpid/qpidd.conf
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 8.5. Start the broker
- Start the broker and verify that it is listening on the SSL port:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 8.6. Create a folder to export onto Windows machines
- Execute the following instructions to:
- Create a folder to export onto Windows machines
- Create a new password file in .txt format
- Export certification authority certificate to .cer format
- Export client certificate to .pfx format
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Verify that the files exist:
ls windir
# ls windir client.pfx qrootCA.cer win_pw_file.txt
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 8.7. Copy files to Windows machine
- Copy the
windir
folder onto the Windows machine.
The following procedure, to install the Certificate on the Windows machine has two options - using the GUI, or using the command-line.
Procedure 8.8. Install Certification Authority - GUI
- On the Windows machine, run
mmc
- Click/
- Select-> -> -> -> ->
- In the console unpack Certificates (Local Computer)
- Right click on Trusted Root Certification Authorities, and select
- Set the path to the
qrootCA.cer
file, select Trusted Root Certification Authorities certificate store, confirm the action and save the console settings.
Procedure 8.9. Install Certification Authority - Command-line
- Execute the following command to import the certificate at the command-line:
certmgr.exe -add -c C:\windir\qrootca.cer -s -r localMachine root
certmgr.exe -add -c C:\windir\qrootca.cer -s -r localMachine root
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 8.10. Test connection
- Execute the following at the command line to test the connection (no environment variables must be set):
C:\qpid_VS2008\bin\Release>spout.exe --broker broker-server.com:5671 --connection-options {transport:ssl} "amq.topic"
C:\qpid_VS2008\bin\Release>spout.exe --broker broker-server.com:5671 --connection-options {transport:ssl} "amq.topic"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
You can install the certificate in the Windows machine certificate store, or specify it via environment variables.
Procedure 8.11. Install Certificate in Windows Certificate Store
client.pfx
into Current User/Personal certificate store:
- Run
mmc
- Click/
- Select-> -> -> ->
- In the console unpack
- Right click on.
- Select.
- Assign path to the
client.pfx
file - Click on.
- Type a password from
win_pw_file.txt
(password2 in our case). - Chooseand save the console settings.
- Modify broker configuration to require client authentication and restart it .
- Set up environment variables:
>set QPID_SSL_CERT_STORE=My >set QPID_SSL_CERT_NAME=client
>set QPID_SSL_CERT_STORE=My >set QPID_SSL_CERT_NAME=client
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Test it by sending a message:
>C:\qpid_VS2008\bin\Release>spout.exe --broker broker-server.com:5671 --connection-options {transport:ssl,sasl-mechanisms:EXTERNAL} amq.topic
>C:\qpid_VS2008\bin\Release>spout.exe --broker broker-server.com:5671 --connection-options {transport:ssl,sasl-mechanisms:EXTERNAL} amq.topic
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 8.12. Specify Certificate via Environment
- Set up environmental variables on the Windows machine:
>set QPID_SSL_CERT_FILENAME=<path_to_the_client.pfx> >set QPID_SSL_CERT_PASSWORD_FILE=<path_to_the_win_pw_file.txt> >set QPID_SSL_CERT_NAME=client
>set QPID_SSL_CERT_FILENAME=<path_to_the_client.pfx> >set QPID_SSL_CERT_PASSWORD_FILE=<path_to_the_win_pw_file.txt> >set QPID_SSL_CERT_NAME=client
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Test it by sending a message:
C:\qpid_VS2008\bin\Release>spout.exe --broker broker-server.com:5671 --connection-options {transport:ssl,sasl-mechanisms:EXTERNAL} amq.topic
C:\qpid_VS2008\bin\Release>spout.exe --broker broker-server.com:5671 --connection-options {transport:ssl,sasl-mechanisms:EXTERNAL} amq.topic
Copy to Clipboard Copied! Toggle word wrap Toggle overflow