moul / sshportal

:tophat: simple, fun and transparent SSH (and telnet) bastion server

Home Page:https://manfred.life/sshportal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug when unassign-group on user

mordash opened this issue · comments

Hi,
I have a bug when i try to remove group on my user sshportal.

Actual Result / Problem

`user update --unassign-group my_group my_user

error: unsupported relations: Roles`

Expected Result / Suggestion

I expect that group was removed

Some context

docker version of sshportal
image :
moul/sshportal latest 231c35fcc3c2 3 weeks ago 24.8MB

OS Type: linux
OS Architecture: amd64
Go routines: 12
Go version (build): go1.17.6
DB Driver: sqlite3
DB Conn: /var/lib/sshportal/sshportal.db
...

Best regards.

commented

I am having a similar, or maybe the same issue when configuring hop for a host.

If I create a new host and set an existing host as a hop for it (both during creation and afterwards with update), I get an error "error: unsupported relations: HopID" whenever I:

  1. try to connect to the new host that has a hop;
  2. try to unset its hop;
  3. use host ls.

I have built sshportal 1.19.3 using go 1.17.1 on commit 46970b6.

commented

Being unable to unassing groups and set hops really hinders the intended functionality. I hope this gets fixed soon.

But until then, could you please point out a commit which I could build and where these problems weren't present yet?

+1, any possible workaround?

The problem happens since 6068e6e, 01e4dcb is the last version on master not to have it.

this problem with the last version is not working, the problem persist.

config> user update --unassign-group mygroup myuser
error: unsupported relations: Roles
config>

debug mode (server): false
Demo mode: false
DB Driver: sqlite3
DB Conn: ./sshportal.db
Bind Address: :2222
System Time: 2022-05-10T10:43:59.097160911+02:00
OS Type: linux
OS Architecture: amd64
Go routines: 9
Go version (build): go1.18.1
Uptime: 5m38.672795202s
Version: n/a
GIT SHA: n/a
GIT Tag: n/a

any possible workaround?

thanks

Same problem here, would be great if that could be fixed 'cause I really like that software :-)

commented

This particular problem is fixed in the following fork:
https://github.com/vdombrovski/sshportal

UPD: here is a particular commit with the fix: db67f23

I have the same issue as @Helyk

error: unsupported relations: HopID

Although @Helyk reports a fix in #329 (comment)

This particular problem is fixed in the following fork: vdombrovski/sshportal

UPD: here is a particular commit with the fix: db67f23

It's not that obvious whether that fix applies to the "HopID" error.

Personally, I think that sshportal is abandoned enough that it's worth migrating to something that's maintained, and more usable.
I've just started using warpgate, https://github.com/warp-tech/warpgate and I've found it's a lot easier to bootstrap, configure, administrate and use in general.

Hello,

I can confirm that I'm having an issue with HopId even with my fix. I'll try to find a solution in the meantime, also I believe there are some fixes that could benefit the project, I'll push some PRs.

Likewise, also having this issue.

@vdombrovski Did you ever get your fix to work?

@Manouchehri yes I did, you can either cherry-pick from my branch, but I'll also make a PR next week.

Ah thanks, got 1f3e507 working; it turns out I was doing something wrong with my config, your fix was good the entire time. =D