•  


Username considerations for external authentication - GitHub Enterprise Server 3.12 Docs
Skip to main content

Username considerations for external authentication

When you use CAS, LDAP, or SAML for authentication, GitHub Enterprise Server follows certain rules to determine the username for each user account on your instance.

About usernames with external authentication

You can configure external authentication for GitHub Enterprise Server using CAS, LDAP, or SAML. For more information, see " About identity and access management ."

When you use external authentication, your GitHub Enterprise Server instance automatically creates a username for each person when the person signs into your GitHub Enterprise Server instance through your external authentication system for the first time.

Usernames must not exceed 39 characters.

About username normalization

Usernames for user accounts on GitHub can only contain alphanumeric characters and dashes ( - ).

When you configure CAS, LDAP, or SAML authentication, GitHub Enterprise Server uses an identifier from the user account on your external authentication provider to determine the username for the corresponding user account on GitHub Enterprise Server. If the identifier includes unsupported characters, GitHub Enterprise Server will normalize the username per the following rules.

  1. GitHub Enterprise Server will normalize any non-alphanumeric character in your account's username into a dash. For example, a username of mona.the.octocat will be normalized to mona-the-octocat . Note that normalized usernames also can't start or end with a dash. They also can't contain two consecutive dashes.

  2. Usernames created from email addresses are created from the normalized characters that precede the @ character.

  3. Usernames created from domain accounts are created from the normalized characters after the \\ separator.

  4. If multiple accounts are normalized into the same GitHub Enterprise Server username, only the first user account is created. Subsequent users with the same username won't be able to sign in.

Examples of username normalization

Identifier on provider Normalized username on GitHub Result
The.Octocat the-octocat This username is created successfully.
!The.Octocat -the-octocat This username is not created, because it starts with a dash.
The.Octocat! the-octocat- This username is not created, because it ends with a dash.
The!!Octocat the--octocat This username is not created, because it contains two consecutive dashes.
The!Octocat the-octocat This username is not created. Although the normalized username is valid, it already exists.
The.Octocat@example.com the-octocat This username is not created. Although the normalized username is valid, it already exists.
internal\\The.Octocat the-octocat This username is not created. Although the normalized username is valid, it already exists.
mona.lisa.the.octocat.from.github.united.states@example.com mona-lisa-the-octocat-from-github-united-states This username is not created, because it exceeds the 39-character limit.

About username normalization with SAML

If you configure SAML authentication for your GitHub Enterprise Server instance, GitHub Enterprise Server determines each person's username by one of the following assertions in the SAML response, ordered by descending priority.

  1. The custom username attribute, if defined and present
  2. An http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name assertion, if present
  3. An http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress assertion, if present
  4. The NameID element

GitHub Enterprise Server requires the NameID element even if other attributes are present. For more information, see " SAML configuration reference ."

GitHub Enterprise Server creates a mapping between the NameID from the IdP and the username on your GitHub Enterprise Server instance, so the NameID should be persistent, unique, and not subject to change for the lifecycle of the user.

Note : If the NameID for a user does change on the IdP, the person will see an error message when signing in to your GitHub Enterprise Server instance. To restore the person's access, you'll need to update the user account's NameID mapping. For more information, see " Updating a user's SAML NameID ."

- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본