-
Notifications
You must be signed in to change notification settings - Fork 162
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
Fix LDAP group mirroring #465
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this pull request, @Paktosan.
Good catch! Let's improve the schema to match all possibilities as per documentation: https://django-auth-ldap.readthedocs.io/en/latest/reference.html#auth-ldap-mirror-groups
Thus, see my inline suggestions.
The chart version also needs to be bumped.
charts/netbox/values.schema.json
Outdated
@@ -1060,7 +1060,7 @@ | |||
"type": "boolean" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"type": "boolean" | |
"type": ["boolean", "string", "array"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see, in what case this may be a String. I do however agree, that we should pick up array as an option.
charts/netbox/values.schema.json
Outdated
@@ -1060,7 +1060,7 @@ | |||
"type": "boolean" | |||
}, | |||
"mirrorGroupsExcept": { | |||
"type": "string" | |||
"type": "array" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"type": "array" | |
"type": ["null", "string", "array"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://django-auth-ldap.readthedocs.io/en/latest/reference.html#auth-ldap-mirror-groups-except says, this has to be an Array or None. So when would it be a String?
This fixes an error likely introduced in 04c18cd which prevents configuring a working LDAP setup with this chart.
Currently the chart forces
mirrorGroupsExcept
to be a string which results in Netbox throwing the following error when trying to log in:With the proposed change, the correct type is set in the schema and a sensible default in the
values.yaml
is added.