Versions in this module Expand all Collapse all v0 v0.0.2 Nov 20, 2024 Changes in this version + const AuthAPIKey + const AuthNone + const AuthToken + const LoginUrl + const UserInfo + type LoginRes struct + Token string + UserId string type Manager + TCASInfo *TCASInfo + func (m *Manager) Login(username, password string) (*TCASInfo, error) + type TCASInfo struct + APIEndpoint string + APIKey string + CaPath string + Role string + SkipVerify bool + Token string + type User struct + ApiKey string + Comment string + CreateTime *time.Time + Department string + Display string + Email string + Id string + LastIp string + LastLogin *time.Time + Name string + No int + Roles string + Status string + UpdateTime *time.Time + type UserRes struct + User *User v0.0.1 Sep 6, 2024 Changes in this version + const AttestCertUrl + const AttestSecretUrl + const AttestUrl + const CaUrl + const NonceGetInterface + const NonceUrl + const PolicyUrl + const SecretListUrl + const SecretUrl + func ParseCert(certData interface{}) (*x509.Certificate, error) + func ParseTokenByPk(publicKey any, tokenString string) (*jwt.Token, error) + func PrintFormatToken(token *jwt.Token) error + func X5cToCertPem(x5c []string) (*bytes.Buffer, error) + type AttestCertData struct + SerialNumber string + X5c []string + type AttestCertInfoReq struct + AttestInfo *NodeAttestInfoReq + Csr *CertCsrInfoReq + type AttestCertResponse struct + Data *AttestCertData + type AttestSecretData struct + Secret interface{} + type CaResponse struct + Keys []CaSingleResponse + type CaSingleResponse struct + Alg string + Crv string + Kid string + Kty string + X string + X5c []string + Y string + type CertCsrInfoReq struct + CommonName string + Expiration int8 + IPAddresses []string + type HttpBaseResponse struct + Code int16 + Message string + type Manager struct + APIEndpoint string + Collectors map[string]collectors.EvidenceCollector + TlsConfig *tls.Config + func New(apiEndpoint, caPath string, c map[string]collectors.EvidenceCollector) (*Manager, error) + func (m *Manager) AttestForCert(tee, eccpemBase64key, devices, policies string, csr *CertCsrInfoReq) (*AttestCertResponse, error) + func (m *Manager) AttestForSecret(tee, runtimedata, devices, policies, secretID string) (*AttestSecretData, error) + func (m *Manager) AttestForToken(tee, runtimedata, devices, policies string) (*TokenResponse, error) + func (m *Manager) DeletePolicy(policyID string) (*PolicyDeleteResponse, error) + func (m *Manager) DeleteSecret(secretID string) (*SecretDeleteResponse, error) + func (m *Manager) GetNonce() (*NonceResponse, error) + func (m *Manager) GetRootCert() (*CaResponse, error) + func (m *Manager) ListPolicy(attestationType string) (*PolicyListResponse, error) + func (m *Manager) ListSecret() (*SecretListResponse, error) + func (m *Manager) SetPolicy(name, policy, attestationType string) (*PolicySetResponse, error) + func (m *Manager) SetSecret(name, encodeJsonData string) (*SecretSetResponse, error) + func (m *Manager) UpdateSecret(id, encodeJsonData string) (*SecretSetResponse, error) + type NodeAttestInfoReq struct + Nonce string + PolicyIds []string + Report *NodeEvidence + type NodeEvidence struct + EventLog string + InitData string + Parameter interface{} + RuntimeData string + Tee string + TeeReport string + TrustDevice []*TrustDeviceReport + type Nonce struct + ExpiredTime time.Time + Nonce string + type NonceResponse struct + Data *Nonce + type PolicyDeleteResponse struct + PolicyID string + type PolicyListJsonFormat struct + Policies []PolicyListResData + type PolicyListResData struct + AttestationType string + CreateTime string + No int + PolicyHash string + PolicyId string + PolicyName string + PolicyRego string + UpdateTime string + Version int + type PolicyListResponse struct + Data []PolicyListResData + type PolicySetResponse struct + PolicyID string + type SecretDeleteResponse struct + SecretID string + type SecretListJsonFormat struct + Secrets []SecretListResData + type SecretListResData struct + CreateTime string + Id string + Name string + UpdateTime string + type SecretListResponse struct + Data []SecretListResData + type SecretSetResponse struct + Id string + type SetPolicyReq struct + AttestationType string + Name string + Policy string + type SetSecretReq struct + Name string + Secret string + type TokenResponse struct + Token string + type TrustDeviceReport struct + DeviceReport string + DeviceType string + Parameter interface{} + type UpdateSecretReq struct + Id string + Secret string