Support automatic license updates and manual license uploads.

Review Request #14405 — Created April 28, 2025 and updated

Information

Review Board
release-7.1.x

Reviewers

The new Licenses page now triggers update checks for licenses on load.
This process involves:

  1. POSTing to the Licenses page with a request for a license check.

    The License Provider will either provide an opaque payload that can
    be used for communicating with an external licensing server, or a
    flag stating that checks aren't supported.

  2. POSTing to the licensing server with the payload.

  3. POSTing back to the Licenses page with the response from the
    licensing server.

    The License Provider will process the result, which may involve
    installing a new license or altering the current one.

This whole process is designed to keep the details of any license
updates internal to the License Provider and licensing server. The
state is communicated in the UI, and the license information reloaded
from new attributes provided in the License Provider responses.

Along with this, licenses can be manually updated, if specified in the
license information. When enabled, this will show a button for uploading
a license, which will pop up a file chooser. After selecting a file, the
contents will be sent to the License Provider for processing via a POST
to the Licenses page.

The view for the Licenses page handles all POST requests. It requires a
CSRF token and some identifying information on the action, action target
(license provider and license), and arguments. It then dispatches to the
License Provider and handles any responses or error results.

Right now, there are specific actions that are supported by this view.
The longer-term plan is to enable arbitrary action support, so License
Providers can trigger custom behavior automatically or in response to
user actions.

All Python and JavaScript unit tests pass.

Tested manually uploading valid and invalid licenses for Power Pack
(ported to the new architecture), verifying the results.

Tested automatic license updates for Power Pack.

Tested all error results and display.

Summary ID
Support automatic license updates and manual license uploads.
The new Licenses page now triggers update checks for licenses on load. This process involves: 1. POSTing to the Licenses page with a request for a license check. The License Provider will either provide an opaque payload that can be used for communicating with an external licensing server, or a flag stating that checks aren't supported. 2. POSTing to the licensing server with the payload. 3. POSTing back to the Licenses page with the response from the licensing server. The License Provider will process the result, which may involve installing a new license or altering the current one. This whole process is designed to keep the details of any license updates internal to the License Provider and licensing server. The state is communicated in the UI, and the license information reloaded from new attributes provided in the License Provider responses. Along with this, licenses can be manually updated, if specified in the license information. When enabled, this will show a button for uploading a license, which will pop up a file chooser. After selecting a file, the contents will be sent to the License Provider for processing via a POST to the Licenses page. The view for the Licenses page handles all POST requests. It requires a CSRF token and some identifying information on the action, action target (license provider and license), and arguments. It then dispatches to the License Provider and handles any responses or error results. Right now, there are specific actions that are supported by this view. The longer-term plan is to enable arbitrary action support, so License Providers can trigger custom behavior automatically or in response to user actions.
8f7211ab72c2f394a66a46e2d0ffbc45fcf24043
Description From Last Updated

undefined name 'HttpResponse' Column: 10 Error code: F821

reviewbotreviewbot

Swap these.

daviddavid

Agreement isn't right here. Should either be "There are no ... guarantees" or "There is no ... guarantee"

daviddavid

Should we log something here?

daviddavid
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
Review request changed
Change Summary:

Added a missing typing import lost in the code split.

Commits:
Summary ID
Support automatic license updates and manual license uploads.
The new Licenses page now triggers update checks for licenses on load. This process involves: 1. POSTing to the Licenses page with a request for a license check. The License Provider will either provide an opaque payload that can be used for communicating with an external licensing server, or a flag stating that checks aren't supported. 2. POSTing to the licensing server with the payload. 3. POSTing back to the Licenses page with the response from the licensing server. The License Provider will process the result, which may involve installing a new license or altering the current one. This whole process is designed to keep the details of any license updates internal to the License Provider and licensing server. The state is communicated in the UI, and the license information reloaded from new attributes provided in the License Provider responses. Along with this, licenses can be manually updated, if specified in the license information. When enabled, this will show a button for uploading a license, which will pop up a file chooser. After selecting a file, the contents will be sent to the License Provider for processing via a POST to the Licenses page. The view for the Licenses page handles all POST requests. It requires a CSRF token and some identifying information on the action, action target (license provider and license), and arguments. It then dispatches to the License Provider and handles any responses or error results. Right now, there are specific actions that are supported by this view. The longer-term plan is to enable arbitrary action support, so License Providers can trigger custom behavior automatically or in response to user actions.
ace1682608d31e7b2f6599b985f42ea5bfbda75a
Support automatic license updates and manual license uploads.
The new Licenses page now triggers update checks for licenses on load. This process involves: 1. POSTing to the Licenses page with a request for a license check. The License Provider will either provide an opaque payload that can be used for communicating with an external licensing server, or a flag stating that checks aren't supported. 2. POSTing to the licensing server with the payload. 3. POSTing back to the Licenses page with the response from the licensing server. The License Provider will process the result, which may involve installing a new license or altering the current one. This whole process is designed to keep the details of any license updates internal to the License Provider and licensing server. The state is communicated in the UI, and the license information reloaded from new attributes provided in the License Provider responses. Along with this, licenses can be manually updated, if specified in the license information. When enabled, this will show a button for uploading a license, which will pop up a file chooser. After selecting a file, the contents will be sent to the License Provider for processing via a POST to the Licenses page. The view for the Licenses page handles all POST requests. It requires a CSRF token and some identifying information on the action, action target (license provider and license), and arguments. It then dispatches to the License Provider and handles any responses or error results. Right now, there are specific actions that are supported by this view. The longer-term plan is to enable arbitrary action support, so License Providers can trigger custom behavior automatically or in response to user actions.
8f7211ab72c2f394a66a46e2d0ffbc45fcf24043

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
david
  1. 
      
  2. reviewboard/licensing/views.py (Diff revision 2)
     
     
     
    Show all issues

    Swap these.

  3. reviewboard/licensing/views.py (Diff revision 2)
     
     
     
    Show all issues

    Agreement isn't right here. Should either be "There are no ... guarantees" or "There is no ... guarantee"

  4. reviewboard/licensing/views.py (Diff revision 2)
     
     
    Show all issues

    Should we log something here?

  5.