Skip to content

Add license check to OFRAK#479

Merged
rbs-jacob merged 49 commits into
redballoonsecurity:masterfrom
rbs-jacob:feature/license
Jul 23, 2024
Merged

Add license check to OFRAK#479
rbs-jacob merged 49 commits into
redballoonsecurity:masterfrom
rbs-jacob:feature/license

Conversation

@rbs-jacob
Copy link
Copy Markdown
Member

@rbs-jacob rbs-jacob commented Jul 2, 2024

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
Loading

@rbs-jacob rbs-jacob requested a review from whyitfor July 2, 2024 17:02
Copy link
Copy Markdown
Member Author

@rbs-jacob rbs-jacob left a comment

Choose a reason for hiding this comment

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

Doesn't seem possible for me to "request changes" on a PR I opened, but @whyitfor you should consider the comments in this review requested changes

Comment thread docs/license.md Outdated
Comment thread docs/license.md
Comment thread docs/license.md Outdated
Comment thread ofrak_core/ofrak/cli/command/license.py Outdated
Comment thread ofrak_core/ofrak/cli/command/license.py
Comment thread ofrak_core/ofrak/license/__init__.py Outdated
Comment thread ofrak_core/ofrak/license/__init__.py Outdated
Comment thread ofrak_core/ofrak/license/__init__.py Outdated
Comment thread ofrak_core/ofrak/license/__init__.py Outdated
Comment thread ofrak_core/ofrak/license/__init__.py Outdated
whyitfor and others added 3 commits July 22, 2024 13:47
Co-authored-by: Jacob Strieb <99368685+rbs-jacob@users.noreply.github.com>
@whyitfor whyitfor removed their request for review July 22, 2024 18:59
whyitfor added 2 commits July 23, 2024 11:59
list of LicenseDataType (this allows a user to directly copy license
into an ofrak package).
Copy link
Copy Markdown
Member Author

@rbs-jacob rbs-jacob left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@rbs-jacob rbs-jacob merged commit 8476535 into redballoonsecurity:master Jul 23, 2024
ANogin pushed a commit to ANogin/ofrak that referenced this pull request Aug 20, 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.

2 participants