Documentation ¶
Overview ¶
Package keypaths defines several keypaths used by multiple Teleport services.
Index ¶
- Constants
- func AppCertPath(baseDir, proxy, username, cluster, appname string) string
- func AppCredentialDir(baseDir, proxy, username, cluster string) string
- func AppDir(baseDir, proxy, username string) string
- func AppKeyPath(baseDir, proxy, username, cluster, appname string) string
- func AppLocalCAPath(baseDir, proxy, username, cluster, appname string) string
- func CAsDir(baseDir, proxy string) string
- func CurrentProfileFilePath(baseDir string) string
- func DatabaseCertPath(baseDir, proxy, username, cluster, dbname string) string
- func DatabaseCredentialDir(baseDir, proxy, username, cluster string) string
- func DatabaseDir(baseDir, proxy, username string) string
- func DatabaseKeyPath(baseDir, proxy, username, cluster, dbname string) string
- func DatabaseOracleWalletDirectory(baseDir, proxy, username, cluster, dbname string) string
- func IdentitySSHCertPath(path string) string
- func IsProfileKubeConfigPath(path string) (bool, error)
- func KeyDir(baseDir string) string
- func KnownHostsPath(baseDir string) string
- func KubeConfigPath(baseDir, proxy, username, cluster, kubename string) string
- func KubeCredLockfilePath(baseDir, proxy string) string
- func KubeCredPath(baseDir, proxy, username, cluster, kubename string) string
- func KubeCredentialDir(baseDir, proxy, username, cluster string) string
- func KubeDir(baseDir, proxy, username string) string
- func PPKFilePath(baseDir, proxy, username string) string
- func ProfileFilePath(baseDir, profileName string) string
- func ProxyKeyDir(baseDir, proxy string) string
- func PublicKeyPath(baseDir, proxy, username string) string
- func SSHCertPath(baseDir, proxy, username, cluster string) string
- func SSHDir(baseDir, proxy, username string) string
- func TLSCAsPath(baseDir, proxy string) string
- func TLSCAsPathCluster(baseDir, proxy, cluster string) string
- func TLSCertPath(baseDir, proxy, username string) string
- func TLSCertPathLegacy(baseDir, proxy, username string) string
- func TrimKeyPathSuffix(path string) string
- func UserSSHKeyPath(baseDir, proxy, username string) string
- func UserTLSKeyPath(baseDir, proxy, username string) string
Constants ¶
const ( // FileExtTLSCertLegacy is the legacy suffix/extension of a file where a TLS cert is stored. FileExtTLSCertLegacy = "-x509.pem" // FileExtTLSCert is the suffix/extension of a file where a TLS cert is stored. FileExtTLSCert = ".crt" // FileExtKubeCred is the suffix/extension of a file where a kubernetes // credential is stored (TLS key and cert combined in a single file). FileExtKubeCred = ".cred" )
keypath constants aren't exported in order to force helper function usage and maintain consistency.
Variables ¶
This section is empty.
Functions ¶
func AppCertPath ¶
AppCertPath returns the path to the user's TLS certificate for the given proxy, cluster, and app.
<baseDir>/keys/<proxy>/<username>-app/<cluster>/<appname>.crt
func AppCredentialDir ¶
AppCredentialDir returns the path to the user's app credential directory for the given proxy and cluster.
<baseDir>/keys/<proxy>/<username>-app/<cluster>
func AppDir ¶
AppDir returns the path to the user's app directory for the given proxy.
<baseDir>/keys/<proxy>/<username>-app
func AppKeyPath ¶
AppKeyPath returns the path to the user's private key for the given proxy, cluster, and app.
<baseDir>/keys/<proxy>/<username>-app/<cluster>/<appname>.key
func AppLocalCAPath ¶
AppLocalCAPath returns the path to a self-signed localhost CA for the given proxy, cluster, and app.
<baseDir>/keys/<proxy>/<username>-app/<cluster>/<appname>-localca.pem
func CAsDir ¶
CAsDir returns path to trusted clusters certificates directory.
<baseDir>/keys/<proxy>/cas
func CurrentProfileFilePath ¶
CurrentProfile returns the path to the current profile file.
<baseDir>/current-profile
func DatabaseCertPath ¶
DatabaseCertPath returns the path to the user's TLS certificate for the given proxy, cluster, and database.
<baseDir>/keys/<proxy>/<username>-db/<cluster>/<dbname>.crt
func DatabaseCredentialDir ¶
DatabaseCredentialDir returns the path to the user's database cert directory for the given proxy and cluster.
<baseDir>/keys/<proxy>/<username>-db/<cluster>
func DatabaseDir ¶
DatabaseDir returns the path to the user's database directory for the given proxy.
<baseDir>/keys/<proxy>/<username>-db
func DatabaseKeyPath ¶
DatabaseKeyPath returns the path to the user's TLS private key for the given proxy, cluster, and database.
<baseDir>/keys/<proxy>/<username>-db/<cluster>/<dbname>.key
func DatabaseOracleWalletDirectory ¶
DatabaseOracleWalletDirectory returns the path to the user's Oracle Wallet configuration directory. for the given proxy, cluster and database. <baseDir>/keys/<proxy>/<username>-db/<cluster>/dbname-wallet/
func IdentitySSHCertPath ¶
IdentitySSHCertPath returns the path to the identity file's SSH certificate.
<identity-file-dir>/<path>-cert.pub
func IsProfileKubeConfigPath ¶
IsProfileKubeConfigPath makes a best effort attempt to check if the given path is a profile specific kubeconfig path generated by this package.
func KnownHostsPath ¶
KnownHostsPath returns the path to the known hosts file.
<baseDir>/known_hosts
func KubeConfigPath ¶
KubeConfigPath returns the path to the user's standalone kubeconfig for the given proxy, cluster, and kube cluster.
<baseDir>/keys/<proxy>/<username>-kube/<cluster>/<kubename>-kubeconfig
func KubeCredLockfilePath ¶
KubeCredLockfilePath returns the kube credentials lock file for given proxy
<baseDir>/keys/<proxy>/kube_credentials.lock
func KubeCredPath ¶
KubeCredPath returns the path to the user's TLS credential for the given proxy, cluster, and kube cluster.
<baseDir>/keys/<proxy>/<username>-kube/<cluster>/<kubename>.cred
func KubeCredentialDir ¶
KubeCredentialDir returns the path to the user's kube credential directory for the given proxy and cluster.
<baseDir>/keys/<proxy>/<username>-kube/<cluster>
func KubeDir ¶
KubeDir returns the path to the user's kube directory for the given proxy.
<baseDir>/keys/<proxy>/<username>-kube
func PPKFilePath ¶
PPKFilePath returns the path to the user's PuTTY PPK-formatted keypair for the given proxy and cluster.
<baseDir>/keys/<proxy>/<username>.ppk
func ProfileFilePath ¶
ProfileFilePath returns the path to the profile file for the given profile.
<baseDir>/<profileName>.yaml
func ProxyKeyDir ¶
ProxyKeyDir returns the path to the proxy's keys directory.
<baseDir>/keys/<proxy>
func PublicKeyPath ¶
PublicKeyPath returns the path to the users's public key for the given proxy.
<baseDir>/keys/<proxy>/<username>.pub
func SSHCertPath ¶
SSHCertPath returns the path to the users's SSH certificate for the given proxy and cluster.
<baseDir>/keys/<proxy>/<username>-ssh/<cluster>-cert.pub
func SSHDir ¶
SSHDir returns the path to the user's SSH directory for the given proxy.
<baseDir>/keys/<proxy>/<username>-ssh
func TLSCAsPath ¶
TLSCAsPath returns the path to the users's TLS CA's certificates for the given proxy. <baseDir>/keys/<proxy>/certs.pem DELETE IN 10.0. Deprecated
func TLSCAsPathCluster ¶
TLSCAsPathCluster returns the path to the specified cluster's CA directory.
<baseDir>/keys/<proxy>/cas/<cluster>.pem
func TLSCertPath ¶
TLSCertPath returns the path to the users's TLS certificate for the given proxy.
<baseDir>/keys/<proxy>/<username>.crt
func TLSCertPathLegacy ¶
TLSCertPathLegacy returns the legacy path used in Teleport 16.x and older to the users's TLS certificate for the given proxy.
<baseDir>/keys/<proxy>/<username>-x509.pem
func TrimKeyPathSuffix ¶
TrimKeyPathSuffix returns the given path with any key suffix/extension trimmed off.
func UserSSHKeyPath ¶
UserSSHKeyPath returns the path to the users's SSH private key for the given proxy.
<baseDir>/keys/<proxy>/<username>.
func UserTLSKeyPath ¶
UserTLSKeyPath returns the path to the users's TLS private key for the given proxy.
<baseDir>/keys/<proxy>/<username>.key
Types ¶
This section is empty.