example_configs: Add Carpal (#916)
This commit is contained in:
parent
56ed37ef8a
commit
73686224dd
@ -364,6 +364,7 @@ folder for help with:
|
|||||||
- [Authentik](example_configs/authentik.md)
|
- [Authentik](example_configs/authentik.md)
|
||||||
- [Bookstack](example_configs/bookstack.env.example)
|
- [Bookstack](example_configs/bookstack.env.example)
|
||||||
- [Calibre-Web](example_configs/calibre_web.md)
|
- [Calibre-Web](example_configs/calibre_web.md)
|
||||||
|
- [Carpal](example_configs/carpal.md)
|
||||||
- [Dell iDRAC](example_configs/dell_idrac.md)
|
- [Dell iDRAC](example_configs/dell_idrac.md)
|
||||||
- [Dex](example_configs/dex_config.yml)
|
- [Dex](example_configs/dex_config.yml)
|
||||||
- [Dokuwiki](example_configs/dokuwiki.md)
|
- [Dokuwiki](example_configs/dokuwiki.md)
|
||||||
|
|||||||
59
example_configs/carpal.md
Normal file
59
example_configs/carpal.md
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# Configuration for Carpal
|
||||||
|
|
||||||
|
[Carpal](https://github.com/peeley/carpal) is a small, configurable
|
||||||
|
[WebFinger](https://webfinger.net) server than can pull resource information
|
||||||
|
from LDAP directories.
|
||||||
|
|
||||||
|
There are two files used to configure Carpal for LDAP:
|
||||||
|
|
||||||
|
- The YAML configuration file for Carpal itself
|
||||||
|
- A Go template file for injecting the LDAP data into the WebFinger response
|
||||||
|
|
||||||
|
### YAML File
|
||||||
|
|
||||||
|
Replace the server URL, admin credentials, and domain for your server:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# /etc/carpal/config.yml
|
||||||
|
|
||||||
|
driver: ldap
|
||||||
|
ldap:
|
||||||
|
url: ldap://myldapserver
|
||||||
|
bind_user: uid=myadmin,ou=people,dc=foobar,dc=com
|
||||||
|
bind_pass: myadminpassword
|
||||||
|
basedn: ou=people,dc=foobar,dc=com
|
||||||
|
filter: (uid=*)
|
||||||
|
user_attr: uid
|
||||||
|
attributes:
|
||||||
|
- uid
|
||||||
|
- mail
|
||||||
|
- cn
|
||||||
|
template: /etc/carpal/ldap.gotempl
|
||||||
|
```
|
||||||
|
|
||||||
|
If you have configured any user-defined attributes on your users, you can also
|
||||||
|
add those to the `attributes` field.
|
||||||
|
|
||||||
|
### Go Template File
|
||||||
|
|
||||||
|
This is an example template; the template file is intended to be editable for
|
||||||
|
your needs. If your users, for example, don't have Mastodon profiles, you can
|
||||||
|
delete the Mastodon alias.
|
||||||
|
|
||||||
|
```gotempl
|
||||||
|
# /etc/carpal/ldap.gotempl
|
||||||
|
|
||||||
|
aliases:
|
||||||
|
- "mailto:{{ index . "mail" }}"
|
||||||
|
- "https://mastodon/{{ index . "uid" }}"
|
||||||
|
properties:
|
||||||
|
'http://webfinger.example/ns/name': '{{ index . "cn" }}'
|
||||||
|
links:
|
||||||
|
- rel: "http://webfinger.example/rel/profile-page"
|
||||||
|
href: "https://www.example.com/~{{ index . "uid" }}/"
|
||||||
|
```
|
||||||
|
|
||||||
|
This example also only contains the default attributes present on all LLDAP
|
||||||
|
users. If you have added custom user-defined attributes to your users and added
|
||||||
|
them to the `attributes` field of the YAML config file, you can use them in
|
||||||
|
this template file.
|
||||||
Loading…
x
Reference in New Issue
Block a user