SAML username bad attribute map

Description

We use SAML auth, it works fine , except that at first login , username are created based on the firstname.lastname template, and not as I configured the attribute Mapping:
{“username”:“eppn”, “email”:“mail”, “name”: “urn:oid:2-5-4-4”}
I want username to be created based on eduPersonPrincipalName (eppn)

I set SAML to debug mode, hence here are detail log when user uid:testsp eppn: testsp@imt.eu , mail pierre.test@imtbstsp.eu connects :
“nameID”:“BBqY/dnZ0dXoU4kCRw0b9UhV7rI=”,“nameIDFormat”:“urn:oasis:names:tc:SAML:2.0:nameid-format:persistent”,“sessionIndex”:"_0fc79e3c103ae9b0a15dde83623c778e",“mail”:“pierre.testsp@imtbstsp.eu”,“eppn”:“testsp@imt.eu”,“email”:“pierre.testsp@imtbstsp.eu”,“urn:oid:2-5-4-42”:“Pierre”,“urn:oid:2-5-4-4”:“TESTSP”,“urn:oid:1-3-6-1-4-1-5923-1-1-1-6”:“testsp@imt.eu”,“urn:oid:1-3-6-1-4-1-5923-1-1-1-1”:[“employee”,“member”],“urn:oid:1-3-6-1-4-1-7391-5-1-1-1”:“ebcbc3a3-dbc6-4a6b-95ec-9502b2370dc3”,“urn:oid:0-9-2342-19200300-100-1-3”:“pierre.testsp@imtbstsp.eu”,“urn:oid:0-9-2342-19200300-100-1-1”:“pierre.testsp@imtbstsp.eu”}}
Mar 25 22:09:41 rkc rocketchat[33662]: steffo:meteor-accounts-saml ➔ info parsed userDataMap {
Mar 25 22:09:41 rkc rocketchat[33662]: customFields: Map {},
Mar 25 22:09:41 rkc rocketchat[33662]: attributeList: Set { ‘eppn’, ‘mail’, ‘urn:oid:2-5-4-4’ },
Mar 25 22:09:41 rkc rocketchat[33662]: email: { fieldName: ‘mail’ },
Mar 25 22:09:41 rkc rocketchat[33662]: username: { fieldName: ‘eppn’ },
Mar 25 22:09:41 rkc rocketchat[33662]: name: { fieldName: ‘urn:oid:2-5-4-4’ },
Mar 25 22:09:41 rkc rocketchat[33662]: identifier: { type: ‘email’ }
Mar 25 22:09:41 rkc rocketchat[33662]: }

unfortunatly the user is finnaly created with
username = firstname.lastname
and not from the eppn attribute value !?
it seems as if username was created in the greyed config box of User Data Field Map

"username": {
    "fieldName": "mail",
    "regex": "(.*)@.+$",
    "template": "user-__regex__"
  },

this config is supposed to be a sample, not in production !?
I cannot modify it in the web interface, it is “greyed”

thanks

Server Setup Information

  • Version of Rocket.Chat Server: 3.11.0
  • Operating System: centos8
  • Deployment Method: tar
  • Number of Running Instances: one
  • DB Replicaset Oplog:
  • NodeJS Version: v12.18.4
  • MongoDB Version: mongodb-org-server-4.2.12-1.el8
  • Proxy: apache
  • Firewalls involved: firewalld

Any additional Information