Skip to content

Allow URLs for apt::keyserver via Apt::Keyserver type - #1315

Open
bwitt wants to merge 1 commit into
puppetlabs:mainfrom
bwitt:keyserver-url
Open

bwitt wants to merge 1 commit into
puppetlabs:mainfrom
bwitt:keyserver-url

Conversation

@bwitt

@bwitt bwitt commented Oct 16, 2026 •

Copy link
Copy Markdown

Summary

Allow hkps URLs for apt::keyserver like apt::key's server, via a new type Apt::Keyserver.
Change apt and apt::key to use this new type

Related Issues (if any)

Fixes #1213

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

@bwitt
bwitt requested review from a team, bastelfreak and smortex as code owners October 16, 2026 05:50
@jst-cyr

jst-cyr commented Oct 20, 2026

Copy link
Copy Markdown
Member

Hey @bwitt , thanks for opening up this PR. It's good to get this fixed up, but I'm wondering if the fix should actually be over in the type. Tightening up the types accepted seems like a good idea, rather than going with a complex regex that could be more difficult to maintain.

Looking at Stdlib::Host it seems like it allows the types Fqdn and IP::Address. It seems to be missing the types that would cover what we need here.

I know this RegEx pattern for types is already used elsewhere in the module, but perhaps we can solve this a different way that keeps the benefits of a stronger type?

Perhaps a new type in this module that composes Stdlib::Host with the missing hkp/hkps pattern and that way the code can still have a strong type and we can centralize that RegEx management into a single place (while still inheriting the benefits of the Stdlib Host type?)

Signed-off-by: Brian Witt <brianwitt@gmail.com>
@bwitt bwitt changed the title Allow URLs for apt::keyserver like apt::key server Allow URLs for apt::keyserver via Apt::Keyserver type Oct 20, 2026
@bwitt

bwitt commented Oct 20, 2026

Copy link
Copy Markdown
Author

@jst-cyr done! thanks!

@jst-cyr

jst-cyr commented Oct 22, 2026

Copy link
Copy Markdown
Member

Thanks @bwitt , I'll get some testing going!

@jst-cyr

jst-cyr commented Oct 22, 2026

Copy link
Copy Markdown
Member

Running CI tests for this PR here: #1328

@jst-cyr

jst-cyr commented Oct 22, 2026

Copy link
Copy Markdown
Member

Acceptance Test Results: https://github.com/puppetlabs/puppetlabs-apt/actions/runs/39711758732?pr=1328

✅ Full green test results!
Still needs engineering review.

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.

Type for apt::keyserver should either be laxed to allow URLs or documentation should be update

2 participants