-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure for life as independent library
- Loading branch information
Showing
32 changed files
with
51 additions
and
104 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,40 @@ | ||
# Ziti Foundation Library | ||
Ziti Identity library | ||
--------------------- | ||
|
||
This is a library containing core infrastructure for Ziti. | ||
This library is an attempt to normalize identity configuration for various ziti components. | ||
|
||
This is a step towards open-sourcing the entire Ziti ecosystem. We're in the process of working through preparing to alter our internal build and testing systems to accomodate the migration to GitHub. | ||
# Configuration | ||
|
||
This is a work in progress. | ||
It is expected that identity configuration is stored in JSON format and mapped to `identity.IdentityConfig` type | ||
```json | ||
{ | ||
"id": { | ||
"key": "file://{path}", | ||
"cert": "file://{path}", | ||
"server_cert": "file://{path}" // optional | ||
"ca": "file://{path}" // optional | ||
} | ||
} | ||
``` | ||
|
||
It allows different ways of specifying private keys and certificates | ||
### Keys | ||
* from file `"key": "file://{path to key PEM file}"`, or `"key": "{path to key PEM file}"`. | ||
Note, latter version supports relative paths | ||
* inline `"key": "pem:------BEGIN EC PRIVATE KEY-----...."` | ||
* engine for HW token support `"key": "engine:{engine_id}?{engine options}"` | ||
|
||
### Certificates | ||
Applied to both ID/client and server certificates, as well as CA bundle config | ||
* from file `"cert": "file://{path to cert PEM file}"`, or `"server_cert": "{path to key PEM file}"`. | ||
Note, latter version supports relative paths | ||
* inline `"cert": "pem:------BEGIN CERTIFICATE-----...."` | ||
|
||
# Usage | ||
Once `IdentityConfig` is loaded, it could be used to acquire actual TLS credentials | ||
```go | ||
idCfg := cfg.ID // load config from somewhere | ||
id, err := identity.LoadIdentity(idCfg) | ||
|
||
cltCert = id.Cert() // tls.Certificate | ||
``` |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,28 @@ | ||
module github.com/openziti/foundation | ||
module github.com/openziti/identity | ||
|
||
go 1.18 | ||
|
||
require ( | ||
github.com/emirpasic/gods v1.17.0 | ||
github.com/google/uuid v1.3.0 | ||
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d | ||
github.com/michaelquigley/pfxlog v0.6.9 | ||
github.com/miekg/pkcs11 v1.1.1 | ||
github.com/mitchellh/go-ps v1.0.0 | ||
github.com/orcaman/concurrent-map/v2 v2.0.0 | ||
github.com/openziti/foundation v0.17.30 | ||
github.com/parallaxsecond/parsec-client-go v0.0.0-20210416104105-e2d188152601 | ||
github.com/pkg/errors v0.9.1 | ||
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 | ||
github.com/sirupsen/logrus v1.8.1 | ||
github.com/speps/go-hashids v2.0.0+incompatible | ||
github.com/spf13/cobra v1.5.0 | ||
github.com/stretchr/testify v1.7.5 | ||
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 | ||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 | ||
google.golang.org/protobuf v1.28.0 | ||
gopkg.in/yaml.v2 v2.4.0 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/fsnotify/fsnotify v1.5.1 // indirect | ||
github.com/google/go-cmp v0.5.7 // indirect | ||
github.com/inconshreveable/mousetrap v1.0.0 // indirect | ||
github.com/kr/text v0.2.0 // indirect | ||
github.com/mattn/go-colorable v0.1.12 // indirect | ||
github.com/mattn/go-isatty v0.0.14 // indirect | ||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect | ||
github.com/onsi/ginkgo v1.16.4 // indirect | ||
github.com/onsi/gomega v1.13.0 // indirect | ||
github.com/nxadm/tail v1.4.8 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect | ||
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect | ||
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect | ||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect | ||
golang.org/x/text v0.3.6 // indirect | ||
google.golang.org/protobuf v1.28.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
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
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
Oops, something went wrong.