5 DevGuideExamples/Security/PolicyControllingApp/README
7 This directory contains an illustration of a security aware
8 application that modifies security service policies. Similar
9 to the security unaware application example, these examples
10 vary the client and server's configurations. However, there
11 are also different paths through the client application that
12 demonstrate different policy settings.
14 For readability, long text lines from the example's service
15 configuration files are split into multiple lines. A backslash
16 indicates the end of partial line except for the final fragment.
17 The backslashes should be removed and the fragments joined for
18 use with the example programs.
20 For simplicity, the pass phrases have been stripped from the
21 private keys included with these examples in the 1.2a release.
22 This *should not* be construed as a recommended practice. Instead,
23 OCI strongly recommends that the security requirements of each
24 real-world application be evaluated carefully and that appropriate
25 procedures and practice be established accordingly. Private keys
26 without pass phrase protection are easily compromised and may
27 allow an unauthorized party to masquerade as an authorized system
30 Prior to running the server in these examples, the SSL_CERT_FILE
31 environment variable must be set, e.g.,
33 export SSL_CERT_FILE=cacert.pem
36 set SSL_CERT_FILE=cacert.pem
38 Example 1: Client sets Quality of Protection to NoProtection
39 ------------------------------------------------------------
40 The server is configured to accept both secured and unsecured
41 invocations (by setting -SSLNoProtection). The client is
42 configured to make secured invocations only. The client
43 application sets the quality of protection policy to
44 no protection to make an unsecured invocation to the server.
46 The server's configuration is:
51 dynamic SSLIOP_Factory Service_Object * TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory() \
53 -SSLAuthenticate SERVER_AND_CLIENT \
54 -SSLPrivateKey PEM:server_key.pem \
55 -SSLCertificate PEM:server_cert.pem"
57 static Resource_Factory "-ORBProtocolFactory SSLIOP_Factory"
62 The client's configuration is:
67 dynamic SSLIOP_Factory Service_Object * TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory() \
68 "-SSLAuthenticate NONE \
69 -SSLPrivateKey PEM:client_key.pem \
70 -SSLCertificate PEM:client_cert.pem"
72 static Resource_Factory "-ORBProtocolFactory SSLIOP_Factory"
78 ./MessengerServer -ORBSvcConf server.conf
81 ./MessengerClient -e 1 -ORBSvcConf client.conf
83 Note: as presented in the 1.2a Developer's Guide, the client code
84 for this first example also manipulates the establish trust
85 policy. After the text went to print, changes in TAO have required
86 a change to this example such that the establish trust policy can't
87 be modified as shown in the text without causing an exception. This
88 example has been modified accordingly to execute without causing an
91 Example 2: Client sets Quality of Protection to IntegrityAndConfidentiality
92 and EstablishTrust to authenticate the server
93 ---------------------------------------------------------------------------
94 The server is configured to accept secured invocations only. The client
95 is configured to issue unsecured invocations by default (-SSLNoProtection is
96 set). The client sets the quality of protection policy to integrity and
97 confidentiality and establish trust policy to authenticate the server. This
98 can only be achieved via a secured invocation.
100 The server's configuration is:
105 dynamic SSLIOP_Factory Service_Object * TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory() \
106 "-SSLAuthenticate SERVER_AND_CLIENT \
107 -SSLPrivateKey PEM:server_key.pem \
108 -SSLCertificate PEM:server_cert.pem"
110 static Resource_Factory "-ORBProtocolFactory SSLIOP_Factory"
112 # end of server1.conf
115 The client's configuration is:
120 dynamic SSLIOP_Factory Service_Object * TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory() \
122 -SSLAuthenticate NONE \
123 -SSLPrivateKey PEM:client_key.pem \
124 -SSLCertificate PEM:client_cert.pem"
126 static Resource_Factory "-ORBProtocolFactory SSLIOP_Factory"
128 # end of client1.conf
132 ./MessengerServer -ORBSvcConf server1.conf
135 ./MessengerClient -e 2 -ORBSvcConf client1.conf
138 --------------------------------------------------
139 Files: DevGuideExamples/Security/PolicyControllingApp
141 Messenger.idl - Messenger interface definition.
142 Messenger_i.h - Messenger servant class definition.
143 Messenger_i.cpp - Messenger servant implementation.
144 MessengerServer.cpp - MessengerServer process main.
145 MessengerClient.cpp - MessengerClient process main.