EdgexAgent/device-gps-go/vendor/github.com/openziti/identity
2025-07-10 20:30:06 +08:00
..
certtools 边缘代理监测项目 2025-07-10 20:30:06 +08:00
engines 边缘代理监测项目 2025-07-10 20:30:06 +08:00
.gitignore 边缘代理监测项目 2025-07-10 20:30:06 +08:00
address_windows.go 边缘代理监测项目 2025-07-10 20:30:06 +08:00
address.go 边缘代理监测项目 2025-07-10 20:30:06 +08:00
ca_pool.go 边缘代理监测项目 2025-07-10 20:30:06 +08:00
chains.go 边缘代理监测项目 2025-07-10 20:30:06 +08:00
CODE_OF_CONDUCT.md 边缘代理监测项目 2025-07-10 20:30:06 +08:00
config.go 边缘代理监测项目 2025-07-10 20:30:06 +08:00
CONTRIBUTING.md 边缘代理监测项目 2025-07-10 20:30:06 +08:00
identity_watcher_js.go 边缘代理监测项目 2025-07-10 20:30:06 +08:00
identity_watcher.go 边缘代理监测项目 2025-07-10 20:30:06 +08:00
identity.go 边缘代理监测项目 2025-07-10 20:30:06 +08:00
lazy.go 边缘代理监测项目 2025-07-10 20:30:06 +08:00
LICENSE 边缘代理监测项目 2025-07-10 20:30:06 +08:00
README.md 边缘代理监测项目 2025-07-10 20:30:06 +08:00
SECURITY.md 边缘代理监测项目 2025-07-10 20:30:06 +08:00
token.go 边缘代理监测项目 2025-07-10 20:30:06 +08:00
version 边缘代理监测项目 2025-07-10 20:30:06 +08:00

Ziti Identity library

This library is an attempt to normalize identity configuration for various ziti components.

Configuration

It is expected that identity configuration is stored in JSON format and mapped to identity.IdentityConfig type

{
    "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

idCfg := cfg.ID // load config from somewhere
id, err := identity.LoadIdentity(idCfg)

cltCert = id.Cert() // tls.Certificate