Skip to content

Commit

Permalink
Merge pull request #190 from rptaylor/patch-16
Browse files Browse the repository at this point in the history
improve docs for advanced gateway key config
  • Loading branch information
jblomer committed Sep 29, 2022
2 parents 7f52188 + 198596a commit c036478
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions cpt-repository-gateway.rst
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,16 @@ Advanced repository configuration
=================================

It's possible to register multiple API keys with each repository, and each key
can be restricted to a specific subpath of the repository: ::
can be restricted to a specific subpath of the repository.
When there are multiple keys for the same repository, and they are defined as files, naturally they can not
all have the same filename, so at least some of them will be in a location not automatically imported by the gateway.
For this reason, all the key file names need to be explicitly enumerated. Keys can also be declared inline.
The ``"version": 2`` property needs to be specified for this configuration
format to be accepted: ::

{
"version": 2,
"repos" : [
"repos": [
{
"domain": "test.cern.ch",
"keys": [
Expand All @@ -249,13 +254,7 @@ can be restricted to a specific subpath of the repository: ::
}
]
}
]
}

Keys can be either be loaded from a file, or declared inline: ::

{
"version": 2,
],
"keys": [
{
"type": "file",
Expand All @@ -269,9 +268,6 @@ Keys can be either be loaded from a file, or declared inline: ::
]
}

The ``"version": 2`` property needs to be specified for this configuration
format to be accepted.

It should be noted that when keys are loaded from a file, an ``id`` field does not need
to be specified in the configuration file. The public id of the loaded key is
the one specified in the key file itself.
Expand Down

0 comments on commit c036478

Please sign in to comment.