GitHub pages defaulting to a randomly generated name instead of <whatever>.github.io - github-pages

I'm working in a repo I created under an organizational GitHub
When I publish the repo via GitHub pages the URL defaults to a randomly generated string, such as
http(s)://windy-waterfalls-e5r23og9.pages.github.io/
I'd like it to default to http(s)://<username>.github.io/<repository> or http(s)://<organization>.github.io/<repository> so that the URL is explanatory of the repo, and so I don't have to pay/manage my own domain
Is there a way to do this?

This occurs when the gh pages visibility is set to private
According to About subdomains for privately published sites
Privately published sites are available at a different subdomain than publicly published sites. This ensures that your GitHub Pages site is secure from the moment it's published.
We use a unique subdomain for the privately published site to ensure that other repositories in your organization cannot publish content on the same origin as the site
According to Organization-level custom domain not working for internal repository pages #23350
For security reasons, private Pages sites (the ones with a random default hostname that enforce authentication + authorization on access) need to be isolated.
Workarounds
If the info isn't sensitive, you can go to Settings > Set the Visibility to Public
You can still set a custom domain to avoid having a long set of garbled characters in your URL

Related

How to remove repository name from a custom domain hosted in Github Pages?

I have made a NameCheap domain and linked it to GitHub pages properly.
If the site is live at a.me/resume, how can I make it just a.me and remove the repository's name from the url?
Open the repository and go to settings - pages - scroll down to the custom domain section and enter your custom domain and click save. You'll want to delete the old CNAME because when you save the custom domain it should create a new CNAME automatically.
I would also recommend verifying the custom domain you want to use with GitHub if you haven't already done so as a preventative measure to discourage domain squatters from using it. For that you'll just need to go to your account settings - pages - add a domain.
In order to verify the custom domain with GitHub, you'll need to add the verification code they give you to your DNS configuration as a TXT file.
https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages

Restrict all access to S3 static website except from our Elastic Beanstalk website

We have an Elastic Beanstalk instance that serves our PHP website (example.com). We just added an S3 bucket which serves a different static website (static.com).
The EB website (example.com) requires specific credentials which are supplied to the end-user for logging in. We would like to have the S3 website (static.com) only viewable to the logged-in users of the EB website (example.com) .
Use Cases:
A user is logged into “example.com”. Within the site there would be links to the files on “static.com”. Clicking on these links would take the user to the files on “static.com” and they could navigate around that site.
Someone has a URL to a page on “static.com”. Maybe someone shared that URL with them (that is expected behavior). When they attempt to load that URL in a browser, they are redirected to the login screen of “example.com” to login.
What is the best, and easiest, way to accomplish this? Cookies, Cloudfront, Lamda functions? “Signed URLs” sounded like a possible avenue, but the URLs cannot change over time. This is a requirement in case users do share the URLs (which is expected and ok). Example: Hey Johnny, check out the information at "static.com/docs/widget_1.html"
If you have private content, CloudFront signed URLs are the right choice to generate unique URLs for authenticated users of your application for a limited time. Each time a user loads a page, you generate new short-lived URLs.
If you'd like to enable someone to share links, one option is to provide users with a share option in your application that generates a SignedURL with a longer TTL of a fixed amount (e.g., 3 days) for sharing. Or enables the user to select the length of time the shareable link should be valid, with a maximum allowed time period of x hours/days. If the link expires, they can generate a new one in the application.

Google Internal oAuth Consent Screen with multiple domains

I have an internal oAuth consent screen working for the organisation domain domain.com.
We have add an additional users that have been added to the organisation with their domain domain.ag (.ag is where we are moving to, which is on a different account at the moment).
I can login and do what I need with the .com emails, but when using the .ag emails google is saying they are not part of the organisation.
Is there a way in 2021 to allow for this?
I have seen a questioned asked that is very similar to this where the answers where to add select_profiles to the query, or to make the app public. Making the app public is not an option, and select_profiles is good, but if selecting the .ag email, I still get the same issue.
Is there a way to allow for all users under your organisation, even if they are 'shared' in via the Cloud Console IAM & Admin area?
Since your application is purely internal and has users on multiple domains, whitelist this application by marking it trusted. To mark the app as trusted is using this https://support.google.com/a/answer/7281227

Setting the CurrentContact Cookie domain for sharing across Kentico sites

I am working in Kentico 11. I have multiple sites in the same Kentico instance each hosted on subdomains of a primary domain (news.example.com, www.example.com). I want to share the currentcontact cookie between those subdomains. Currently each of the subdomains show that cookie originating from that specific sub.
How can I set it up so that the currentcontact cookie and its value is available across the subs?
one approach is what Vasu had suggested where you can leverage the fact, that subdomain cookies can be shared to some extent, though browsers by default do try to separate even these to certain extent.
Another would be to create a so-called super-cookie which goes above domains (https://security.stackexchange.com/questions/122372/how-to-detect-inspect-and-delete-a-super-cookie-of-a-specific-website )
Than you can create your own implementation of ICurrentContactProvider or IContactPersistentStorage interfaces where GetPersistentContact or respectively GetExistingContact methods would look at other cookies or supercookie as well to track contact across domains.

How do I allow users to map their domains to a url on my site?

How do I allow users to map their domains to a url on my site? (like how tumblr or blogger does)
The app is being developed in Django. I want the users to be able to map their domains to mydomain.com/username (is this possible or do I need to have a format like username.mydomain.com?)
Also my app runs on a VPS so I have my nameservers as ns1.mydomain.com and ns2.mydomain.com.
easiest way is through domain cloaking. most domain name providers will allow users this option.
another easy idea is to provide your users with a very generic html page that just includes their url on your site in an iframe and have them places that as their default directory index (e.g. index.html).
both the aforementioned would always show the base domain (without trickery). as noted below, a CNAME DNS record would take care of this, assuming they have the ability to edit DNS records...
www.someuserdomain.com. CNAME username.yoursite.com
In that case, you will have to consult your specific hosting setup for how to programmatically change your DNS settings. Whether you can actually do this depends on the host. If your server is running a DNS server that you have access to, you can probably change it that way.