Just another Google-like go/ short-link service, deployed on GCP and integrated with G Suite!
While volunteering at Google Beijing, I learned that Google has an internal URL shortener that allows users to register URL shortcuts for lengthy URLs. For example, if you are interested in the first release preview of Flutter, you only need to visit http://go/flutter-rp1. You want to see the blog post about it? Sure, just visit http://go/flutter-rp1-blog! Those links can even be easily printed out on paper, and also easily remembered. Life is a lot easier with those links.
According to Kelly Norton, this was originally implemented at Google by Benjamin Staffin to end the never-ending stream of requests for internal CNAME entries. He described it as AOL keywords for the corporate network.
It's built on top of Google App Engine, and Google Cloud Datastore, so it scales really well, and is really easy to deploy. It's written in Python 2.7, and I haven't tested support for Python 3, but feel free to send a pull request if changes are needed to support Python 3. It calls Google's OAuth API so it can integrate with your G Suite for SSO (Single-Sign On) and access control. For more advanced access control, it integrates with Google Groups. It also has a pretty (imo) UI built with Material Design Lite.
Why another one?
As mentioned before, there are
go link as a service platforms but it's not customizable enough
to suit individual needs and they are expensive to use. Security is another concern since it's
closed-source and hosted by third-party.
Kelly Norton wrote a decent one in Golang, but it needs to be deployed in a container/VM. It also lacks advanced features and doesn't support any sort of Access Control.
So I decided to write my own. It's deployed on Google App Engine so it's much easier to maintain and scale. It integrates directly with G Suite. It also integrates with Google Groups for more advanced access control.
You can easily log in to your G Suite account, view the links you created, create new links, modify links, delete links, and see how many times your links have been clicked, all on the web portal.
For every link, you can specify whether it requires G Suite login. You can also specify if it requires G Suite user to belong to certain Google Groups to access that specific URL.
- Create a new GCP project.
pip install -t lib -r requirements.txt
config.pyand modify accordingly
gcloud app deploy app.yaml
- Go to GCP app engine settings, set
Google Apps domainfor G Suite integration
- In App Engine settings, configure your custom domain (e.g. go.corp.munpanel.com)
- Visit the domain you just set, and enjoy :-)
Google Groups Integration
We support integration with Google Groups for more advanced access control on top of regular G Suite integration. For each link, you can specify users in which internal Google Group have access.
To set up Google Groups Integration, follow the following steps:
- Turn on
GSUITE_DIRECTORY_ADMIN_USERto a G Suite admin user in your domain.
- Go to Service Accounts settings for your
GCP project and create a new service account (you don't need to grant any GCP project or user access to
the service account); enable
G Suite Domain-wide Delegationfor it. Download json format key and put it as
credentials.jsonin your GAE project root.
- Go to G Suite Admin, select
Manage API Access
- Authorize a new access, set
Client Nameto the
G Suite Domain-wide Delegation, set scope to
- Go to GCP API Library and enable
Admin SDKAPI for your GCP project.
Contribution is welcome! Feel free to send pull requests ^_^
This product is neither endorsed nor supported by Google LLC.