Skip to content

Comments

feat(facts): map of names and modules#122

Merged
DavidePrincipi merged 3 commits intomainfrom
feat-7732
Dec 15, 2025
Merged

feat(facts): map of names and modules#122
DavidePrincipi merged 3 commits intomainfrom
feat-7732

Conversation

@DavidePrincipi
Copy link
Member

Build a map name-module_id to associate modules with customers. Names are anonymized if the system has no subscription.

Refs NethServer/dev#7732

Build a map name-module_id to associate modules with customers. Names
are anonymized if the system has no subscription.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a feature to build a mapping between DNS names and module IDs, enabling association of modules with customer deployments. The implementation anonymizes hostnames using MD5 hashing when the system lacks an active subscription (provider is not "nsent" or "nscom"), preserving only the top-level domain for potential analytics purposes.

Key changes:

  • Added hash_hostname() function to anonymize hostnames by replacing all but the TLD with an MD5 digest
  • Implemented get_name_module_map() to extract module-to-hostname associations from Traefik router configurations
  • Added exception handling to ensure the facts collection continues even if the name-module mapping fails

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

DavidePrincipi and others added 2 commits December 12, 2025 18:56
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DavidePrincipi DavidePrincipi merged commit ab53c30 into main Dec 15, 2025
5 checks passed
@DavidePrincipi DavidePrincipi deleted the feat-7732 branch December 15, 2025 10:04
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.

1 participant