aboutsummaryrefslogtreecommitdiff
path: root/conf/auth.d
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2018-04-12 09:55:58 -0400
committerUnknwon <u@gogs.io>2018-04-12 09:55:58 -0400
commitf2ecfdc96a338815ffb2be898b3114031f0da48c (patch)
tree68e98cdb346e8d57e7d1b25169b391dd7afc0037 /conf/auth.d
parent717d409b7273f7874c38268e1b908596277dacac (diff)
auth: support authentication source config file (#3142)
Diffstat (limited to 'conf/auth.d')
-rw-r--r--conf/auth.d/ldap_bind_dn.conf.example29
-rw-r--r--conf/auth.d/ldap_simple_auth.conf.example30
-rw-r--r--conf/auth.d/pam.conf.example10
-rw-r--r--conf/auth.d/smtp.conf.example16
4 files changed, 85 insertions, 0 deletions
diff --git a/conf/auth.d/ldap_bind_dn.conf.example b/conf/auth.d/ldap_bind_dn.conf.example
new file mode 100644
index 00000000..d2400f07
--- /dev/null
+++ b/conf/auth.d/ldap_bind_dn.conf.example
@@ -0,0 +1,29 @@
+# This is an example of LDAP (BindDN) authentication
+#
+id = 101
+type = ldap_bind_dn
+name = LDAP BindDN
+is_activated = true
+
+[config]
+host = mydomain.com
+port = 636
+# 0 - Unencrypted, 1 - LDAPS, 2 - StartTLS
+security_protocol = 0
+skip_verify = false
+bind_dn =
+bind_password =
+user_base = ou=Users,dc=mydomain,dc=com
+attribute_username =
+attribute_name =
+attribute_surname =
+attribute_mail = mail
+attributes_in_bind = false
+filter = (&(objectClass=posixAccount)(cn=%s))
+admin_filter =
+group_enabled = false
+group_dn =
+group_filter =
+group_member_uid =
+user_uid =
+
diff --git a/conf/auth.d/ldap_simple_auth.conf.example b/conf/auth.d/ldap_simple_auth.conf.example
new file mode 100644
index 00000000..5e50a74c
--- /dev/null
+++ b/conf/auth.d/ldap_simple_auth.conf.example
@@ -0,0 +1,30 @@
+# This is an example of LDAP (simple auth) authentication
+#
+id = 102
+type = ldap_simple_auth
+name = LDAP Simple Auth
+is_activated = true
+
+[config]
+host = mydomain.com
+port = 636
+# 0 - Unencrypted, 1 - LDAPS, 2 - StartTLS
+security_protocol = 0
+skip_verify = false
+bind_dn =
+bind_password =
+user_base =
+user_dn = cn=%s,ou=Users,dc=mydomain,dc=com
+attribute_username =
+attribute_name =
+attribute_surname =
+attribute_mail = mail
+attributes_in_bind = false
+filter = (&(objectClass=posixAccount)(cn=%s))
+admin_filter =
+group_enabled = false
+group_dn =
+group_filter =
+group_member_uid =
+user_uid =
+
diff --git a/conf/auth.d/pam.conf.example b/conf/auth.d/pam.conf.example
new file mode 100644
index 00000000..12f8d58f
--- /dev/null
+++ b/conf/auth.d/pam.conf.example
@@ -0,0 +1,10 @@
+# This is an example of PAM authentication
+#
+id = 104
+type = pam
+name = System Auth
+is_activated = true
+
+[config]
+service_name = system-auth
+
diff --git a/conf/auth.d/smtp.conf.example b/conf/auth.d/smtp.conf.example
new file mode 100644
index 00000000..b8881dae
--- /dev/null
+++ b/conf/auth.d/smtp.conf.example
@@ -0,0 +1,16 @@
+# This is an example of SMTP authentication
+#
+id = 103
+type = smtp
+name = GMail
+is_activated = true
+
+[config]
+# Either "PLAIN" or "LOGIN"
+auth = PLAIN
+host = smtp.gmail.com
+port = 587
+allowed_domains =
+tls = true
+skip_verify = false
+