Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNMRFC: system token support, variant 1 #109

Closed
wants to merge 2 commits into from
Closed

DNMRFC: system token support, variant 1 #109

wants to merge 2 commits into from

Conversation

mcg1969
Copy link
Collaborator

@mcg1969 mcg1969 commented Nov 22, 2024

This addition allows anaconda_anon_usage to be used to help disaggregate usage from an organization while still preserving per-user anonymity.

To use it, an administrator would deposit a short token in a system location, presumably with MDM software.

  • Unix: /etc/conda/aau_token or /var/lib/conda/aau_token
  • Windows: C:\ProgramData\conda\aau_token

When the client_token is retrieved, it also retrieves this system token and ensures that the client token is prefixed by the system token. The total token length is fixed at 22 characters; that hasn't changed. So for instance, if the organization token is 6 characters, the randomness is reduced to 16 characters. If for some reason the client token is tampered with or removed, or the system-installed prefix is changed, anaconda_anon_usage will re-generate it with the proper prefix.

If the system token is not present, as it will be in all normal scenarios, the full random token is generated instead. In fact, this code is slightly more random than the previous implementation. 22 byte64 encoded characters can hold 16.5 bytes worth of randomness, but we were only generating 16 before; now we are generating 17.

@mcg1969 mcg1969 changed the title Add system token support DNF/RFC: system token support, variant 1 Nov 22, 2024
@mcg1969 mcg1969 changed the title DNF/RFC: system token support, variant 1 DNMRFC: system token support, variant 1 Nov 22, 2024
@mcg1969
Copy link
Collaborator Author

mcg1969 commented Nov 23, 2024

Closing in favor of #110

@mcg1969 mcg1969 closed this Nov 23, 2024
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