2026-04-06 15:48:37 +05:30
|
|
|
// Copyright IBM Corp. 2020, 2026
|
2022-12-13 17:00:50 -05:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
2023-02-02 17:15:17 -08:00
|
|
|
|
2022-08-31 12:08:46 -04:00
|
|
|
// Package boundary provides methods for commonly used boundary actions that are used in end-to-end tests.
|
|
|
|
|
package boundary
|
|
|
|
|
|
|
|
|
|
import (
|
2026-10-12 10:33:41 -07:00
|
|
|
"repo.anhonesthost.net/CyberCoveLLC/threshold/api/authmethods"
|
|
|
|
|
"repo.anhonesthost.net/CyberCoveLLC/threshold/api/targets"
|
2022-08-31 12:08:46 -04:00
|
|
|
)
|
|
|
|
|
|
2023-07-05 10:48:16 -04:00
|
|
|
// ConnectCliOutput parses the json response from running `boundary connect`
|
|
|
|
|
type ConnectCliOutput struct {
|
2025-09-09 15:03:05 +01:00
|
|
|
Port int `json:"port"`
|
|
|
|
|
Address string `json:"address"`
|
|
|
|
|
Credentials []*targets.SessionCredential `json:"credentials"`
|
2023-07-05 10:48:16 -04:00
|
|
|
}
|
|
|
|
|
|
2022-12-13 17:00:50 -05:00
|
|
|
// AuthenticateCliOutput parses the json response from running `boundary authenticate`
|
|
|
|
|
type AuthenticateCliOutput struct {
|
2023-01-31 14:29:39 -05:00
|
|
|
Item *authmethods.AuthenticateResult
|
|
|
|
|
StatusCode int `json:"status_code"`
|
2022-10-27 14:40:30 -04:00
|
|
|
}
|
|
|
|
|
|
2022-12-13 17:00:50 -05:00
|
|
|
// AuthMethodInfo parses auth method info in the json response from running `boundary database init`
|
|
|
|
|
type AuthMethodInfo struct {
|
|
|
|
|
AuthMethodId string `json:"auth_method_id"`
|
|
|
|
|
LoginName string `json:"login_name"`
|
|
|
|
|
Password string `json:"password"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DbInitInfo parses the json response from running `boundary database init`
|
|
|
|
|
type DbInitInfo struct {
|
|
|
|
|
AuthMethod AuthMethodInfo `json:"auth_method"`
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-15 15:49:18 -05:00
|
|
|
// CliError parses the Stderr from running a boundary command
|
|
|
|
|
type CliError struct {
|
2023-09-26 10:33:53 -04:00
|
|
|
Status int `json:"status_code"`
|
2022-12-15 15:49:18 -05:00
|
|
|
}
|
2023-12-13 10:17:04 -05:00
|
|
|
|
|
|
|
|
type HttpResponseBody struct {
|
|
|
|
|
Attributes HttpResponseBodyAttributes `json:"attributes"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type HttpResponseBodyAttributes struct {
|
|
|
|
|
Token string `json:"token"`
|
|
|
|
|
}
|