Skip to main content

Utility for securing expiring links

Project description

getsecure

Utility for securing expiring links

Usage

Add to nginx vhost secure location section like this

    location /secret_page.html {
     secure_link $arg_md5,$arg_expires;
     secure_link_md5 "$secure_link_expires$uri <put here secret string>";

     if ($secure_link = "") {
         return 403;
     }

     if ($secure_link = "0") {
         return 410;
     }
    }

Get secure link

python secure.py http://example.com/secret_page.html <put here secret string> --period=30
http://example.com/secret_page.html?md5=IQ6H6OQYGeUnlLEDgHfYNw&expires=1488221041

or

python secure.py /secret_page.html <put here secret string> --period=30
/secret_page.html?md5=IQ6H6OQYGeUnlLEDgHfYNw&expires=1488221041

where period is days from now to future when link should work

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

getsecure-0.0.8.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

getsecure-0.0.8-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file getsecure-0.0.8.tar.gz.

File metadata

  • Download URL: getsecure-0.0.8.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for getsecure-0.0.8.tar.gz
Algorithm Hash digest
SHA256 eeee782d082b595b58d2969ee6639399b64e3f1d993da2498f56bd6a9e19d470
MD5 572a354420ba5e177a2ddf786dac212b
BLAKE2b-256 3eb4e469995200c7245d74d3e6689e7870e7a731967e30c82f3a6526448e1e47

See more details on using hashes here.

File details

Details for the file getsecure-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: getsecure-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for getsecure-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 34d5f01f4077d5f797f778c52dfd402ef492c820fa03598f37f3ee46966643de
MD5 f3b9e6debf13f5a27feb9b88a709fcc9
BLAKE2b-256 126f7f9f233ca646a375f6d56b4a8295b8921203409cb3df2ae790fe20aeda3b

See more details on using hashes here.

Supported by

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