[GH-ISSUE #259] --force-key doesn't work for groups #68

Closed
opened 2026-05-07 00:18:20 +02:00 by BreizhHardware · 5 comments

Originally created by @madchrist on GitHub (Nov 2, 2021).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/259

Right now using groupAddServer (...) --force-key <key-fingerprint> always results in an invalid fingerprint error

I checked the code a little and found a few missing pieces, but there might be others:

  • bin/plugin/group-aclkeeper/groupAddServer:21 force-key should be force-key=s (which is why the fingerprint is always considered invalid)
  • bin/plugin/group-aclkeeper/groupAddServer.json doesn't support --force-key completion
  • bin/helper/osh-groupAddServer:46 is missing a force-key parameter
  • tests/functional/tests.d/ --force-key is only tested with selfAddPersonalAccess
Originally created by @madchrist on GitHub (Nov 2, 2021). Original GitHub issue: https://github.com/ovh/the-bastion/issues/259 Right now using `groupAddServer (...) --force-key <key-fingerprint>` always results in an *invalid fingerprint* error I checked the code a little and found a few missing pieces, but there might be others: * `bin/plugin/group-aclkeeper/groupAddServer:21` *force-key* should be *force-key=s* (which is why the fingerprint is always considered invalid) * `bin/plugin/group-aclkeeper/groupAddServer.json` doesn't support `--force-key` completion * `bin/helper/osh-groupAddServer:46` is missing a *force-key* parameter * `tests/functional/tests.d/` `--force-key` is only tested with `selfAddPersonalAccess`
BreizhHardware 2026-05-07 00:18:20 +02:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@speed47 commented on GitHub (Nov 2, 2021):

You pretty much nailed it! The main problem being that as you pinpointed, there are no tests for this command for groups, only for personal accesses, and we didn't stumble upon it because we rarely use --force-key, as it's only on personal accesses in our workflows. We use that only for network devices, but I'm sure this is also your use case ;)

Fixing this.

<!-- gh-comment-id:957770390 --> @speed47 commented on GitHub (Nov 2, 2021): You pretty much nailed it! The main problem being that as you pinpointed, there are no tests for this command for groups, only for personal accesses, and we didn't stumble upon it because we rarely use `--force-key`, as it's only on personal accesses in our workflows. We use that only for network devices, but I'm sure this is also your use case ;) Fixing this.
Author
Owner

@KarlAustin commented on GitHub (Mar 29, 2023):

Hi,

Just wondering if there is any news on this being fixed as it still seems to be broken in 3.11.01? The alternative at the moment is managing multiple groups (new/legacy) for items and that's no ideal.

Thanks,

Karl

<!-- gh-comment-id:1488615240 --> @KarlAustin commented on GitHub (Mar 29, 2023): Hi, Just wondering if there is any news on this being fixed as it still seems to be broken in 3.11.01? The alternative at the moment is managing multiple groups (new/legacy) for items and that's no ideal. Thanks, Karl
Author
Owner

@speed47 commented on GitHub (Mar 31, 2023):

Hello, thanks for the reminder, I have started a branch for this some time ago, but for some reason didn't finish it.
I'm scheduling this for the next release, which should be easy as >50% of the work is already done.

<!-- gh-comment-id:1491813174 --> @speed47 commented on GitHub (Mar 31, 2023): Hello, thanks for the reminder, I have started a branch for this some time ago, but for some reason didn't finish it. I'm scheduling this for the next release, which should be easy as >50% of the work is already done.
Author
Owner

@KarlAustin commented on GitHub (Mar 31, 2023):

Ah that's amazing, thank you.

<!-- gh-comment-id:1492199372 --> @KarlAustin commented on GitHub (Mar 31, 2023): Ah that's amazing, thank you.
Author
Owner

@KarlAustin commented on GitHub (Feb 26, 2025):

My apologies, I never actually got around to testing this as I'd setup a workaround (a separate group). I've come back to this today as part of a tidy-up and force-key whilst accepted when adding a server, doesn't actually force that key. I can see that it attempted to connect with the first key added to the group, not the key with the given fingerprint.

Thanks.

<!-- gh-comment-id:2684568612 --> @KarlAustin commented on GitHub (Feb 26, 2025): My apologies, I never actually got around to testing this as I'd setup a workaround (a separate group). I've come back to this today as part of a tidy-up and force-key whilst accepted when adding a server, doesn't actually force that key. I can see that it attempted to connect with the first key added to the group, not the key with the given fingerprint. Thanks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/the-bastion#68
No description provided.