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

Can we change value of uid? #132

Open
niranjanvk opened this issue Sep 19, 2024 · 1 comment
Open

Can we change value of uid? #132

niranjanvk opened this issue Sep 19, 2024 · 1 comment

Comments

@niranjanvk
Copy link

Hi,

we noticed the value of uid in ldap plugin is always same as userName, even if we are not mapping it in conf file.

Is there any particular reason of keeping this or according to our requirement we can change it?

context- we were checking if we can map the value of objectid as uid.

Thanks

@jelhub
Copy link
Owner

jelhub commented Sep 19, 2024

Not sure I understand your question.

There are two important and mandatory SCIM attributes: id and userName (or externalId)

Default provided config example for Active Directory shows

      "user": {
        "dn": {
          "mapTo": "id",
          "type": "string"
        },
        "sAMAccountName": {
          "mapTo": "userName",
          "type": "string"
        },

In this case we link SCIM userName with endpoint/ldap sAMAccountName

You are free to link according to you needs. You might not be using Active Directory and do not have any sAMAccountName attribute.

So, the answer to this issue title "Can we change value of uid" is yes if you by uid mean what is linked to userName e.g. sAMAccountName as shown in example

But keep in mind that SCIM userName must be unique within your endpoint, using firstName/lastName is not an option, using employeenumber is probably OK.

The attribute value of userName is the glue that links a unique user in both systems
In your case, this value might be the objectid you mentioned.

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

No branches or pull requests

2 participants