Skip to content
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

Merged
merged 12 commits into from
Jun 15, 2022
Merged

Directory Structure Spec #175

merged 12 commits into from
Jun 15, 2022

Conversation

shizhMSFT
Copy link
Contributor

Resolves #167

Signed-off-by: Shiwei Zhang shizh@microsoft.com

@shizhMSFT shizhMSFT requested a review from a team May 12, 2022 15:58
specs/directory.md Show resolved Hide resolved
specs/directory.md Show resolved Hide resolved
specs/directory.md Show resolved Hide resolved
specs/directory.md Outdated Show resolved Hide resolved
specs/directory.md Outdated Show resolved Hide resolved
@SteveLasker
Copy link
Contributor

I've added Balancing Security and Usability for reference

Based on the PR, it looks like we are securing the configuration and policy files to directories a normal user would be unable to configure. We should also assure the notation client doesn't allow the user to override the configuration files with non-admin directories or files.
There may be some configurations that are less secure, and more usability, for instance reducing the number of parameters the user must enter every time. However, anything that implies security, MUST be placed in a directory requiring admin rights for write access.

specs/directory.md Show resolved Hide resolved
specs/directory.md Show resolved Hide resolved
specs/directory.md Show resolved Hide resolved
specs/directory.md Outdated Show resolved Hide resolved
specs/directory.md Show resolved Hide resolved
specs/directory.md Outdated Show resolved Hide resolved
specs/directory.md Show resolved Hide resolved
specs/directory.md Outdated Show resolved Hide resolved
specs/directory.md Show resolved Hide resolved
specs/directory.md Outdated Show resolved Hide resolved
specs/directory.md Outdated Show resolved Hide resolved
specs/directory.md Outdated Show resolved Hide resolved
specs/directory.md Outdated Show resolved Hide resolved
specs/directory.md Outdated Show resolved Hide resolved
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
specs/directory.md Outdated Show resolved Hide resolved
specs/directory.md Outdated Show resolved Hide resolved

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][FHS] for system level directories and [XDG Base Directory Specification][XDG] for user level directories. On Windows, [Known Folders][KF] and [App Settings][AS] are followed equivalently. On Darwin, [macOS File System][macOS_FS] with [System Integrity Protection][SIP] 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.
Copy link
Contributor

@gokarnm gokarnm Jun 13, 2022

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
On Unix systems, `notation` follows [Filesystem Hierarchy Standard][FHS] for system level directories and [XDG Base Directory Specification][XDG] for user level directories. On Windows, [Known Folders][KF] and [App Settings][AS] are followed equivalently. On Darwin, [macOS File System][macOS_FS] with [System Integrity Protection][SIP] 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.
On Unix systems, `notation` follows [Filesystem Hierarchy Standard][FHS] for system level directories and [XDG Base Directory Specification][XDG] for user level directories. On Windows, [Known Folders][KF] and [App Settings][AS] are followed equivalently. On Darwin, [macOS File System][macOS_FS] with [System Integrity Protection][SIP] is followed equivalently.
**TODO** : If a file with the same name exists at the system level and the user level, the mechanism to resolve priority needs to be defined (tracked in #203).

Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Copy link
Contributor

@gokarnm gokarnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created an issue (#203) and added a suggestion to track precedence of system vs user files. Rest looks great!

@shizhMSFT shizhMSFT merged commit 5f4de13 into notaryproject:main Jun 15, 2022
@shizhMSFT shizhMSFT deleted the location branch June 15, 2022 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spec : Notation directory structure
6 participants