gateway now requires a list of allowed services
[OpenSRF.git] / examples / opensrf_core.xml.example
1 <?xml version='1.0'?>
2
3 <!-- Bootstrap config file for the C opensrf_stack library -->
4 <config>
5
6
7         <opensrf> <!-- bootstrap config for the C apps -->
8       <router_name>router</router_name>
9       <routers>
10          <router>127.0.0.1</router>
11       </routers>
12       <domains>
13          <domain>127.0.0.1</domain>
14       </domains>
15       <username>client</username>
16       <passwd>mypass</passwd>
17       <port>5222</port>
18       <logfile>/openils/var/log/osrfsys.log</logfile>
19       <loglevel>3</loglevel>
20    </opensrf>
21
22
23         <chopchop> <!-- Our jabber server -->
24                 <domain>127.0.0.1</domain>
25                 <secret>secret</secret>
26                 <port>5222</port>
27                 <s2sport>5269</s2sport>
28                 <listen_address>10.0.0.3</listen_address>
29                 <loglevel>3</loglevel>
30                 <logfile>syslog</logfile>
31                 <syslog>local2</syslog>
32         </chopchop>
33
34
35         <!-- The section between <gateway>...</gateway> is a standard OpenSRF C stack config file -->
36         <gateway>
37
38                 <!--  the routers's name on the network -->
39                 <router_name>router</router_name>
40
41                 <!-- jabber domains to connect to (domain1, domain2, ...) -->
42                 <domains>
43                         <domain>127.0.0.1</domain>
44                 </domains>
45
46                 <!-- These are the services that the gateway will serve. 
47                         Any other requests will receive a HTT_NOT_FOUND -->
48                 <services>
49                         <service>opensrf.math</service> 
50                         <service>open-ils.cat</service> 
51                         <service>open-ils.search</service> 
52                         <service>open-ils.circ</service> 
53                         <service>open-ils.actor</service> 
54                         <service>open-ils.auth</service> 
55                 </services>
56
57
58                 <!-- jabber login info -->
59                 <username>mylogin</username>
60                 <passwd>mypassword</passwd>
61
62                 <!-- If the port is a positive number,
63                         we will connect via TCP port, if not and unixpath is defined,
64                         we will connect via UNIX domain socket with the given path -->
65                 <port>5222</port>
66                 <unixpath>/openils/var/sock/jserver.sock</unixpath>
67         
68                 <!-- log file location -->
69                 <logfile>/openils/var/log/gateway.log</logfile>
70                 <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug -->
71                 <loglevel>3</loglevel>
72
73         </gateway>
74
75         <rest_gateway>
76                 <router_name>router</router_name>
77                 <domains>
78                         <domain>127.0.0.1</domain>
79                 </domains>
80                 <username>mylogin</username>
81                 <passwd>mypassword</passwd>
82                 <port>5222</port>
83                 <unixpath>/openils/var/sock/jserver.sock</unixpath>
84                 <logfile>/openils/var/log/gateway.log</logfile>
85                 <loglevel>3</loglevel>
86         </rest_gateway>
87
88         <!-- ======================================================================================== -->
89
90         <router>
91                 <component>0</component> <!-- leave disabled for now -->
92         
93                 <trusted_domains>
94                         <!-- Trusted servers are allowed to register apps with the router -->
95                         <server>127.0.0.1</server>
96                         <!-- Trusted clients are allowed to send packets through the router -->
97                         <client>127.0.0.1</client>
98                 </trusted_domains>
99         
100                 <transport>
101                         <!-- jabber server are we connecting to -->
102                         <server>127.0.0.1</server>
103                         <!-- If the port is a positive number,
104                                 we will connect via TCP port, if not and unixpath is defined,
105                                 we will connect via UNIX domain socket with the given path -->
106                         <port>5222</port>
107                         <unixpath>/openils/var/sock/unix_sock</unixpath>
108
109                         <!-- router's name on the network -->
110                         <username>router</username>
111                         <password>mypassword</password>
112                         <!-- router's jabber resource --> 
113                         <resource>router</resource>
114                         <connect_timeout>10</connect_timeout>
115                         <max_reconnect_attempts>5</max_reconnect_attempts>
116                 </transport>
117         
118                 <logfile>/openils/var/log/router.log</logfile>
119                 <loglevel>3</loglevel>
120         
121         </router>
122
123         <!-- ======================================================================================== -->
124
125 </config>
126
127
128
129