fix: add involves edge from task to agent:nomos at creation
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled
ci / web (push) Has been cancelled
Desktop App / Build Linux (amd64) (push) Has been cancelled
Desktop App / Attach to Release (push) Has been cancelled

Plus sync vendor directory for Docker build compatibility.
This commit is contained in:
2026-08-11 22:03:12 +02:00
parent 7d6a3320d4
commit febc153b7f
3384 changed files with 945212 additions and 2 deletions

View File

@@ -0,0 +1,27 @@
package api
import (
"github.com/go-resty/resty/v2"
"github.com/infisical/go-sdk/packages/errors"
)
const callAddSshHostOperation = "CallAddSshHostV1"
func CallAddSshHostV1(httpClient *resty.Client, body AddSshHostV1Request) (AddSshHostV1Response, error) {
resp := AddSshHostV1Response{}
res, err := httpClient.R().
SetBody(body).
SetResult(&resp).
Post("/v1/ssh/hosts")
if err != nil {
return AddSshHostV1Response{}, errors.NewRequestError(callAddSshHostOperation, err)
}
if res.IsError() {
return AddSshHostV1Response{}, errors.NewAPIErrorWithResponse(callAddSshHostOperation, res)
}
return resp, nil
}

View File

@@ -0,0 +1,21 @@
package api
import (
"github.com/go-resty/resty/v2"
"github.com/infisical/go-sdk/packages/errors"
)
func GetSshHostHostCaPublicKeyV1(httpClient *resty.Client, sshHostId string) (string, error) {
res, err := httpClient.R().
Get("/v1/ssh/hosts/" + sshHostId + "/host-ca-public-key")
if err != nil {
return "", errors.NewRequestError("GetSshHostHostCaPublicKeyV1", err)
}
if res.IsError() {
return "", errors.NewAPIErrorWithResponse("GetSshHostHostCaPublicKeyV1", res)
}
return res.String(), nil
}

View File

@@ -0,0 +1,21 @@
package api
import (
"github.com/go-resty/resty/v2"
"github.com/infisical/go-sdk/packages/errors"
)
func GetSshHostUserCaPublicKeyV1(httpClient *resty.Client, sshHostId string) (string, error) {
res, err := httpClient.R().
Get("/v1/ssh/hosts/" + sshHostId + "/user-ca-public-key")
if err != nil {
return "", errors.NewRequestError("GetSshHostUserCaPublicKeyV1", err)
}
if res.IsError() {
return "", errors.NewAPIErrorWithResponse("GetSshHostUserCaPublicKeyV1", res)
}
return res.String(), nil
}

View File

@@ -0,0 +1,26 @@
package api
import (
"github.com/go-resty/resty/v2"
"github.com/infisical/go-sdk/packages/errors"
)
const callGetSshHostsOperation = "CallGetSshHostsV1"
func GetSshHostsV1(httpClient *resty.Client, _ GetSshHostsV1Request) (GetSshHostsV1Response, error) {
var getSshHostsResponse GetSshHostsV1Response
res, err := httpClient.R().
SetResult(&getSshHostsResponse).
Get("/v1/ssh/hosts")
if err != nil {
return nil, errors.NewRequestError(callGetSshHostsOperation, err)
}
if res.IsError() {
return nil, errors.NewAPIErrorWithResponse(callGetSshHostsOperation, res)
}
return getSshHostsResponse, nil
}

View File

@@ -0,0 +1,27 @@
package api
import (
"github.com/go-resty/resty/v2"
"github.com/infisical/go-sdk/packages/errors"
)
const callIssueSshCredsOperation = "CallIssueSshCredsV1"
func CallIssueSshCredsV1(httpClient *resty.Client, request IssueSshCredsV1Request) (IssueSshCredsV1Response, error) {
issueSshCredsResponse := IssueSshCredsV1Response{}
res, err := httpClient.R().
SetResult(&issueSshCredsResponse).
SetBody(request).
Post("/v1/ssh/certificates/issue")
if err != nil {
return IssueSshCredsV1Response{}, errors.NewRequestError(callIssueSshCredsOperation, err)
}
if res.IsError() {
return IssueSshCredsV1Response{}, errors.NewAPIErrorWithResponse(callIssueSshCredsOperation, res)
}
return issueSshCredsResponse, nil
}

View File

@@ -0,0 +1,29 @@
package api
import (
"fmt"
"github.com/go-resty/resty/v2"
"github.com/infisical/go-sdk/packages/errors"
)
const callIssueSshHostHostCertOperation = "CallIssueSshHostHostCertV1"
func CallIssueSshHostHostCertV1(httpClient *resty.Client, sshHostId string, body IssueSshHostHostCertV1Request) (IssueSshHostHostCertV1Response, error) {
resp := IssueSshHostHostCertV1Response{}
res, err := httpClient.R().
SetBody(body).
SetResult(&resp).
Post(fmt.Sprintf("/v1/ssh/hosts/%s/issue-host-cert", sshHostId))
if err != nil {
return IssueSshHostHostCertV1Response{}, errors.NewRequestError(callIssueSshHostHostCertOperation, err)
}
if res.IsError() {
return IssueSshHostHostCertV1Response{}, errors.NewAPIErrorWithResponse(callIssueSshHostHostCertOperation, res)
}
return resp, nil
}

View File

@@ -0,0 +1,29 @@
package api
import (
"fmt"
"github.com/go-resty/resty/v2"
"github.com/infisical/go-sdk/packages/errors"
)
const callIssueSshHostUserCertOperation = "CallIssueSshHostUserCertV1"
func CallIssueSshHostUserCertV1(httpClient *resty.Client, sshHostId string, body IssueSshHostUserCertV1Request) (IssueSshHostUserCertV1Response, error) {
resp := IssueSshHostUserCertV1Response{}
res, err := httpClient.R().
SetBody(body).
SetResult(&resp).
Post(fmt.Sprintf("/v1/ssh/hosts/%s/issue-user-cert", sshHostId))
if err != nil {
return IssueSshHostUserCertV1Response{}, errors.NewRequestError(callIssueSshHostUserCertOperation, err)
}
if res.IsError() {
return IssueSshHostUserCertV1Response{}, errors.NewAPIErrorWithResponse(callIssueSshHostUserCertOperation, res)
}
return resp, nil
}

View File

@@ -0,0 +1,95 @@
package api
import (
"github.com/infisical/go-sdk/packages/util"
)
type SignSshPublicKeyV1Request struct {
CertificateTemplateID string `json:"certificateTemplateId"`
PublicKey string `json:"publicKey"`
CertType util.SshCertType `json:"certType,omitempty"`
Principals []string `json:"principals"`
TTL string `json:"ttl,omitempty"`
KeyID string `json:"keyId,omitempty"`
}
type SignSshPublicKeyV1Response struct {
SerialNumber string `json:"serialNumber"`
SignedKey string `json:"signedKey"`
}
type IssueSshCredsV1Request struct {
CertificateTemplateID string `json:"certificateTemplateId"`
KeyAlgorithm util.CertKeyAlgorithm `json:"keyAlgorithm,omitempty"`
CertType util.SshCertType `json:"certType,omitempty"`
Principals []string `json:"principals"`
TTL string `json:"ttl,omitempty"`
KeyID string `json:"keyId,omitempty"`
}
type IssueSshCredsV1Response struct {
SerialNumber string `json:"serialNumber"`
SignedKey string `json:"signedKey"`
PrivateKey string `json:"privateKey"`
PublicKey string `json:"publicKey"`
KeyAlgorithm util.CertKeyAlgorithm `json:"keyAlgorithm"`
}
type GetSshHostsV1Request struct{}
type AllowedPrincipals struct {
Usernames []string `json:"usernames"`
}
type SshHostLoginMapping struct {
LoginUser string `json:"loginUser"`
AllowedPrincipals AllowedPrincipals `json:"allowedPrincipals"`
}
type SshHost struct {
ID string `json:"id"`
ProjectID string `json:"projectId"`
Hostname string `json:"hostname"`
Alias string `json:"alias,omitempty"`
UserCertTtl string `json:"userCertTtl"`
HostCertTtl string `json:"hostCertTtl"`
UserSshCaId string `json:"userSshCaId"`
HostSshCaId string `json:"hostSshCaId"`
LoginMappings []SshHostLoginMapping `json:"loginMappings"`
}
type GetSshHostsV1Response []SshHost
type IssueSshHostUserCertV1Request struct {
LoginUser string `json:"loginUser"`
}
type IssueSshHostUserCertV1Response struct {
SerialNumber string `json:"serialNumber"`
SignedKey string `json:"signedKey"`
PrivateKey string `json:"privateKey"`
PublicKey string `json:"publicKey"`
KeyAlgorithm util.CertKeyAlgorithm `json:"keyAlgorithm"`
}
type IssueSshHostHostCertV1Request struct {
PublicKey string `json:"publicKey"`
}
type IssueSshHostHostCertV1Response struct {
SerialNumber string `json:"serialNumber"`
SignedKey string `json:"signedKey"`
}
type AddSshHostV1Request struct {
ProjectID string `json:"projectId"`
Hostname string `json:"hostname"`
Alias string `json:"alias,omitempty"`
UserCertTtl string `json:"userCertTtl,omitempty"`
HostCertTtl string `json:"hostCertTtl,omitempty"`
UserSshCaId string `json:"userSshCaId,omitempty"`
HostSshCaId string `json:"hostSshCaId,omitempty"`
LoginMappings []SshHostLoginMapping `json:"loginMappings,omitempty"`
}
type AddSshHostV1Response SshHost

View File

@@ -0,0 +1,27 @@
package api
import (
"github.com/go-resty/resty/v2"
"github.com/infisical/go-sdk/packages/errors"
)
const callSignSshPublicKeyOperation = "CallSignSshPublicKeyV1"
func CallSignSshPublicKeyV1(httpClient *resty.Client, request SignSshPublicKeyV1Request) (SignSshPublicKeyV1Response, error) {
signSshPublicKeyResponse := SignSshPublicKeyV1Response{}
res, err := httpClient.R().
SetResult(&signSshPublicKeyResponse).
SetBody(request).
Post("/v1/ssh/certificates/sign")
if err != nil {
return SignSshPublicKeyV1Response{}, errors.NewRequestError(callSignSshPublicKeyOperation, err)
}
if res.IsError() {
return SignSshPublicKeyV1Response{}, errors.NewAPIErrorWithResponse(callSignSshPublicKeyOperation, res)
}
return signSshPublicKeyResponse, nil
}