Skip to content

Instantly share code, notes, and snippets.

View calavera's full-sized avatar

David Calavera calavera

View GitHub Profile
package main
import (
"encoding/json"
"fmt"
"net/http"
"strings"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
@calavera
calavera / ssl-cert-upgrade-cloudfront.md
Created September 4, 2017 16:45 — forked from jbinto/ssl-cert-upgrade-cloudfront.md
Upgrading SSL certificate on Cloudfront

Upgrading SSL certificate on Cloudfront

Last year I set up jessebuchanan.ca with an SSL certificate on Amazon S3 / CloudFront.

Now, it's time to renew the certificate.

The first time was fraught with peril, but I eventually got it working.

This time I will document the steps to renew the cert. Most steps for a new installation would be omitted.

#!/bin/bash
fake_credential_store.sh get <<< "https://api.github.com"
#!/bin/bash
fake_credential_store.sh store <<EOF
{
"ServerURL": "https://api.github.com",
"Username": "token",
"Secret": "my-super-secret-token"
}
EOF
#!/bin/bash
set -e
case $1 in
"store")
in=$(</dev/stdin)
server=$(echo "$in" | jq --raw-output ".ServerURL" | sha1sum - | awk '{print $1}')
username=$(echo "$in" | jq --raw-output ".Username")
package main
import (
"github.com/docker/docker-credential-helpers/client"
"github.com/docker/docker-credential-helpers/credentials"
)
var nativeStore = client.NewShellProgramFunc("docker-credential-secretservice")
func main() {
package main
import (
"github.com/docker/docker-credential-helpers/credentials"
"github.com/docker/docker-credential-helpers/secretservice"
)
var nativeStore = secretservice.SecretService{}
func main() {

Keybase proof

I hereby claim:

  • I am calavera on github.
  • I am calavera (https://keybase.io/calavera) on keybase.
  • I have a public key ASDUPQEH-RKBpCv5MjzzP17YP83yZrn9jy1bJiBzjsoHgQo

To claim this, I am signing this object:

16:55:17 ---> Making bundle: binary (in bundles/1.11.0-dev/binary)
16:55:17 Building: bundles/1.11.0-dev/binary/docker-1.11.0-dev.exe
16:55:32 # github.com/docker/docker/cliconfig/credentials
16:55:32 cliconfig\credentials\native_store.go:82: auth.IdentityToken undefined (type types.AuthConfig has no field or method IdentityToken)
16:55:32 cliconfig\credentials\native_store.go:82: creds.IdentityToken undefined (type types.AuthConfig has no field or method IdentityToken)
16:55:32 cliconfig\credentials\native_store.go:96: ac.IdentityToken undefined (type types.AuthConfig has no field or method IdentityToken)
16:55:32 cliconfig\credentials\native_store.go:96: creds.IdentityToken undefined (type types.AuthConfig has no field or method IdentityToken)
16:55:32 cliconfig\credentials\native_store.go:110: authConfig.IdentityToken undefined (type types.AuthConfig has no field or method IdentityToken)
16:55:32 cliconfig\credentials\native_store.go:125: config.IdentityToken undefined (type types.AuthConfig has no field o
package main
import (
"bytes"
"log"
"os"
"sync"
"github.com/docker/docker/pkg/stdcopy"
)