For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
| #!/bin/python | |
| # | |
| # Copyright 2016 Flavio Garcia | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |
| function getSignature() { | |
| //pretty basic function for testing | |
| if ( startupChecks()) { return; } | |
| var email = SpreadsheetApp.getActiveSpreadsheet().getActiveCell().getValue().toString(); | |
| if ( email === "" ) { | |
| Browser.msgBox("No email selected", "Please select a cell containing a user's email" , Browser.Buttons.OK); | |
| return; | |
| } | |
| var result = authorisedUrlFetch(email, {}); | |
| Browser.msgBox(result.getContentText()); |
| # python 2.7 | |
| """ Read data from a spreadsheet to construct an HTML signature, and update users. | |
| This is enough code to get you going. | |
| You have a service account via a project setup on the Google Developer console. | |
| Download the key in json format. | |
| Next you need to go to the domain's Google admin to enable the correct google API. | |
| The scope is API_scopes =['https://apps-apis.google.com/a/feeds/emailsettings/2.0/'] | |
| In more detail: | |
| 1. Follow the oauth2 notes to make a service account and download a JSON private key as usual. You do that on the developer console. The service account is not linked to any domain, it is just a credential. |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt