Skip to content

Load permission settings from config files #1074

@Ceres6

Description

@Ceres6

This issue is to discuss implementation of the point referenced in the title of #898.

My first concern would be on which flag to use to pass the file. The options that I can think of are:

  1. Use the --experimental-policy flag. My main concern is this would imply the need to also set policy.
  2. Add an optional file to the --experimental-permission flag (I'm still unsure that's even possible).
  3. Creating a new flag (e.g. --permission-file).

Another doubt I have is what would be the expected behaviour on precedence when permissions are set on both flags (e.g. --allow-fs-read) and file. Options:

  1. Fail when both set.
  2. Fail when both set for the same setting (e.g. not fail if permission to read set on file and permission to write set on flag but fail if read set on both) This doesn't make much sense IMO.
  3. Use the union of both.
  4. Use the intersection of both.
  5. Ignore file.
  6. Ignore flag.

I would go with:
1.2. Add an optional file to the --experimental-permission flag (If possible) as we wouldn't need a new flag.
2.1. Fail when both set. I'd assume that to be a mistake, and throw an error explaining the problem. Also this might prevent some sort of attacks using the unconfigured one.

Any ideas and suggestions are welcomed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions