Page tree
Skip to end of metadata
Go to start of metadata

Resource Catalog is configured using a JSON configuration file, path to which is provided to the RC via -conf flag.

The default configuration file (provided in the binary distribution) is located at
conf/resource-catalog.json

Configuration File

RC config file
{
    "description": "string",
    "dnssdEnabled": "bool",
    "publicEndpoint": "string",
    "bindAddr": "string",
    "bindPort": "int",
    "apiLocation": "string",
    "staticDir": "string",
    "storage": {
        "type": "string",
        "dsn": "string"
    },
    "serviceCatalog": [
        {
            "discover": "bool",
            "endpoint": "string",
            "ttl": "int"
        }
    ]
}
where
  • description is a human-readable description
  • dnssdEnabled is a flag enabling DNS-SD advertisement of the catalog on the network
  • publicEndpoint is the URL of the gateway protocol://fqdn:port, which must be accessible in the deployment environment
  • bindAddr is the bind address for the Resource Catalog API
  • bindPort is the tcp port for the API
  • apiLocation is the API location (path in the endpoint URL)
  • staticDir is the path to the directory with static files
  • storage is the configuration of the storage backend
    • type is the type of the backend (supported backends are memory and leveldb)
    • dsn is the Data Source Name for storage backend (ignored for memory, "file:///path/to/ldb" for leveldb)
  • serviceCatalog is an array of Service Catalogs. The Resource Catalog will be published as a service to each configured Service Catalog (if not empty)
    • discover is a flag enabling automatic discovery of the Service Catalog using DNS-SD
    • endpoint is the URL of the remote Service Catalog API (http://address:port/path)
    • ttl is the TTL for the service registration

Sample configuration file: resource-catalog.json


Authentication

The auth field configures the Authentication for Resource Catalog

    "auth": {
        "enabled": "bool",
        "provider": "string",
        "providerURL": "string",
        "serviceID": "string",
        "basicEnabled": "bool",
        "authorization": {}
    }

where

  • enabled is a boolean flag enabling/disabling the authentication
  • provider is the name of a supported auth provider
  • providerURL is the URL of the auth provider endpoint
  • serviceID is the ID of the service in the authentication provider (used for validating auth tokens provided by the clients)
  • basicEnabled is a boolean flag enabling/disabling the Basic Authentication
  • authorization - optional, see authorization configuation

To publish the Resource Catalog to an authenticated Service Catalog, the auth field of that catalog should be set:

    "serviceCatalog": [
        {
            "discover": "bool",
            "endpoint": "string",
            "ttl": "int",
            "auth": {
                "provider": "string",
                "providerURL": "string",
                "username": "string",
                "password": "string",
                "serviceID": "string"
            }
        }
    ]

where

  • provider and providerURL are the authentication configurations used by that Service Catalog
  • username and password are the authentication credentials for accessing that Service Catalog
  • serviceID is the ID of that Service Catalog in the authentication provider


Sample configuration file with authentication and authorization: resource-catalog-auth.json

  • No labels