Add license check to OFRAK#479
Merged
Merged
Conversation
List all in one file instead of backing up replaced licenses to numbered files.
- Refactor code to decouple license selection and verification - Validate license signature before registering it with OFRAK instance - Remove changes to OFRAK interface, as they are not needed for the current implementation
rbs-jacob
commented
Jul 22, 2024
Co-authored-by: Jacob Strieb <99368685+rbs-jacob@users.noreply.github.com>
whyitfor
approved these changes
Jul 23, 2024
list of LicenseDataType (this allows a user to directly copy license into an ofrak package).
ANogin
pushed a commit
to ANogin/ofrak
that referenced
this pull request
Aug 20, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One sentence summary of this PR (This should go in the CHANGELOG!)
Add license check to OFRAK. Just CLI license check included for now. Not meant to be airtight (since there are a million ways to bypass it at this point), just to prompt users to think about the license on first run.
flowchart TD subgraph download [Run OFRAK for the first time] script[Run script] & config["Run `ofrak configure` command"] run_gui[Run GUI] end script & config --> |CLI license flow| flow run_gui --> |GUI license flow| flow subgraph flow [License flow] subgraph validate [Validate the license] direction TB display[Print license type to standard output] --> check_sig[Validate license signature] check_sig --> confirm_date[Confirm the license has not expired] end validate --> |Valid license| continue[Continue running the original script/task] validate --> |Invalid or expired license| error[Display an error and abort] check[Check for license in expected location] --> |License exists| validate check --> |License does not exist| type[Choose Community or Pro License] type --> |Community| comunity_agree[Prompt to accept license agreement] --> write_disk[Write Community License to expected location on disk] --> validate type --> |Pro| locate_or_obtain[Prompt to locate a license on disk or obtain one] --> |Locate on disk| locate[Input path to license] --> pro_agree[Prompt to accept license agreement] --> copy[Copy license to expected location on disk] locate_or_obtain ----> |Obtain license| obtain[Request license on OFRAK website] --> call[Have a call with RBS and get full or trial license] copy --> validate end