Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/openldap] Correct naming and location for some organization units #51192

Closed
wants to merge 2 commits into from

Conversation

barsikus007
Copy link
Contributor

Description of the change

Fix of #19716 issue

Benefits

Correct and predictable location of groups organization unit (E.g. https://hub.docker.com/r/wheelybird/ldap-user-manager image expect to see groups in separate ou than users)

Possible drawbacks

It could break some configs, which is targeted to previous schema and env variables

Applicable issues

Additional information

@github-actions github-actions bot added the triage Triage is needed label Oct 6, 2023
@bitnami-bot bitnami-bot requested a review from javsalgar October 6, 2023 00:37
@github-actions
Copy link

This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.

@github-actions github-actions bot added the stale 15 days without activity label Oct 21, 2023
@barsikus007
Copy link
Contributor Author

hey?

@github-actions github-actions bot removed the stale 15 days without activity label Oct 23, 2023
@carrodher
Copy link
Member

Hi, please note this PR is marked as Draft, if it is ready to be reviewed, could you please mark it as Ready for review?
Screenshot 2023-10-23 at 08 16 42

@barsikus007
Copy link
Contributor Author

Oh I get it

@barsikus007 barsikus007 marked this pull request as ready for review October 23, 2023 11:59
@javsalgar javsalgar added the verify Execute verification workflow for these changes label Oct 24, 2023
@github-actions github-actions bot added in-progress and removed triage Triage is needed labels Oct 24, 2023
@bitnami-bot bitnami-bot removed the request for review from javsalgar October 24, 2023 07:46
@bitnami-bot bitnami-bot requested a review from migruiz4 October 24, 2023 07:46
Copy link

github-actions bot commented Nov 9, 2023

This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.

@github-actions github-actions bot added the stale 15 days without activity label Nov 9, 2023
Copy link
Member

@migruiz4 migruiz4 left a comment

Choose a reason for hiding this comment

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

Hi @barsikus007,

Thank you very much for your contribution, but I'm worried about how this change would affect existing users.

Do you think you could make this change backward-compatible? For example, instead of removing it, you could set LDAP_USER_OU/LDAP_GROUP_OU to LDAP_USER_DC if it was set and warn users about that environment variable being deprecated in favor of the new ones.

That way, the image functionality won't be affected and users will have time to modify their deployments, so we can safely remove the deprecated setting in a future release.

@github-actions github-actions bot removed the stale 15 days without activity label Nov 11, 2023
@barsikus007
Copy link
Contributor Author

Okay, but how to notify users about changes?

Copy link
Member

@migruiz4 migruiz4 left a comment

Choose a reason for hiding this comment

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

Please take a look at my suggestions

Comment on lines +68 to +69
export LDAP_USER_OU="${LDAP_USER_OU:-users}"
export LDAP_GROUP_OU="${LDAP_GROUP_OU:-groups}"
Copy link
Member

Choose a reason for hiding this comment

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

As in my suggestion, please keep the value LDAP_USER_DC but remove its default value.

Then, for LDAP_USER_OU and LDAP_GROUP_OU it will have the following priorities:

  1. Value provided in LDAP_USER_OU/LDAP_GROUP_OU
  2. If no value provided and LDAP_USER_DC, use value in LDAP_USER_DC.
  3. If neither LDAP_USER_OU/LDAP_GROUP_OU or LDAP_USER_DC provided, then use default values user/group.
Suggested change
export LDAP_USER_OU="${LDAP_USER_OU:-users}"
export LDAP_GROUP_OU="${LDAP_GROUP_OU:-groups}"
export LDAP_USER_DC="${LDAP_USER_DC:-}"
export LDAP_USER_OU="${LDAP_USER_OU:-${LDAP_USER_DC:-users}}"
export LDAP_GROUP_OU="${LDAP_GROUP_OU:-${LDAP_USER_DC:-groups}}"

Then, around line 174, inside ldap_validate add the following message:

if [[ -n "$LDAP_USER_DC" ]]; then
    warn "The env variable 'LDAP_USER_DC' has been deprecated and will be removed in a future release. Please use 'LDAP_USER_OU' and 'LDAP_GROUP_OU' instead."
fi

Comment on lines +189 to +190
* `LDAP_USER_OU`: Name for the user's organizational unit. Default: **users**
* `LDAP_GROUP_OU`: Name for the group's organizational unit. Default: **groups**
Copy link
Member

Choose a reason for hiding this comment

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

Finally, in the README.md, you could also warn about the deprecation:

* `LDAP_USER_OU`: Name for the user's organizational unit. Default: **users**
* `LDAP_GROUP_OU`: Name for the group's organizational unit. Default: **groups**
* `LDAP_USER_DC`: DC for the users' organizational unit. **DEPRECATED** Please use `LDAP_USER_OU` and `LDAP_GROUP_OU` instead.

Copy link

github-actions bot commented Dec 1, 2023

This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.

@github-actions github-actions bot added the stale 15 days without activity label Dec 1, 2023
Copy link

github-actions bot commented Dec 7, 2023

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary.

@github-actions github-actions bot added the solved label Dec 7, 2023
@bitnami-bot bitnami-bot added stale 15 days without activity and removed stale 15 days without activity labels Dec 7, 2023
@bitnami-bot bitnami-bot closed this Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openldap solved stale 15 days without activity verify Execute verification workflow for these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LDAP groups should be in a different OU than users
5 participants