Commit graph

8 commits

Author SHA1 Message Date
Boshi Lian
ca311e15cd
refactor: Revise Dockerfile - Remove entrypoint.sh (#598)
* chore: Formatting

* chore: Formatting (fix indent)

* refactor: Remove entrypoint

* chore: Remove `entrypoint.sh` from `.goreleaser.yaml`

* tests: Replace `entrypoint.sh` script usage in `e2eentry.sh`

* Set default plugin argument from environment variable in main function and update Dockerfile to remove CMD instruction

* Add user and group setup for testing in Dockerfile and update e2e entry script

* Update cmd/sshpiperd/main.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update cmd/sshpiperd/main.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove test user and group creation from Dockerfile and move it to e2e entry script; update plugin argument handling in main function

* Update Dockerfile

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Skip empty plugin directory entries in main function

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-25 02:11:04 -07:00
eesaanatluri
4fce1dcb45
feat: Decide upstream based on user's unix group membership (#536)
* feat: Decide upstream based on user's unix group membership

If a username is not defined, groupname is parsed. Check if the
user is part of that group and route them to the associated host
defined in the config file for the yaml plugin

* style: fix formatting with gofmt

* feat: Look up user groups only when groupname defined in yaml config

* fix: inefficient assignment because of unused var

* feat: fallback to next rule on group lookup failure

Instead of failing on group lookup errors, the matcher now skips the
groupname rule and proceeds to the next, eventually failing through to
the catchall rule.

* feat: test cases for group based routing in yaml plugin

* Revert "feat: fallback to next rule on group lookup failure"

This reverts commit 622ee9f1eb3157d04f57c068179bb74de8db3a1f.

Handles the error returned by getUserGroups instead of ignoring it,
to prevent potential runtime issues when user lookup fail

* feat: Check if a user is known to the system before group lookup

This will let the rule matching logic skip to the next pipe in the yaml
config when a user is not found on the system.
Note the variable name change from user to username to avoid ambiguity
dur to name collision with os/user package.

* feat: Avoid redundant user lookup

* feat: Improve error handling for user and group lookup failures

* feat: Use appropriate test user name for group routing
2025-04-07 23:53:16 -07:00
Boshi Lian
e96e3f6a3a
Customize sshd with sshd config.d (#525)
* Update OpenSSH server image version and add no penalties configuration

* Refactor SSH configuration paths and update test scripts for public key handling

* Update Docker Compose volumes to remove read-only flag for shared directory

* Remove end-to-end test files and related Docker configuration for CA public cert authentication
2025-02-16 23:19:41 -08:00
Boshi Lian
694d09affd
support password match/ca publickey for kubernetes (#211)
* add testcase

* refine testcases

* fix tab

* happy ql

* inline timeout

* add ca support for k8s
2023-08-26 18:07:36 -07:00
Matthew Atkinson
13fcc8c0a8
Add support for using CA certs for upstream ssh connection (#210) 2023-08-25 17:32:49 -07:00
Boshi Lian
740e31dffc
default to ed25519 (#111)
* s/rsa/ed25519/g

* s/rsakey/ed25519key/g

* ed25519 server key
2022-12-09 06:10:49 -08:00
Boshi Lian
56afc57050 add CONTRIBUTING.md 2022-07-08 01:26:19 +00:00
Boshi Lian
5e9f689999 move e2e piper process manager to go code 2022-07-08 01:26:19 +00:00