gitea

Development moved to Codeberg


date: "2016-12-01T16:00:00+02:00" title: "Authentication" slug: "authentication" weight: 10 toc: false draft: false menu: sidebar: parent: "features" name: "Authentication" weight: 10

identifier: "authentication"

Authentication

{{< toc >}}

LDAP (Lightweight Directory Access Protocol)

Both the LDAP via BindDN and the simple auth LDAP share the following fields:

LDAP via BindDN

Adds the following fields:

LDAP using simple auth

Adds the following fields:

Verify group membership in LDAP

Uses the following fields:

PAM (Pluggable Authentication Module)

To configure PAM, set the 'PAM Service Name' to a filename in /etc/pam.d/. To work with normal Linux passwords, the user running Gitea must have read access to /etc/shadow.

Note: PAM support is added via build-time flags, and the official binaries provided do not have this enabled.

SMTP (Simple Mail Transfer Protocol)

This option allows Gitea to log in to an SMTP host as a Gitea user. To configure this, set the fields below:

FreeIPA

  dn: uid=gitea,cn=sysaccounts,cn=etc,dc=example,dc=com
  changetype: add
  objectclass: account
  objectclass: simplesecurityobject
  uid: gitea
  userPassword: secure password
  passwordExpirationTime: 20380119031407Z
  nsIdleTimeout: 0
  ldapmodify -h localhost -p 389 -x -D \
  "cn=Directory Manager" -W -f gitea.ldif
  ipa group-add --desc="Gitea Users" gitea_users

SPNEGO with SSPI (Kerberos/NTLM, for Windows only)

Gitea supports SPNEGO single sign-on authentication (the scheme defined by RFC4559) for the web part of the server via the Security Support Provider Interface (SSPI) built in Windows. SSPI works only in Windows environments - when both the server and the clients are running Windows.

Before activating SSPI single sign-on authentication (SSO) you have to prepare your environment:

  setspn -A HTTP/host.domain.local domain\user