mirror of
https://github.com/ovh/the-bastion.git
synced 2026-05-09 08:25:27 +02:00
[GH-ISSUE #178] If group name contains "key" in it, it is truncated in output #43
Labels
No labels
answered
bug
documentation
enhancement
enhancement
feature
feature
kept-open-for-info
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/the-bastion#43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jonathanmarsaud on GitHub (Apr 29, 2021).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/178
We created a group named
keylogyon The Bastion and noted that in all outputs of commands likegroupInfo --group keylogy, the group name is truncated tology.@jonathanmarsaud commented on GitHub (Apr 29, 2021):
It seems that it's tied to this as a reserved keyword
keyfor groupName (and accountName it seems).We'll consider to rename our group so, but maybe a warning should come up when such a group with reserved prefix is created
Moreover, in your regex
/^key/, what happen if somebody creates akeykeylogygroup?Thanks anyway.
Edit: Missed copy/paste.
@speed47 commented on GitHub (May 19, 2021):
Nice catch, you're right
keyis a reserved prefix, I'll add a pre-check togroupCreateto ensure such group can't be created.As you probably saw, all the bastion group names (actually, bastion group roles) are mapped to OS groups, using the "key" prefix (and some suffixes for the roles).
Removing this constraint can be done, but it needs thorough testing, to ensure there's no confusion between "a bastion group name" and "a system group mapped to a bastion group" anywhere in the code. So I'll start by just denying the creation of such groups, and lifting this limitation only when I'm sure there are no longer any side effect of prepending a group name with
key.@speed47 commented on GitHub (May 19, 2021):
Closing this issue, and opening another one (without the "bug" tag) for the future feature of supporting groups names starting with "key"