Skip to content

Give access to the CA certificates from the host #626

Open

Description

@debarshiray

We need to do something to ensure that the certificates from certificate authorities (or CAs) that are available inside the container are kept synchronized with the host.

Normally, we'd do this by using symbolic links or bind mounts in /etc, but the layout of the files differs quite a bit across distributions. Debian uses /etc/ssl, Fedora uses /etc/pki and has /etc/ssl/certs as a symbolic link to /etc/pki/tls/certs, and so on. It's a mess.

Instead, we might have better luck using p11-kit, just as Flatpak does. p11-kit offers an uniform interface for accessing certificates stored on the file system, smart cards and so on. Normally, p11-kit looks up the certificates that are present on the host's file system. However, it can also be configured to forward all look-ups to a socket, and a p11-kit server ... instance on the other side does the look-ups and returns the results over the socket.

In our case, we need to start a p11-kit server ... instance on the host, configure the container to forward everything to it over the socket, and ensure that the socket is present at the right place.

Here are the Flatpak counterparts of this issue:
flatpak/flatpak#1757
p11-glue/p11-kit#68

Activity

  1. added
    1. Feature request
    on Nov 17, 2020
  2. cgwalters commented on Oct 7, 2021

    @cgwalters
    Collaborator
  3. debarshiray commented on May 1, 2025

    @debarshiray
    MemberAuthor

    I have some work-in-progress code to make this work with p11-kit, as discussed above. Meanwhile, #1634 updates the arch-toolbox and ubuntu-toolbox images to include p11-kit-client.so.

  4. debarshiray commented on May 7, 2025

    @debarshiray
    MemberAuthor

    I have some work-in-progress code to make this work with p11-kit, as discussed above. Meanwhile, #1634 updates the arch-toolbox and ubuntu-toolbox images to include p11-kit-client.so.

    Those images needed some more work: #1643

    The bulk of the code changes are beginning to appear at: #1644

    The fedora-toolbox image is loosely blocking on:
    https://src.fedoraproject.org/rpms/p11-kit/pull-request/53

    ... and it will be updated through the Fedora KIWI descriptions. The UBI based toolbox image for RHEL will hopefully be updated by Red Hat according to their internal processes.

  5. 21 remaining items

  6. jorti commented on Oct 23, 2026

    @jorti

    Hi, any update on this? The README now says that toolbox has seamless access to the CA certificates, but testing with curl I can see this is not true. Am I missing something?

    Host and container are both Fedora 44, with toolbox-0.3-4.fc44.x86_64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. Feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions