Repository navigation
ostree-ext: document symlinking pull secret to /run with transient /etc - #2601
Conversation
27eb712 to
8ab8b70
Compare
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the persistent authentication lookup change.
No open issues 🎉
What changed in this PR
Adds /var/lib/ostree/auth.json as a persistent pull-secret location for systems with transient /etc, extending bootc’s existing registry authentication lookup.
Changes:
- Searches root authentication files in
/run,/etc,/var/lib, then/usr/lib. - Extends unit tests to verify the new location’s precedence and fallback behavior.
- Updates authentication documentation and clarifies the installer’s auth-propagation comment.
| File | Description |
|---|---|
| docs/src/building/bootc-secrets.7.md | Documents lookup order and persistent secrets with transient /etc. |
| crates/ostree-ext/src/globals.rs | Adds /var/lib/ostree lookup and tests its precedence. |
| crates/ostree-ext/man/ostree-container-auth.md | Corrects and extends the documented root lookup order. |
| crates/lib/src/install/completion.rs | Clarifies the auth-propagation comment; no behavior change. |
Review effort: Balanced
|
I get the pain point. However, I think the best fix here is actually for us to support reading the pull secrets from systemd credentials. See containers/image#2600 which is related. Then the pull secret cred could be pulled from the general stateful credstore in A general thing here though for us to make use of credentials we do need a systemd unit, which would be a big change. In the short term here's my suggestion for this case: ship a tmpfiles.d entry which symlinks from (Edit:)
Right sorry you came up with the same idea! Let's document this? I'm not hard opposed to this PR, but moving to draft for now for discussion. |
Yep as long as its an official workaround thats fine with me. I'd also prefer systemd credentials long term anyways. I'll make the change. |
Document linking /run/ostree/auth.json to a pull secret in /var with a tmpfiles.d entry. Also fix the search order in ostree-container-auth(5), which listed /etc before /run. Assisted-by: AI Signed-off-by: Peter Siegel <psiegel2000@icloud.com>
8ab8b70 to
f8097a4
Compare
With a transient /etc, there is no persistent location for the pull secret since
/etc/ostree/auth.jsonis reset on every reboot and/runis ephemeral. You could provide a secret in/usr/libbut then you would have to distribute it in the image which can be undesirable.Add documentation for a
tmpfiles.d-declared symlink from/var/lib/ostree/to/run. In general the long-term fix is to use systemd creadentials (see #2601 (comment)).Also add a small cleanup to
ostree-container-auth(5), which listed/etcbefore/run, which is slightly off from the actual search order.Assisted-by: AI