blob: b119aabbdd5381e8800f48c4e831ca5667885e2e [file] [log] [blame]
; The catalog section contains settings of catalog
general
{
; Set the catalog prefix, so that adapters can extend it as their own prefix
; e.g., suppose that the catalog has the prefix "ndn:/cmip5", so QueryAdapter has the prefix
; "ndn:/cmip5/catalog/query" and "ndn:/cmip5/catalog/query-results",
; PublishAdapter has the prefix "ndn:/cmip5/catalog/publish"
prefix /cmip5
; Set name components for the scientific data, for example, the climate data
; contains name fields like activity, ..., time
nameFields activity,product,organization,model,experiment,frequency,modeling_realm,variable_name,ensemble,time
; Set the database table name for the scientific data
databaseTable cmip5
}
; The queryAdapter section contains settings of queryAdapter
queryAdapter
{
; ; Set the Identity that signs data that respond the queries
; ; If the identity contains multiple keys, use the default one
; signingId ndn:/cmip5/test/query/identity
; Set the filter category names, for example,
; the filter category contains name fields like activity, ..., ensemble
filterCategoryNames activity,product,organization,model,experiment,frequency,modeling_realm,variable_name,ensemble
; Set database settings for QueryAdapter
database
{
dbServer 127.0.0.1 ; Specify the database server
dbName testdb ; Specify the database name
dbUser testuser ; Specify the database user name
dbPasswd test623 ; Specify the associated password for the dbUser
}
}
; The publishAdapter section contains settings of publishAdapter
publishAdapter
{
; Set the Identity that signs data that respond the queries
; If the identity contains multiple keys, use the default one
; signingId ndn:/cmip5/test/query/identity
; The security section contains the rules for the adapter to verify the
; published files indeed come from a valid publisher.
security
{
rule
{
id "Publishing data is signed by the Datapublisher's dsk"
for data ; rule for Data (to validate NDN certificates)
filter
{
type name
regex ^<><><><>$ ; condition on data name
}
checker
{
type customized
sig-type rsa-sha256
key-locator
{
type name
hyper-relation
{
k-regex ^([^<DataPublisher><KEY>]*)<DataPublisher><KEY><dsk-.*><ID-CERT>$
k-expand \\1
h-relation equal
p-regex ^(<>)<>(<>)<>$
p-expand \\1\\2
}
}
}
}
rule
{
id "Datapublisher's dsk is signed by its ksk"
for data
filter
{
type name
regex ^[^<DataPublisher><KEY>]*<DataPublisher><KEY><dsk-.*><ID-CERT><>$
}
checker
{
type customized
sig-type rsa-sha256
key-locator
{
type name
hyper-relation
{
k-regex ^([^<DataPublisher><KEY>]*)<DataPublisher><KEY><ksk-.*><ID-CERT>$
k-expand \\1
h-relation equal
p-regex ^([^<DataPublisher><KEY>]*)<DataPublisher><KEY><dsk-.*><ID-CERT><>$
p-expand \\1
}
}
}
}
rule
{
id "DataPublisher's ksk signed by the site's ksk"
for data
filter
{
type name
regex ^[^<DataPublisher><KEY>]*<DataPublisher><KEY><ksk-.*><ID-CERT><>$
}
checker
{
type customized
sig-type rsa-sha256
key-locator
{
type name
hyper-relation
{
k-regex ^([^<KEY>]*)<KEY><ksk-.*><ID-CERT>$
k-expand \\1
h-relation equal
p-regex ^([^<DataPublisher><KEY>]*)<DataPublisher><KEY><ksk-.*><ID-CERT><>$
p-expand \\1
}
}
}
}
rule
{
id "publishing Hierarchical Rule"
for data
filter
{
type name
regex ^[^<KEY>]*<KEY><ksk-.*><ID-CERT><>$
}
checker
{
type hierarchical
sig-type rsa-sha256
}
}
trust-anchor
{
type file
file-name /usr/local/etc/ndn/nlsr/keys/cmip5_root.cert ; the file name of trust-anchor
}
}
; The database section contains settings of database
; The user in publishAdapter may differ from the one in queryAdapter, to provide different
; access control
database
{
dbServer 127.0.0.1 ; Specify the database server
dbName testdb ; Specify the database name
dbUser testuser ; Specify the database user name
dbPasswd test623 ; Specify the associated password for the dbUser
}
; The sync section contains settings of ChronoSync
sync
{
; Set the prefix for sync messages, default 'ndn:/ndn/broadcast'
prefix /ndn/broadcast
; The sync_data_security section contains the rules that are required for ChronoSync nodes to
; verify published data by other ChronoSync nodes.
; The ChronoSync validator will be disabled when sync_data_security section is missing.
; sync_data_security
; {
; ; This section defines the trust model for the ChronoSync data Management. It consists of
; ; rules and trust-anchors, which are briefly defined in this file. Multiple rules can be
; ; included
; ; rule
; ; {
; ; id "ChronoSync Update Messages Rule"
; ; for data ; rule for Data (to validate NDN certificates)
; ; filter
; ; {
; ; type name ; condition on data name
; ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$
; ; }
; ; checker
; ; {
; ; type hierarchical ; the certificate name of the signing key and
; ; ; the data name must follow the hierarchical model
; ; sig-type rsa-sha256 ; data must have a rsa-sha256 signature
; ; }
; ; }
; ; trust-anchor
; ; {
; ; type file
; ; file-name keys/default.ndncert ; the file name, by default this file should be placed in
; ; ; the same folder as this config file.
; ; }
; }
}
}