Skip to content

Add Registration smart proxy feature (SAT-44972) - #675

Draft
jeremylenz wants to merge 5 commits into
theforeman:masterfrom
jeremylenz:capsule-registration-feature
Draft

Add Registration smart proxy feature (SAT-44972)#675
jeremylenz wants to merge 5 commits into
theforeman:masterfrom
jeremylenz:capsule-registration-feature

Conversation

@jeremylenz

@jeremylenz jeremylenz commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Why are you introducing these changes? (Problem description, related links)

Adds the Registration smart proxy feature for foremanctl (SAT-44972). Registration proxies host registration requests through an external smart proxy to Foreman, enabling hosts to register via their nearest proxy.

Depends on Katello/katello#11807 (Katello-side registration proxy support).

What are the changes introduced in this pull request?

  • Adds registration feature to features.yaml with a dependency on templates (auto-enabled)
  • HTTPS-only: registration.yml.j2 sets :enabled: https
  • Adds optional --registration-url parameter for load-balanced proxy setups
  • Includes registration in the foreman-proxy-content flavor (external smart proxies only — not deployed on the main Foreman server)
  • Updates parameters.md to document the new parameters
  • Adds tests: feature presence check in test_foreman_proxy_features and config file verification in test_registration_enabled

How to test this pull request

Set up your external smart proxy

Make sure foremanctl is updated to current

On Foreman server:

./foremanctl auth-bundle $PROXY_FQDN
scp /var/lib/foremanctl/certs/bundles/$PROXY_FQDN.tar.gz $PROXY_FQDN:/root/

On your external smart proxy machine:

./foremanctl deploy-proxy --foreman-fqdn "$FOREMAN_FQDN" --flavor foreman-proxy-content --auth-bundle ~/$PROXY_FQDN.tar.gz
  • Verify registration appears in the smart proxy features list
  • Verify /etc/foreman-proxy/settings.d/registration.yml contains :enabled: https
  • Optionally pass --registration-url https://loadbalancer.example.com and verify the setting

Checklist

  • Tests added/updated (if applicable)
  • Documentation updated (if applicable)

Comment thread .github/workflows/test.yml Outdated
@stejskalleos

Copy link
Copy Markdown
Contributor

@jeremylenz the #519 has been merged

jeremylenz and others added 2 commits July 29, 2026 14:11
Implements host registration through the smart proxy with HTTPS-only
support and Templates dependency.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add template_url to templates.yml to satisfy plugin validation requirements. Update registration test to verify feature state instead of hardcoded URL for better test portability.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jeremylenz
jeremylenz force-pushed the capsule-registration-feature branch from c6c025e to c8c0484 Compare July 29, 2026 18:14
- Remove registration from main server CI deploy (belongs only on content proxies)
- Change test to verify config file on disk instead of API response

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changed test_registration_enabled to test_registration_url to verify the
parameter via obsah_params (consistent with test_templates_template_url).
Set registration-url in CI workflow for the test.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Comment thread tests/feature/foreman-proxy/base_test.py
Comment thread tests/feature/foreman-proxy/base_test.py
- Assert templates feature present when registration enabled (dependency)
- Add skipped test for registration endpoint (awaits PR theforeman#706 curl fix)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jeremylenz
jeremylenz marked this pull request as draft July 30, 2026 12:40
@jeremylenz

Copy link
Copy Markdown
Contributor Author

@stejskalleos Addressed your comment and added the test as skipped for now. Marking this as draft until #706 is merged.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants