Commit graph

648 commits

Author SHA1 Message Date
Boshi Lian
4694964c11
Refactor plugin/yaml/main.go and plugin/yaml/yaml.go to support multiple YAML config files (#477) 2024-10-28 01:57:55 -07:00
Boshi Lian
23e18f4f7c
merge totp to workingdir (#476)
* merge totp to workingdir

* Refactor .goreleaser.yaml to remove plugin_totp build configuration
2024-10-28 01:09:28 -07:00
Boshi Lian
0e6168a6b8
Refactor plugin.proto and pluginbase.go to add support for metadata in connection context (#475)
* Refactor plugin.proto and pluginbase.go to add support for metadata in connection context

* go fmt

* move test plugin out

* Refactor Dockerfile to build test plugin in e2e/testplugin directory

* mv testplugin -> testgrpcplugin

* add test for connection metadata

* enable logging to stdout

* Refactor Dockerfile to build test plugin in e2e/testplugin directory
2024-10-27 23:57:21 -07:00
Boshi Lian
c8ca0c4f97
Refactor README.md to update plugin list and add instructions for screen recording (#474) 2024-10-26 23:47:55 -07:00
Boshi Lian
14ceadb8e8
add skel plugin for code sharing (#473)
* introduce plugin skel to reuse code

* Refactor code to use libplugin.NewSkelPlugin for plugin/kubernetes/main.go
Add YAML Plugin skel.go for plugin/yaml

* Fix code scanning alert no. 6: Incorrect conversion between integer types

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix gpt

* fjx password handling in SkelPlugin and skelpipeToWrapper

* go fmt

* Refactor Docker plugin to use skelpipe wrapper

* Refactor skel.go to use container username instead of client username

* revert yaml test order

* fix public and password mess up

* Refactor working dir to use skel

* revert deleted file

* Refactor skel.go to remove unused code and simplify MatchConn function

* Refactor skel.go to read userKnownHosts file in KnownHosts function

* remove workingdirbykey from goreleaser

* Refactor workingdir.go to use libplugin.SplitHostPortForSSH for parsing host and port

* Refactor skel.go to remove unused code and simplify MatchConn function

* merge doc into workingdir

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-10-24 23:15:26 -07:00
dependabot[bot]
adc5d51c33
Bump k8s.io/code-generator from 0.31.1 to 0.31.2 (#471)
Bumps [k8s.io/code-generator](https://github.com/kubernetes/code-generator) from 0.31.1 to 0.31.2.
- [Commits](https://github.com/kubernetes/code-generator/compare/v0.31.1...v0.31.2)

---
updated-dependencies:
- dependency-name: k8s.io/code-generator
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-24 09:47:28 -07:00
dependabot[bot]
7defedfcaa
Bump k8s.io/client-go from 0.31.1 to 0.31.2 (#470)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.31.1 to 0.31.2.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.31.1...v0.31.2)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-24 09:17:23 -07:00
Boshi Lian
ed19d555b5
add support for ssh ca auth (#467) 2024-10-23 02:41:25 -07:00
Boshi Lian
a3f69952c0
Refactor code to use subtle.ConstantTimeCompare for secure comparison (#466)
* Refactor code to use subtle.ConstantTimeCompare for secure comparison

* Refactor code to use subtle.ConstantTimeCompare for secure comparison
2024-10-21 02:46:19 -07:00
Yachen Mao
3087aa4eb6
handle nextUpHook is nil (#465) 2024-10-20 08:54:02 -07:00
Boshi Lian
4db98899f4
YAML Plugin add regex match group (#464)
* add support for match group replace

* update doc
2024-10-20 02:15:46 -07:00
Boshi Lian
39f5eef98b
Refactor YAML schema to support multiple authorized keys and known hosts (#463)
* add coverage for go proxy

* Refactor CLI flag name for allowed proxy addresses

* Refactor YAML schema to support multiple authorized keys and known hosts

* add testcases

* Refactor YAML schema to support multiple authorized keys and known hosts

* go fmt

* go fmt
2024-10-20 00:20:40 -07:00
Boshi Lian
4ad8e77e3f
add test coverage for go proxy (#460)
* add coverage for go proxy

* Refactor CLI flag name for allowed proxy addresses
2024-10-18 13:28:18 -07:00
dependabot[bot]
e6388b66b2
Bump k8s.io/client-go from 0.30.1 to 0.31.1 (#456)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.30.1 to 0.31.1.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.30.1...v0.31.1)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-18 13:09:53 -07:00
dependabot[bot]
0d6c9c2497
Bump k8s.io/code-generator from 0.30.1 to 0.31.1 (#457)
Bumps [k8s.io/code-generator](https://github.com/kubernetes/code-generator) from 0.30.1 to 0.31.1.
- [Commits](https://github.com/kubernetes/code-generator/compare/v0.30.1...v0.31.1)

---
updated-dependencies:
- dependency-name: k8s.io/code-generator
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-18 12:56:49 -07:00
dependabot[bot]
edbf82c004
Bump k8s.io/apimachinery from 0.30.1 to 0.31.1 (#441)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.30.1 to 0.31.1.
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.30.1...v0.31.1)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-18 10:19:04 -07:00
Boshi Lian
304dd72a53
update docker sdk to v25 (#455)
* update docker sdk to latest

* Refactor Docker plugin to use latest Docker SDK
2024-10-18 02:34:27 -07:00
Boshi Lian
08d0e23d60
Fix grpc.Dial usage in sshpiperd (#436)
* Fix grpc.Dial usage in sshpiperd

* fix dns not found

* Update dependencies in go.mod and go.sum files

* Refactor grpc.NewClient to remove unnecessary grpc.WithBlock() option
2024-10-18 01:01:58 -07:00
Boshi Lian
57d0e21787
move Azure Device Code plugin for sshpiperd out of tree (#453) 2024-10-17 23:36:06 -07:00
Yachen Mao
479d78e3a0
support assciicast and logpath refactor (#450)
* add asciicast v2 log format support and change tty log filename from username to uniqueID

* screen-recording-format support
2024-10-17 22:42:02 -07:00
Yachen Mao
5ef0d03cb8
Fix timing format to correctly handle microsecond portion of time delta (#448) 2024-10-14 23:48:41 -07:00
Boshi Lian
9ff7bde222
update crypto and fix partial succ support (#435)
* update crypto and fix partial succ

* update go ver
2024-09-09 00:12:45 -07:00
Boshi Lian
73fa95c057
fix lint (#428) 2024-08-15 00:58:08 -07:00
Boshi Lian
90eb188c9a
fix docker compose not found (#426) 2024-08-12 21:08:18 -07:00
Daniel Wiegert
538481c33c
update to ssh V9.8.P1 to fix CVE-2024-6387 (#412)
* update to ssh V9.8.P1 to fix CVE-2024-6387

* update to ssh V9.8.P1 to fix CVE-2024-6387
2024-07-11 14:32:38 -07:00
Eduardo Mozart de Oliveira
aa1f3b6370
Update README.md (#408) 2024-06-26 23:24:48 -07:00
dependabot[bot]
a1f3ecae78
Bump goreleaser/goreleaser-action from 5 to 6 (#399)
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 5 to 6.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-05 13:57:34 -07:00
Boshi Lian
305e8164d6
feat: Add test case for publickey_simple_withmultiple_keyfile (#396)
This commit adds a new test case to cover the scenario where multiple key files are used for authentication with the publickey_simple user. It generates a temporary key file and attempts to SSH to the piper server using both the correct and incorrect key files. The test verifies that the correct key file allows the connection and writes a random text to a shared file.
2024-05-30 11:25:35 -07:00
Boshi Lian
6fe67e3f5c
revert partial succ support (#395)
* chore: Update Dockerfile to use golang 1.22-bookworm and install additional dependencies

* revert crypto

* testcase to cover re-mapping to fail
2024-05-30 00:18:35 -07:00
dependabot[bot]
865b972b07
--- (#390)
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-29 17:21:31 -07:00
dependabot[bot]
c1cf477cd8
Bump github.com/microsoftgraph/msgraph-sdk-go from 1.37.0 to 1.43.0 (#392)
Bumps [github.com/microsoftgraph/msgraph-sdk-go](https://github.com/microsoftgraph/msgraph-sdk-go) from 1.37.0 to 1.43.0.
- [Release notes](https://github.com/microsoftgraph/msgraph-sdk-go/releases)
- [Changelog](https://github.com/microsoftgraph/msgraph-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/microsoftgraph/msgraph-sdk-go/compare/v1.37.0...v1.43.0)

---
updated-dependencies:
- dependency-name: github.com/microsoftgraph/msgraph-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-29 17:21:12 -07:00
dependabot[bot]
b541b02b98
--- (#391)
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-29 17:21:02 -07:00
Boshi Lian
38be0fdd81
doc updates (#387)
* chore: Update sshpiperd command with additional options for key generation and log level

* chore: Update README.md with ports to other platforms

* chore: Update CONTRIBUTING.md with note about starting develop environment in vscode
2024-05-18 02:51:39 -07:00
Boshi Lian
7ae7eb68c6
Bump go.mod to use go 1.22 and update dependencies (#386) 2024-05-18 02:16:01 -07:00
Matej Trop
9cd6050812
Allow plugins to set a log formatter when TTY isn't allocated (#385) 2024-05-17 11:42:28 -07:00
Boshi Lian
70fb830dca
Merge pull request from GHSA-4w53-6jvp-gg52
* feat: Add support for allowed proxy addresses

This commit adds support for allowed proxy addresses, which allows only connections from these IP ranges to send a proxy header based on the PROXY protocol. If the allowed proxy addresses are empty, the PROXY protocol support is disabled.

* Update cmd/sshpiperd/main.go

Co-authored-by: Peter G <97112726+pgibson1-godaddy@users.noreply.github.com>

---------

Co-authored-by: Peter G <97112726+pgibson1-godaddy@users.noreply.github.com>
2024-05-09 13:53:36 -07:00
dependabot[bot]
eff7d1aca3
Bump github.com/Azure/azure-sdk-for-go/sdk/azidentity (#361)
Bumps [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/internal/v1.5.1...sdk/internal/v1.5.2)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 22:05:29 -07:00
dependabot[bot]
acba3986c8
Bump google.golang.org/grpc from 1.62.1 to 1.63.2 (#360)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.62.1 to 1.63.2.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.62.1...v1.63.2)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 22:05:19 -07:00
dependabot[bot]
9eb3366fd4
Bump github.com/Azure/azure-sdk-for-go/sdk/azcore from 1.10.0 to 1.11.1 (#357) 2024-05-08 18:03:24 -07:00
Boshi Lian
357d9b6abb
Bump go.mod to use go 1.22 and update dependencies (#374) 2024-05-08 18:02:57 -07:00
Boshi Lian
f5433267b5
chore: Update snapcraft installation command to use specific revision (#373) 2024-05-08 16:06:07 -07:00
dependabot[bot]
ec5b77c830
Bump golangci/golangci-lint-action from 4 to 6 (#372)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4 to 6.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v4...v6)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 15:12:01 -07:00
Matej Trop
73169bbace
Make the log formatter configurable (#371)
* Make the log formatter configurable

The change lets us configure the deamon and the plugins to output logs
in the JSON format, which is easier to parse/filter by log processing
tools.

* Add validation for the log-format flag
2024-05-08 15:11:18 -07:00
dependabot[bot]
7c44c2fee1
Bump golang.org/x/net from 0.21.0 to 0.23.0 (#366)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.21.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.21.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 15:02:47 -07:00
Boshi Lian
1d0dab9c80
sync crypto with upstream (#363) 2024-04-13 15:44:01 -07:00
dependabot[bot]
c83c27cb48
Bump github.com/microsoftgraph/msgraph-sdk-go from 1.36.0 to 1.37.0 (#353)
Bumps [github.com/microsoftgraph/msgraph-sdk-go](https://github.com/microsoftgraph/msgraph-sdk-go) from 1.36.0 to 1.37.0.
- [Release notes](https://github.com/microsoftgraph/msgraph-sdk-go/releases)
- [Changelog](https://github.com/microsoftgraph/msgraph-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/microsoftgraph/msgraph-sdk-go/compare/v1.36.0...v1.37.0)

---
updated-dependencies:
- dependency-name: github.com/microsoftgraph/msgraph-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 23:26:41 -07:00
dependabot[bot]
4927ca59f8
Bump k8s.io/client-go from 0.29.2 to 0.29.3 (#351)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.29.2 to 0.29.3.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.29.2...v0.29.3)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 23:25:54 -07:00
dependabot[bot]
db26009258
Bump k8s.io/code-generator from 0.29.2 to 0.29.3 (#350)
Bumps [k8s.io/code-generator](https://github.com/kubernetes/code-generator) from 0.29.2 to 0.29.3.
- [Commits](https://github.com/kubernetes/code-generator/compare/v0.29.2...v0.29.3)

---
updated-dependencies:
- dependency-name: k8s.io/code-generator
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 00:07:00 -07:00
dependabot[bot]
d13d2a7a31
Bump k8s.io/api from 0.29.2 to 0.29.3 (#349)
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.29.2 to 0.29.3.
- [Commits](https://github.com/kubernetes/api/compare/v0.29.2...v0.29.3)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 00:06:53 -07:00
dependabot[bot]
ca4e956ec8
Bump github.com/docker/docker (#344)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 24.0.7+incompatible to 24.0.9+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v24.0.7...v24.0.9)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-24 03:07:19 -07:00