blob: b119aabbdd5381e8800f48c4e831ca5667885e2e [file] [log] [blame]
Chengyu Fanb25835b2015-04-28 17:09:35 -06001; The catalog section contains settings of catalog
Chengyu Fanf4c747a2015-08-18 13:56:01 -06002general
Chengyu Fanb25835b2015-04-28 17:09:35 -06003{
4 ; Set the catalog prefix, so that adapters can extend it as their own prefix
5 ; e.g., suppose that the catalog has the prefix "ndn:/cmip5", so QueryAdapter has the prefix
6 ; "ndn:/cmip5/catalog/query" and "ndn:/cmip5/catalog/query-results",
7 ; PublishAdapter has the prefix "ndn:/cmip5/catalog/publish"
8
Chengyu Fan3b9bb342015-09-21 10:53:37 -06009 prefix /cmip5
Chengyu Fan92440162015-07-09 14:43:31 -060010
Chengyu Fanf4c747a2015-08-18 13:56:01 -060011 ; Set name components for the scientific data, for example, the climate data
12 ; contains name fields like activity, ..., time
Chengyu Fan92440162015-07-09 14:43:31 -060013 nameFields activity,product,organization,model,experiment,frequency,modeling_realm,variable_name,ensemble,time
Chengyu Fanf4c747a2015-08-18 13:56:01 -060014
15 ; Set the database table name for the scientific data
16 databaseTable cmip5
Chengyu Fanb25835b2015-04-28 17:09:35 -060017}
18
19; The queryAdapter section contains settings of queryAdapter
20queryAdapter
21{
Chengyu Fanf4c747a2015-08-18 13:56:01 -060022 ; ; Set the Identity that signs data that respond the queries
23 ; ; If the identity contains multiple keys, use the default one
24 ; signingId ndn:/cmip5/test/query/identity
Chengyu Fanb25835b2015-04-28 17:09:35 -060025
Chengyu Fanf4c747a2015-08-18 13:56:01 -060026 ; Set the filter category names, for example,
27 ; the filter category contains name fields like activity, ..., ensemble
28 filterCategoryNames activity,product,organization,model,experiment,frequency,modeling_realm,variable_name,ensemble
29
30 ; Set database settings for QueryAdapter
Chengyu Fanb25835b2015-04-28 17:09:35 -060031 database
32 {
33 dbServer 127.0.0.1 ; Specify the database server
34 dbName testdb ; Specify the database name
Chengyu Fan3b9bb342015-09-21 10:53:37 -060035 dbUser testuser ; Specify the database user name
36 dbPasswd test623 ; Specify the associated password for the dbUser
Chengyu Fanb25835b2015-04-28 17:09:35 -060037 }
38}
39
40; The publishAdapter section contains settings of publishAdapter
41publishAdapter
42{
Chengyu Fanf4c747a2015-08-18 13:56:01 -060043 ; Set the Identity that signs data that respond the queries
44 ; If the identity contains multiple keys, use the default one
45 ; signingId ndn:/cmip5/test/query/identity
Chengyu Fanb25835b2015-04-28 17:09:35 -060046
Chengyu Fanf4c747a2015-08-18 13:56:01 -060047 ; The security section contains the rules for the adapter to verify the
48 ; published files indeed come from a valid publisher.
Chengyu Fan3b9bb342015-09-21 10:53:37 -060049 security
50 {
51 rule
52 {
53 id "Publishing data is signed by the Datapublisher's dsk"
54 for data ; rule for Data (to validate NDN certificates)
55 filter
56 {
57 type name
58 regex ^<><><><>$ ; condition on data name
59 }
60 checker
61 {
62 type customized
63 sig-type rsa-sha256
64 key-locator
65 {
66 type name
67 hyper-relation
68 {
69 k-regex ^([^<DataPublisher><KEY>]*)<DataPublisher><KEY><dsk-.*><ID-CERT>$
70 k-expand \\1
71 h-relation equal
72 p-regex ^(<>)<>(<>)<>$
73 p-expand \\1\\2
74 }
75 }
76 }
77 }
78
79 rule
80 {
81 id "Datapublisher's dsk is signed by its ksk"
82 for data
83 filter
84 {
85 type name
86 regex ^[^<DataPublisher><KEY>]*<DataPublisher><KEY><dsk-.*><ID-CERT><>$
87 }
88 checker
89 {
90 type customized
91 sig-type rsa-sha256
92 key-locator
93 {
94 type name
95 hyper-relation
96 {
97 k-regex ^([^<DataPublisher><KEY>]*)<DataPublisher><KEY><ksk-.*><ID-CERT>$
98 k-expand \\1
99 h-relation equal
100 p-regex ^([^<DataPublisher><KEY>]*)<DataPublisher><KEY><dsk-.*><ID-CERT><>$
101 p-expand \\1
102 }
103 }
104 }
105 }
106
107 rule
108 {
109 id "DataPublisher's ksk signed by the site's ksk"
110 for data
111 filter
112 {
113 type name
114 regex ^[^<DataPublisher><KEY>]*<DataPublisher><KEY><ksk-.*><ID-CERT><>$
115 }
116 checker
117 {
118 type customized
119 sig-type rsa-sha256
120 key-locator
121 {
122 type name
123 hyper-relation
124 {
125 k-regex ^([^<KEY>]*)<KEY><ksk-.*><ID-CERT>$
126 k-expand \\1
127 h-relation equal
128 p-regex ^([^<DataPublisher><KEY>]*)<DataPublisher><KEY><ksk-.*><ID-CERT><>$
129 p-expand \\1
130 }
131 }
132 }
133 }
134
135 rule
136 {
137 id "publishing Hierarchical Rule"
138 for data
139 filter
140 {
141 type name
142 regex ^[^<KEY>]*<KEY><ksk-.*><ID-CERT><>$
143 }
144 checker
145 {
146 type hierarchical
147 sig-type rsa-sha256
148 }
149 }
150
151 trust-anchor
152 {
153 type file
154 file-name /usr/local/etc/ndn/nlsr/keys/cmip5_root.cert ; the file name of trust-anchor
155 }
156
157 }
Chengyu Fanb25835b2015-04-28 17:09:35 -0600158
159 ; The database section contains settings of database
160 ; The user in publishAdapter may differ from the one in queryAdapter, to provide different
161 ; access control
162 database
163 {
164 dbServer 127.0.0.1 ; Specify the database server
165 dbName testdb ; Specify the database name
Chengyu Fan3b9bb342015-09-21 10:53:37 -0600166 dbUser testuser ; Specify the database user name
167 dbPasswd test623 ; Specify the associated password for the dbUser
Chengyu Fanb25835b2015-04-28 17:09:35 -0600168 }
169
170 ; The sync section contains settings of ChronoSync
171 sync
172 {
173 ; Set the prefix for sync messages, default 'ndn:/ndn/broadcast'
Chengyu Fanf4c747a2015-08-18 13:56:01 -0600174 prefix /ndn/broadcast
Chengyu Fanb25835b2015-04-28 17:09:35 -0600175
Chengyu Fanf4c747a2015-08-18 13:56:01 -0600176 ; The sync_data_security section contains the rules that are required for ChronoSync nodes to
177 ; verify published data by other ChronoSync nodes.
178 ; The ChronoSync validator will be disabled when sync_data_security section is missing.
179
Chengyu Fanb25835b2015-04-28 17:09:35 -0600180 ; sync_data_security
181 ; {
Chengyu Fanf4c747a2015-08-18 13:56:01 -0600182 ; ; This section defines the trust model for the ChronoSync data Management. It consists of
183 ; ; rules and trust-anchors, which are briefly defined in this file. Multiple rules can be
184 ; ; included
Chengyu Fanb25835b2015-04-28 17:09:35 -0600185 ; ; rule
186 ; ; {
187 ; ; id "ChronoSync Update Messages Rule"
188 ; ; for data ; rule for Data (to validate NDN certificates)
189 ; ; filter
190 ; ; {
191 ; ; type name ; condition on data name
192 ; ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$
193 ; ; }
194 ; ; checker
195 ; ; {
196 ; ; type hierarchical ; the certificate name of the signing key and
197 ; ; ; the data name must follow the hierarchical model
198 ; ; sig-type rsa-sha256 ; data must have a rsa-sha256 signature
199 ; ; }
200 ; ; }
201 ; ; trust-anchor
202 ; ; {
203 ; ; type file
204 ; ; file-name keys/default.ndncert ; the file name, by default this file should be placed in
205 ; ; ; the same folder as this config file.
206 ; ; }
207 ; }
208 }
209}