This is a proof of concept demonstrating local socket communication with Juju using generally available command line utilities and commands from a remote shell via 'juju ssh' or 'juju run'.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import json | |
import os | |
import sys | |
from subprocess import Popen, PIPE | |
def die(msg): | |
print >>sys.stderr, msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"crypto/ecdsa" | |
"crypto/elliptic" | |
"crypto/rand" | |
"crypto/sha256" | |
"flag" | |
"fmt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/rand" | |
"fmt" | |
"code.google.com/p/go.crypto/nacl/box" | |
) | |
type PublicKey struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"time" | |
"github.com/juju/juju/worker" | |
"github.com/juju/juju/worker/dependency" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bench | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"testing" | |
"time" | |
"github.com/juju/juju/cert" | |
gc "gopkg.in/check.v1" |
-
Install
cfssl
andcfssljson
commands from https://github.com/cloudflare/cfssl -
Create a CA
Make a file called ca.json
, containing this:
{
"key": {
"algo": "rsa",
"size": 2048