Generate random subdomains #5

Closed
opened 2022-11-10 16:21:49 +05:30 by realaravinth · 2 comments
Owner

A new site has to be deployed on a librepages controlled subdomain before it can be assigned a custom domain. This subdomain must be randomly generated.

{unique-random-string}.librebrepages.test
A new site has to be deployed on a librepages controlled subdomain before it can be assigned a custom domain. This subdomain must be randomly generated. ``` {unique-random-string}.librebrepages.test ```
realaravinth added a new dependency 2022-11-10 16:22:09 +05:30
realaravinth started working 2022-11-10 16:38:59 +05:30
Author
Owner

Data sources:

  1. https://www.randomlists.com/data/nouns.json: a combination of 2 or 3 entire can be used to achieve reasonably uniqueness and randomness.

Approach

  1. Read from file: breaks librepages' single binary deployment but allows the admin to specify a custom word file
  2. Bake data into bin: fast but increases bin size.
  3. Store in DB: migrations are baked into the binary, so the size increase is inevitable.
## Data sources: 1. https://www.randomlists.com/data/nouns.json: a combination of 2 or 3 entire can be used to achieve reasonably uniqueness and randomness. ## Approach 1. Read from file: breaks librepages' single binary deployment but allows the admin to specify a custom word file 2. Bake data into bin: fast but increases bin size. 3. Store in DB: migrations are baked into the binary, so the size increase is inevitable.
realaravinth self-assigned this 2022-11-10 16:45:49 +05:30
Author
Owner

Changes live in wip-random-subdomains branch.

Diff: 926cf3fe08..58bb606879

Summary

  1. Construct unique and random subdomains using data 1) and approach 2) mentioned above.

add base_path to settings to specify deploy host name.

DESCRIPTION
    Each deployment should have a default hostname before a custom domain can be assigned. Therefore, this domain must be in control of the Librepages system (Librepages/conductor, namely)

SECURITY
    base_domain must be different from the domains hosting confidential information (authentication systems, PII data, etc.) to make use of browser domain sandboxing safety. If Librepages deployment is open to the public, unaudited, third-party content may be hosted in this domain, so it is very important that this domain shouldn't be used for critical infrastructure dealing with confidential information.
  1. Auto-generate and assign default hostnames for new website deployments

  2. Serve requests for default hostnames


Merged into wip-dashboard

Changes live in [`wip-random-subdomains`](https://git.batsense.net/LibrePages/librepages/src/branch/wip-random-subdomains) branch. Diff: https://git.batsense.net/LibrePages/librepages/compare/926cf3fe0867a8325a6ebf0de5bab2b8d22d137d..58bb60687943336546656d8665a1b6954eb6fa18 ## Summary 1. Construct unique and random subdomains using data 1) and approach 2) mentioned above. 2. ``` add base_path to settings to specify deploy host name. DESCRIPTION Each deployment should have a default hostname before a custom domain can be assigned. Therefore, this domain must be in control of the Librepages system (Librepages/conductor, namely) SECURITY base_domain must be different from the domains hosting confidential information (authentication systems, PII data, etc.) to make use of browser domain sandboxing safety. If Librepages deployment is open to the public, unaudited, third-party content may be hosted in this domain, so it is very important that this domain shouldn't be used for critical infrastructure dealing with confidential information. ``` 3. Auto-generate and assign default hostnames for new website deployments 4. Serve requests for default hostnames --- Merged into `wip-dashboard`
realaravinth stopped working 2022-11-10 17:44:14 +05:30
1 hour 5 minutes
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Total Time Spent: 1 hour 5 minutes
realaravinth
1 hour 5 minutes
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Blocks
#4 Add website from web UI
LibrePages/librepages
Reference: LibrePages/librepages#5
No description provided.