diff --git a/README.md b/README.md index 9707820..91ddb26 100644 --- a/README.md +++ b/README.md @@ -364,6 +364,7 @@ folder for help with: - [Authentik](example_configs/authentik.md) - [Bookstack](example_configs/bookstack.env.example) - [Calibre-Web](example_configs/calibre_web.md) +- [Carpal](example_configs/carpal.md) - [Dell iDRAC](example_configs/dell_idrac.md) - [Dex](example_configs/dex_config.yml) - [Dokuwiki](example_configs/dokuwiki.md) diff --git a/example_configs/carpal.md b/example_configs/carpal.md new file mode 100644 index 0000000..a8ad58b --- /dev/null +++ b/example_configs/carpal.md @@ -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.