Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directory Structure Spec #175
Directory Structure Spec #175
Changes from all commits
d4f4c01
be10005
14c434b
2b81b2f
6e130ed
e412cdf
537975b
544fb33
bb8d0d2
c18c901
416b30f
37c3650
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Notation Directory Structure
The
notation
CLI requires local file systems support for the following components across various platforms.notation
binaryThis documentation specifies the recommended directory structure for those components.
Category
The directories for various components are classified into the following catagories.
BIN
LIBEXEC
CONFIG
CACHE
Although it is recommended to install
notation
with its plugins and default configurations at the system level, it is possible to install at the user level.On Unix systems,
notation
follows Filesystem Hierarchy Standard for system level directories and XDG Base Directory Specification for user level directories. On Windows, Known Folders and App Settings are followed equivalently. On Darwin, macOS File System with System Integrity Protection is followed equivalently. If a file with the same name exists at the system level and the user level, the file at the user level takes over the priority.System Level
Default directory paths for various operating systems at system level are specified as below.
BIN
/usr/bin
%ProgramFiles%/notation/bin
/usr/local/bin
LIBEXEC
/usr/libexec
%ProgramFiles%
/usr/local/lib
CONFIG
/etc
%ProgramData%
/Library/Application Support
CACHE
is omitted since it is user specific.User Level
Default directory paths for various operating systems at user level are specified as below.
LIBEXEC
$XDG_CONFIG_HOME
%AppData%
~/Library/Application Support
CONFIG
$XDG_CONFIG_HOME
%AppData%
~/Library/Application Support
CACHE
$XDG_CACHE_HOME
%LocalAppData%
~/Library/Caches
On Unix,
$XDG_CONFIG_HOME
is default to~/.config
and$XDG_CACHE_HOME
is default to~/.cache
if XDG environment variables are empty.There is no default
BIN
path at user level since thenotation
binary can be put anywhere as long as it in thePATH
environment variable. Common directories on Unix/Darwin are~/bin
and~/.local/bin
where manualPATH
update by users may be required.Structure
The overall directory structure for
notation
is summarized as follows.Notation Binary
The path for the
notation
binary isOn Windows, the
.exe
extension is required for executables.Plugin
Plugins are binaries not meant to be executed directly by users' shell or scripts. The path of a plugin follows the pattern below.
On Windows, the
.exe
extension is required for executables.General Configuration
The path of the general configuration file of the
notation
CLI isTrust Store
The path of a certificate file in a Trust Store follows the pattern of
Trust Policy
The path of the Trust Policy file is
Signature Caches
The signatures are cached to optimize the network traffic. The path of cached signatures for a certain target manifest (e.g. an image manifest) follows the pattern below.
or in a hierarchical view
Signing Key Store
Developers sign artifacts using local private keys with associated certificate chain. The signing key information is tracked in a JSON file at
Since the signing key store is user-specific, the system level
{CONFIG}
is not recommended. Developers SHOULD consider safe places to store the passphrase-protected key and certificate pairs, or opt to remote signing.For testing purpose, the following directory structure is suggested.
Since
signingkeys.json
takes references in absolute paths, it is not required to copy the private keys and certificates used for signing to the above directory structure.Examples
Examples are shown on various platforms where the user
exampleuser
overrides thenotation
config and the trust policy.Unix
Windows
Darwin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense from a usability perspective for certain components like configuration settings, signing key and plugin config, and local keys, but seems inverse of what is desired for trust store and trust policy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.