bastion 0.61.0
ci / personal-data (push) Successful in 8s
ci / test (push) Successful in 7m17s
ci / fuzz (push) Successful in 6m33s

This commit is contained in:
Privatae
2026-11-02 06:20:42 +00:00
parent 4f8285ef18
commit 1176f7fd0b
47 changed files with 3574 additions and 294 deletions
+13 -2
View File
@@ -1162,7 +1162,7 @@ func stepupPairing(host string) (*Config, error) {
return nil, err
}
if len(cfgs) == 0 {
return nil, fmt.Errorf("not paired yet — run `privatae-bastion pair <token>` first")
return nil, fmt.Errorf("not paired yet — connect a Host first: %s", asAdmin("pair <token>"))
}
switch {
case host != "":
@@ -1341,7 +1341,7 @@ func readApprovals(o readOpts) (approvalsRead, error) {
func cmdStepupApprovals(host string, machine, asJSON bool) error {
r, err := readMachine("approvals", readOpts{Host: host, Machine: machine}, readApprovals)
if err != nil {
return laneRefusalError("approvals", err)
return laneRefusalError(strings.TrimSpace(stepupCommand("approvals", host, machine, "")), err)
}
if asJSON {
return printJSON(os.Stdout, r)
@@ -1388,6 +1388,9 @@ func findRequest(m map[string]stepupRequest, prefix string) (string, error) {
// privatae-bastion approve [--host <host> | --machine] <request id>
func cmdStepupApprove(host string, machine bool, prefix string) error {
if readsGoThroughLane() {
return ownerApproveViaLane(host, machine, prefix)
}
t, err := resolveStepupTarget(host, machine)
if err != nil {
return err
@@ -1425,6 +1428,14 @@ func cmdStepupApprove(host string, machine bool, prefix string) error {
// privatae-bastion deny [--host <host> | --machine] <request id>
func cmdStepupDeny(host string, machine bool, prefix string) error {
if readsGoThroughLane() {
done, err := actViaSock(agentAskRequest{Act: "deny", Host: host, Machine: machine, ID: prefix})
if err != nil {
return laneRefusalError(stepupCommand("deny", host, machine, prefix), err)
}
fmt.Println(done)
return nil
}
t, err := resolveStepupTarget(host, machine)
if err != nil {
return err