Skip to content

Commit

Permalink
Update certs to output public key
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjackson committed May 8, 2023
1 parent 2be925f commit 4068f65
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 124 deletions.
37 changes: 32 additions & 5 deletions crypto/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type KeyReaderWriter interface {

type KeyPair struct {
Private *PrivateKey
Public KeyReaderWriter
Public *PublicKey
}

func NewKeyPair() *KeyPair {
Expand All @@ -30,14 +30,18 @@ type PrivateKey struct {
*rsa.PrivateKey
}

type PublicKey struct {
*rsa.PublicKey
}

// GenerateKeyPair creates a new RSA key pair
func GenerateKeyPair() (*KeyPair, error) {
privKey, err := rsa.GenerateKey(rand.Reader, 4096)
if err != nil {
return nil, fmt.Errorf("generating random key: %v", err)
}

return &KeyPair{Private: &PrivateKey{privKey}}, nil
return &KeyPair{Private: &PrivateKey{privKey}, Public: &PublicKey{&privKey.PublicKey}}, nil
}

func (k *PrivateKey) PEMBlock() []byte {
Expand All @@ -58,14 +62,14 @@ func (k *PrivateKey) String() string {
func (k *PrivateKey) ReadFile(path string) error {
d, err := ioutil.ReadFile(path)
if err != nil {
return fmt.Errorf("Unable to read file at path: %s", path)
return fmt.Errorf("unable to read key at path: %s", path)
}

pb, _ := pem.Decode(d)

pk, err := x509.ParsePKCS1PrivateKey(pb.Bytes)
if err != nil {
return fmt.Errorf("Unable to decode file at path: %s", path)
return fmt.Errorf("unable to decode file at path: %s", path)
}

k.PrivateKey = pk
Expand All @@ -76,7 +80,30 @@ func (k *PrivateKey) ReadFile(path string) error {
func (k *PrivateKey) WriteFile(path string) error {
err := ioutil.WriteFile(path, k.PEMBlock(), 0400)
if err != nil {
return fmt.Errorf("Unable to write CA to path %s: %s", path, err)
return fmt.Errorf("unable to write key to path %s: %s", path, err)
}

return nil
}

func (k PublicKey) PEMBlock() []byte {
pkb := &pem.Block{
Type: "RSA PUBLIC KEY",
Bytes: x509.MarshalPKCS1PublicKey(k.PublicKey),
}

return pem.EncodeToMemory(pkb)
}

// String returns a PEM encoded version of the Key
func (k *PublicKey) String() string {
return string(k.PEMBlock())
}

func (k *PublicKey) WriteFile(path string) error {
err := ioutil.WriteFile(path, k.PEMBlock(), 0400)
if err != nil {
return fmt.Errorf("unable to write key to path %s: %s", path, err)
}

return nil
Expand Down
6 changes: 3 additions & 3 deletions test/nomad/install.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exec_remote "certs" {
}

network {
name = "network.local"
name = "network.test"
}

cmd = "/generate_certs.sh"
Expand All @@ -29,7 +29,7 @@ exec_remote "create_job" {
}

network {
name = "network.local"
name = "network.test"
}

cmd = "/generate_job.sh"
Expand All @@ -55,7 +55,7 @@ exec_remote "create_job" {

nomad_job "connector" {
depends_on = ["exec_remote.create_job"]
cluster = "nomad_cluster.dev"
cluster = "nomad_cluster.test"

paths = ["./job/install.nomad"]
health_check {
Expand Down
220 changes: 110 additions & 110 deletions test/nomad/job/install.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -49,39 +49,39 @@ job "connector" {
template {
data = <<-EOH
-----BEGIN CERTIFICATE-----
MIIGGTCCBAGgAwIBAgIRAL39HBPSPY42Ut2IL8hnSM8wDQYJKoZIhvcNAQELBQAw
KjERMA8GA1UEChMIU2hpcHlhcmQxFTATBgNVBAMTDENvbm5lY3RvciBDQTAeFw0y
MzA1MDMxMDQ0MzNaFw0yNDAxMjMxMDQ0MzNaMCwxETAPBgNVBAoTCFNoaXB5YXJk
MRcwFQYDVQQDEw5Db25uZWN0b3IgTGVhZjCCAiIwDQYJKoZIhvcNAQEBBQADggIP
ADCCAgoCggIBAOxBJpW2KAfWGdxR0qGK7OT4PPDJUSGcZ74kmEpGLS3INqQgYBp6
4McQPEa62eGVp8XufqDLDpulYJwQu+AjxL0M+5udJ87GWgbVdEgwUZqXPOtsiWqe
UU4ULs8dlZj5i8Hpxv4Xyp5h7U+a9X8khBJNvZZpJpA0R0Yxnd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& 5 deletions test/nomad/nomad.hcl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
network "local" {
subnet = "10.5.0.0/16"
network "test" {
subnet = "10.6.0.0/16"
}

nomad_cluster "dev" {
nomad_cluster "test" {
network {
name = "network.local"
name = "network.test"
}

image {
Expand All @@ -25,7 +25,7 @@ nomad_cluster "dev" {
}

nomad_job "fake_service" {
cluster = "nomad_cluster.dev"
cluster = "nomad_cluster.test"

paths = ["./example.nomad"]
health_check {
Expand Down
2 changes: 1 addition & 1 deletion test/nomad/test/local.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Scenario: Expose multiple local and remote servics to a Kubernetes connector
Given I have a running blueprint
Then the following resources should be running
| name | type |
| dev | nomad_cluster |
| test | nomad_cluster |
| local_connector | container |
When I run the script
```
Expand Down

0 comments on commit 4068f65

Please sign in to comment.