Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Open source licensing system to make digital rights management secure. Bachelor's degree project.

NotificationsYou must be signed in to change notification settings

sewiti/licensing-system

Repository files navigation

Test

Install

Requires system withsystemd andGo(at least 1.18).

sudo make install

make install builds, and sets up/opt/licensing-server directory, where thebuilt binary will be copied to. Also generateskeys file and sets upLICENSING_SERVER_KEY variable in.env.keys file includes licensingserver's public and private keys, used by licensing protocol to function.
Client's software should have public part (akaid) hard-coded into the binary.

For system to work, couple environment config variables are required, thisincludes:

  • DB_DSN (SeePostgreSQL)
  • LICENSING_SERVER_KEY (Autogenerated bymake install)

PostgreSQL

PostgreSQL is required for system to function. Database credentials should beentered in/opt/licensing-server/.env in the following format:

DB_DSN=postgres://licensingUname:securePasswd@localhost:5432/licensingDB?sslmode=disable

Starting

Using systemd service:

sudo systemctlenable --now licensing.server.service

Env config

System has a lot of options to configure to fit your needs. Default location ofthe config is located in/opt/licensing-server/.env.

Supported environment config variables include:

VariableMeaning
DB_DSNUsed for connecting to a database (should start withpostgres://).
DISABLE_GUIDisables integrated webpage (default:false).
HTTP_LISTENSpecifies TCP address for server to listen on (default::http/:https depending on TLS).
HTTP_READ_TIMEOUTMaximum duration for reading entire request (default:30s).
HTTP_WRITE_TIMEOUTMaximum duration before timing out writes of the response (default:30s).
HTTP_SHUTDOWN_TIMEOUTMaximum duration before server shutdown is forced (default `30s).
HTTP_GZIPUse gzip compression for requests (defaultfalse).
HTTP_CORS_RESOURCE_API_ENABLEDUse CORS for resource API (issuers, products, licenses) (default:false).
HTTP_CORS_LICENSING_API_ENABLEDUse CORS for licensing API (creating, refreshing license sessions) (default:false).
HTTP_CORS_ALLOWED_ORIGINSAllowed origins for CORS.
HTTP_TLS_CERT_FILETLS certificate file.
HTTP_TLS_KEY_FILETLS private key file.
INTERNAL_SOCKETSocket path for internal CLI (default:/run/licensing-server.sock).
LICENSING_SERVER_KEYLicensing server's private key, base64 encoded.
LICENSING_MAX_TIME_DRIFTMax allowed time drift between server and client (default:6h).
LICENSING_CLEANUP_INTERVALInactive/expired/overused license sessions cleanup interval (default:20m).
LICENSING_REFRESH_MINLicense session minimum refresh duration (default:5m).
LICENSING_REFRESH_MAXLicense session maximum refresh duration (default:2h).
LICENSING_REFRESH_JITTERLicense session refresh duration variance, 0.0-1.0 (default:0.1).
LICENSING_LIMITER_SESSION_EVERYNew license sessions creation rate limiter to allow every x interval (default:10m).
LICENSING_LIMITER_BURST_TOTALNew license sessions creation rate limiter max burst worth in session time (default:8h).
LICENSING_LIMITER_CACHE_EXPIRATIONNew license sessions creation rate limiter cache expiration (default:24h).
LICENSING_LIMITER_CACHE_CLEANUP_INTERVALNew license sessions creation rate limiter cache cleanup interval (default:1h).
MIN_PASSWD_ENTROPYMinimum required entropy for issuer passwords, seezxcvbn (default:30).

Seecmd/server/config.go.

About

Open source licensing system to make digital rights management secure. Bachelor's degree project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp