Skip to main content

Serverless distributable authentication.

Project description

Serverless distributable authentication

Add authentication security to your distributables without a server.

Features:

  • 🔒 authenticate users for distributables with any static site generator (e.g., Github Pages) - no custom server needed!
  • ❌ revoke/terminate distributables remotely and in real time

When is this needed?

If you are sharing distributables and don't want unauthorized users to use it, or if you want the ability to revoke access to your distributable.

How it works

distrolock authenticates by sending a GET request (not POST) to retrieve the security policy.

Once the security policy has been retrieved, the authentication happens client side. On paper this is insecure, but once compiled into an exe and obfuscated with tools like pyarmor it requires strong technical knowledge to bypass1.

The security policy looks like this:

{
  "product-1": {
    "version-1": "VOID",
    "version-2": "3b0e98ef7923166602d7a9f327782eea090454960cf8bfe1af3b9c8620cd5680"
  },
  "product-2": {
    "version-1": ["ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb", "3e23e8160039594a33894f6564e1b1348bbd7a0088d42c4acb73eeaed59c009d"]
  }
}

[!TIP] We recommend you host your security policy on online SSG's like Github Pages, where it will automatically rebuild when the policy is changed.

Gallery

Main Screen Network Error Terminated Script

Note: the images can be customized!

Tutorial

Prepend a few lines of code and you're good to go!

def transformer(password):
    return sha256(password.encode()).hexdigest()


lock = DistroLock({
    "productName": "product",
    "version": "v1.0.0",
    "securityPolicyURL": "https://colonelparrot.github.io/distrolock/policy-example.json",
}, transformer)
lock.authorize() # present challenge (correct answer [asdf123])
lock.startPeriodicScan() # check for security policy changes for real-time termination

# ... your code

For more in-depth documentation, please visit the wiki.

Remarks

1 this tool is designed to be a solution that works out-of-the-box. It can stop most people, even some tech-savvy individuals.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

distrolock-0.9.0.tar.gz (72.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

distrolock-0.9.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file distrolock-0.9.0.tar.gz.

File metadata

  • Download URL: distrolock-0.9.0.tar.gz
  • Upload date:
  • Size: 72.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for distrolock-0.9.0.tar.gz
Algorithm Hash digest
SHA256 173199442d7ff0b974d76e739507238e9b4fb1dc6a5a58419cd9d08dd12cc3fc
MD5 a785b6b008b7a606ab308826732f13fb
BLAKE2b-256 5794b426dda85b0b92f255f941ec09abdcceb26fb969649aa46d1ca6a432f862

See more details on using hashes here.

File details

Details for the file distrolock-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: distrolock-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for distrolock-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1482e811f379322d43cece2d824c945acd949f142d04768f45f4b31bea4173df
MD5 1d7e94d4b8ce55af6fce4e1b56dbc1e3
BLAKE2b-256 99219cb43cb5cd2d0c1111e9004b572293e9271a5ecb708991efbe2b396b182e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page