Skip to content

internal/outpost/ldap: type switching for uidNumber/gidNumber - #24839

Open
tacerus wants to merge 1 commit into
goauthentik:mainfrom
tacerus:up/uidnumber-gidnumber-string
Open

internal/outpost/ldap: type switching for uidNumber/gidNumber#24839
tacerus wants to merge 1 commit into
goauthentik:mainfrom
tacerus:up/uidnumber-gidnumber-string

Conversation

@tacerus

@tacerus tacerus commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Details

What does this PR change?

Treat both integer and string uidNumber/gidNumber attribute values equally.

Why is this change needed?

When the uidNumber attribute was set as an integer without an explicit gidNumber, the system would generate a gidNumber instead of mapping the uidNumber. The mapping only worked if uidNumber was set as a string.

As uidNumber/gidNumber are commonly integers, avoid the need for faking strings in the user attributes by matching the behavior.

This also reduces implementation confusion, as the documentation states

The gidNumber attribute of each virtual group is equal to the uidNumber of the user.

without imposing any limitations on the data type.

How was this tested?

Define a user with a custom uidNumber attribute. Set the attribute to a number: first a string, then an integer one. Observe the result when querying the uidNumber/gidNumber attributes of the user and the users virtual group.

Linked issues


Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)

When the uidNumber attribute was set as an integer without an explicit
gidNumber, the system would generate a gidNumber instead of mapping the
uidNumber. The mapping only worked if uidNumber was set as a string.

As uidNumber/gidNumber are commonly integers, avoid the need for faking
strings in the user attributes by matching the behavior.

This also reduces implementation confusion, as the documentation states

  The gidNumber attribute of each virtual group is equal to the uidNumber of the user.

without imposing any limitations on the data type.

Signed-off-by: Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
@tacerus
tacerus requested a review from a team as a code owner August 6, 2026 16:02
@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit cc134f8
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a74b0103b3f390008ae3033
😎 Deploy Preview https://deploy-preview-24839--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit cc134f8
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a74b0107f2d1100087c7989
😎 Deploy Preview https://deploy-preview-24839--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit cc134f8
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a74b010aa7fd60009c51e28
😎 Deploy Preview https://deploy-preview-24839--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rissson rissson changed the title internal: type switching for uidNumber/gidNumber internal/outpost/ldap: type switching for uidNumber/gidNumber Aug 6, 2026
@tacerus

tacerus commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

CI failure appears not related to my change, but let me know if I missed something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant