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

fix signing key URIs for local files #2024

Open
iammattcoleman opened this issue Jan 12, 2022 · 0 comments
Open

fix signing key URIs for local files #2024

iammattcoleman opened this issue Jan 12, 2022 · 0 comments
Labels

Comments

@iammattcoleman
Copy link
Collaborator

iammattcoleman commented Jan 12, 2022

Problem description

When using a local file for a repository signing key, a broken URI syntax currently has to be used in order to provide a relative path: valid file:// URIs will always point to an absolute path: Kiwi interprets file://example.key as pointing to the file /example.key.

Invalid syntax can currently be used to provide a relative path. For example, I am currently using file:image-desc/repository.key to use a key file within my image description directory (image-desc).

Expected behaviour

  1. Only valid URIs should be usable with <signing key="..."/>: file:relative/path/to/file should not be accepted as valid syntax. According to RFC8089, file: URIs only support absolute paths.

    The following are examples of valid file URIs:

    • file:/path/to/file
    • file:///path/to/file

    Using two only two leading slashes (file://path/to/file) is not valid syntax.

  2. Similar to <include>, support for this:// should be added to enable use of key files stored in the image description directory.

Steps to reproduce the behaviour

  1. Add <signing key="file://example.key"/> to a repository in an existing description
  2. Run a build
  3. The build will fail due to not being able to find /example.key.
  4. Change the key path to file:nonexistent/example.key in the XML
  5. Run a build
  6. The build will fail due to not being able to find nonexistent/example.key within the current working directory.

OS and Software information

  • KIWI version: 9.24.14
  • Operating system: Ubuntu 20.04
  • OBS version: n/a
@schaefi schaefi added the Bug label Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants