You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve documentation for PAM and static deployment (#21866)
## Changes proposed in [referenced issue 21845][1]
- Expand PAM configuration description with working examples.
- Clarify `STATIC_URL_PREFIX` use (include "assets" and only works after
database has been initialized)
- Add note for HTTPS proxy support VIA Apache.
[1]: #21845
Copy file name to clipboardExpand all lines: docs/content/doc/features/authentication.en-us.md
+41-5Lines changed: 41 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -166,11 +166,47 @@ Uses the following fields:
166
166
167
167
## PAM (Pluggable Authentication Module)
168
168
169
-
To configure PAM, set the 'PAM Service Name' to a filename in `/etc/pam.d/`. To
170
-
work with normal Linux passwords, the user running Gitea must have read access
171
-
to `/etc/shadow`.
172
-
173
-
**Note**: PAM support is added via [build-time flags](https://docs.gitea.io/en-us/install-from-source/#build), and the official binaries provided do not have this enabled.
169
+
This procedure enables PAM authentication. Users may still be added to the
170
+
system manually using the user administration. PAM provides a mechanism to
171
+
automatically add users to the current database by testing them against PAM
172
+
authentication. To work with normal Linux passwords, the user running Gitea
173
+
must also have read access to `/etc/shadow` in order to check the validity of
174
+
the account when logging in using a public key.
175
+
176
+
**Note**: If a user has added SSH public keys into Gitea, the use of these
177
+
keys _may_ bypass the login check system. Therefore, if you wish to disable a user who
178
+
authenticates with PAM, you _should_ also manually disable the account in Gitea using the
179
+
built-in user manager.
180
+
181
+
1. Configure and prepare the installation.
182
+
- It is recommended that you create an administrative user.
183
+
- Deselecting automatic sign-up may also be desired.
184
+
1. Once the database has been initialized, log in as the newly created
185
+
administrative user.
186
+
1. Navigate to the user setting (icon in top-right corner), and select
187
+
`Site Administration` -> `Authentication Sources`, and select
188
+
`Add Authentication Source`.
189
+
1. Fill out the field as follows:
190
+
-`Authentication Type` : `PAM`
191
+
-`Name` : Any value should be valid here, use "System Authentication" if
192
+
you'd like.
193
+
-`PAM Service Name` : Select the appropriate file listed under `/etc/pam.d/`
194
+
that performs the authentication desired.[^1]
195
+
-`PAM Email Domain` : The e-mail suffix to append to user authentication.
196
+
For example, if the login system expects a user called `gituser`, and this
197
+
field is set to `mail.com`, then Gitea will expect the `user email` field
0 commit comments