Skip to content

bettermarks fork of the open source project OPAL to be integrated in licensing

License

Notifications You must be signed in to change notification settings

bettermarks/opal_bm_fork

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forks Stargazers Issues MIT License LinkedIn

OPAL - Open Adaptive Licensing EU funded project

Open

OPAL is committed to being an open solution, embracing transparency, collaboration and fostering a community where developers and organizations can work together to improve and customize the licensing service to meet their unique needs.

Adaptive

OPAL is adaptive to serve different license models of digital products as well as to different hierarchies within your customer landscape.

Licensing

At its core, OPAL is a comprehensive licensing service designed to simplify and manage the licensing of digital products.

Description

flowchart LR
     subgraph Integration Scenario
      subgraph License Hub
        direction TB
        PAPI(Permission API - auto-redeem)
        LAPI(License API)
        AAPI(Admin API)
      end  
      LAPI -->|get users licenses| edtechTC(Teacher UI)
      subgraph EdTech Application
        direction TB
      edtechTC -->|create trial-license| LAPI
      edtechSC(Student UI) -->|ask for accessible products| PAPI
      end  
        edtechShop(EdTech Shop) -->|create/update license| LAPI
        LiBO(Licensing Backoffice) -->|create License|AAPI
    end

  teacher[fa:fa-person-chalkboard Teacher] -->|purchase a license| edtechShop
  teacher -->|views license / try product| edtechTC
    
  support[fa:fa-headset Support EdTech] -->|administrate License| LiBO
  student[fa:fa-graduation-cap Student] -->|uses licensed content/app| edtechSC
Loading

Why

EdTechs build Products to change the way we learn. We learned that it's quite a bit of an effort to work on the administrational features to get your learning application into usage. One of the topics is, how to license your product in the differnet organizational structures. That's why we worked on a solution which works in differrent IDP environments.

What

Our Licensing Service is able to provide product permissions for various connected IDPs based on an external hierarchy with an autoredeeming process to use the license.

We build a licensing service which combines the need of licensing on different levels (Enities) within a hierarchy and a seat baes licensing. So users which are member of an entity owning a license can automatically use the product.

Licensing Glossary
  1. User
    • An authenticated user of your application.
  2. Product
    • A product is an application or content.
  3. Hierarchy
    • Is an organizational structure on each entity within this structure a license could be linked.
  4. Membership
    • A User is member of different entities.
  5. Entity
    • A Knot within a Hierarchy like a school, grade or class.
  6. Permission
    • A User gets permission to a product if he/she is member of an entity within a hierarchy which ownes a valid license.
  7. IDP
    • Identity Provider

For whom

  • You want to license (educational) products (Content or App)?
  • Your customers / users are part of a hierarchy structure in which they want to buy licenses?
  • You are facing multible IDPs in your different customer environments?
  • You want to have a seat based licensing in place?

(back to top)

Table of Contents

Installation
Usage
Documentation
License

(back to top)

Installation

K8S

Best practice is to run the application in a local k8s cluster. Please see k8s/README.md:

Initialization

make k8s_install
make k8s_synth
make init

Starting

make start

Manually

Alternatively you can start the application "by hand" Create a 'dotenv' file: Create a file named '.env' in the root folder of the app and provide your database paramaters and credentials like so:

DB_USER=<<your 'postgres' user name (root user of the RDBMS)>>
DB_PASSWORD=<<your 'postgres' users (root user of the RDBMS) password>>
DB_HOST="localhost"
DB_PORT="5432"
DB_NAME=<<the name of the 'license-manager' database you will create in the following step (licm)>>

Before you can start the application, you have to install a database. Please create a database manually on your local postgreSQL database using the SQL query

CREATE DATABASE licm;

Run uvicorn

You can start the application using the following commands:

cd <licensing>
export PYTHONPATH=$PWD/src
uvicorn services.licensing.main:app --reload --workers 1 --host 0.0.0.0 --port 8000

You can now use the API:

(If you run the app by not using Docker)

(back to top)

Testing

Many of our pytest tests require a running Postgres database. You can use the existing docker-compose definition to start a test database.

docker compose up test-postgres

This will start a postgres on port 5431 containing the test_licensing db. Before starting pytest you will need to set following environment variables:

DB_HOST=localhost
DB_PORT=5431
DB_USER=postgres
DB_PASSWORD=postgres
SEGMENT=loc00

Do we need a comment on migration? GWE

Migrations with 'alembic'

  • generate new migrations:

    alembic revision --autogenerate -m "<some meaningful title>"
  • apply the migrations:

    alembic upgrade head

Events

Eventcreation is prepared but could be addapted to special needs.

(back to top)

Example installation steps

$ git clone [repository-url] $ cd [project-directory] $ npm install

Usage

[Explain how to use the software. Include examples, code snippets, and any relevant information that users need to get started.]

(back to top)

Example usage

$ command-to-run-software [options]

(back to top)

Service Documentation

Used Technologies

  • Python
  • FastAPI
  • PostgreSQL

Hierarchy Concept

License Concept

The concept for implementing such a License Manager can be found here: License Manager concept

Token Concept

Data Model

(back to top)

License

This project is licensed under the MIT License - see LICENSE for details.

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contact

Bettermarks GmbH, Berlin - [email protected]

Project Link: https://github.com/bettermarks/opal/

(back to top)

Acknowledgments

Here are some resources we find helpful and would like to give credit to.

(back to top)

About

bettermarks fork of the open source project OPAL to be integrated in licensing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 90.1%
  • Python 9.8%
  • Makefile 0.1%
  • Shell 0.0%
  • Mako 0.0%
  • Dockerfile 0.0%