Skip to content

Add newly created users after a LDAP authentication to group Analysts#247

Merged
whikernel merged 2 commits into
dfir-iris:developfrom
c8y3:add_users_created_from_ldap_in_group_analysts
May 24, 2023
Merged

Add newly created users after a LDAP authentication to group Analysts#247
whikernel merged 2 commits into
dfir-iris:developfrom
c8y3:add_users_created_from_ldap_in_group_analysts

Conversation

@c8y3

@c8y3 c8y3 commented May 17, 2023

Copy link
Copy Markdown
Contributor

When IRIS_AUTHENTICATION_CREATE_USER_IF_NOT_EXIST is true and the authentication type is ldap, then users that do not yet exist in the IRIS database are automatically created during their first login.
This is a proposition to also add these newly created users into the group Analysts. Otherwise, they can't do much with the tool.
This suits best to our current use-case. However, there are probably alternatives. For instance, the default permissions/groups could be configurable, or maybe extracted from the ldap...

Note: in order to avoid code duplication, I introduced method ac_get_group_analysts in app.iris_engine.access_control.utils (it's called from both the post_init and ldap_handler). However, I hesitated about where to put this method: it may equally well find itself in app.datamgmt.manage.manage_groups_db, or yet some other place...

…ation, it is also added to the 'Analysts' group
@whikernel

Copy link
Copy Markdown
Contributor

Hi @c8y3

Thanks for the PR! Indeed, this change might be a little too specific. Something we'd like to add is the ability to map a LDAP group to an IRIS group. That would be more flexible.

What do you think?

…roup into which newly created users are added
@c8y3

c8y3 commented May 24, 2023

Copy link
Copy Markdown
Contributor Author

Yes, indeed that's right.
Maybe, as an intermediate more flexible step what about having the possibility to configure the group into which newly created users will be added? To that end, I modified this PR with the addition of the configuration variable IRIS_NEW_USERS_DEFAULT_GROUP.
Let me know what you think.

@whikernel whikernel changed the base branch from master to develop May 24, 2023 07:53

@whikernel whikernel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is indeed! Thanks :)

@whikernel whikernel self-assigned this May 24, 2023
@whikernel whikernel added the enhancement New feature or request label May 24, 2023
@whikernel whikernel added this to the v2.2.1 milestone May 24, 2023
@whikernel whikernel merged commit 76685a1 into dfir-iris:develop May 24, 2023
@c8y3 c8y3 deleted the add_users_created_from_ldap_in_group_analysts branch May 31, 2023 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants