TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What is the best way to distribute static content with authentication?

1 pointsby MobileVetover 2 years ago
Historically, if one wanted to limit access (either for security reasons or paying customers etc), a server would be handle the authentication and then serve up the content. This could clearly still work but doesn&#x27;t leverage the power of modern day CDNs.<p>How does one approach content delivery when the access to the content should be limited? Should a server provide the authentication and then pass along a token that is used to access the CDN? Can the CDN handle token signature verification or other forms that would allow a particular user to be cut off or a cert to be revoked if it was compromised?<p>I am looking to setup a system to distribute access to some artwork (still and video) and would greatly appreciate a nudge in the right direction or shared experiences around best practices for this type of setup.

3 comments

dijitover 2 years ago
there&#x27;s so many options that it&#x27;s difficult to say.<p>Two options are immediately obvious:<p>First option is to serve only encrypted content, and only hand out the decryption key to the parties that need it. If it&#x27;s web then you can use javascript to unencrypt- though I&#x27;m not a web developer and that could be cumbersome.<p>This was how we did it for uPlay.<p>Second option: Akamai&#x2F;Google CDN have the concept of a &quot;signed&quot; URL: <a href="https:&#x2F;&#x2F;cloud.google.com&#x2F;cdn&#x2F;docs&#x2F;using-signed-urls" rel="nofollow">https:&#x2F;&#x2F;cloud.google.com&#x2F;cdn&#x2F;docs&#x2F;using-signed-urls</a> which does basically what you&#x27;re asking, but can be cumbersome to use in practice too.
评论 #33903051 未加载
dtagamesover 2 years ago
Another option is Firebase which uses a simple set of rules (on their server, not in your app) to control access to individual data points. The cloud hosting service has easy CLI tools to setup and deploy a static site.
评论 #33903061 未加载
apple314159over 2 years ago
Try Authelia (<a href="https:&#x2F;&#x2F;www.authelia.com" rel="nofollow">https:&#x2F;&#x2F;www.authelia.com</a>)
评论 #33903072 未加载