fix: add involves edge from task to agent:nomos at creation
Plus sync vendor directory for Docker build compatibility.
This commit is contained in:
27
vendor/github.com/infisical/go-sdk/packages/api/ssh/add_ssh_host.go
generated
vendored
Normal file
27
vendor/github.com/infisical/go-sdk/packages/api/ssh/add_ssh_host.go
generated
vendored
Normal 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
|
||||
}
|
||||
21
vendor/github.com/infisical/go-sdk/packages/api/ssh/get_ssh_host_host_ca_pk.go
generated
vendored
Normal file
21
vendor/github.com/infisical/go-sdk/packages/api/ssh/get_ssh_host_host_ca_pk.go
generated
vendored
Normal 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
|
||||
}
|
||||
21
vendor/github.com/infisical/go-sdk/packages/api/ssh/get_ssh_host_user_ca_pk.go
generated
vendored
Normal file
21
vendor/github.com/infisical/go-sdk/packages/api/ssh/get_ssh_host_user_ca_pk.go
generated
vendored
Normal 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
|
||||
}
|
||||
26
vendor/github.com/infisical/go-sdk/packages/api/ssh/get_ssh_hosts.go
generated
vendored
Normal file
26
vendor/github.com/infisical/go-sdk/packages/api/ssh/get_ssh_hosts.go
generated
vendored
Normal 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
|
||||
}
|
||||
27
vendor/github.com/infisical/go-sdk/packages/api/ssh/issue_ssh_creds.go
generated
vendored
Normal file
27
vendor/github.com/infisical/go-sdk/packages/api/ssh/issue_ssh_creds.go
generated
vendored
Normal 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
|
||||
}
|
||||
29
vendor/github.com/infisical/go-sdk/packages/api/ssh/issue_ssh_host_host_cert.go
generated
vendored
Normal file
29
vendor/github.com/infisical/go-sdk/packages/api/ssh/issue_ssh_host_host_cert.go
generated
vendored
Normal 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
|
||||
}
|
||||
29
vendor/github.com/infisical/go-sdk/packages/api/ssh/issue_ssh_host_user_cert.go
generated
vendored
Normal file
29
vendor/github.com/infisical/go-sdk/packages/api/ssh/issue_ssh_host_user_cert.go
generated
vendored
Normal 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
|
||||
}
|
||||
95
vendor/github.com/infisical/go-sdk/packages/api/ssh/models.go
generated
vendored
Normal file
95
vendor/github.com/infisical/go-sdk/packages/api/ssh/models.go
generated
vendored
Normal 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
|
||||
27
vendor/github.com/infisical/go-sdk/packages/api/ssh/sign_ssh_public_key.go
generated
vendored
Normal file
27
vendor/github.com/infisical/go-sdk/packages/api/ssh/sign_ssh_public_key.go
generated
vendored
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user