Skip to content

Commit

Permalink
:note: (doc): Update README.md
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Nicolaie <xunleii@users.noreply.github.com>
  • Loading branch information
xunleii committed May 24, 2024
1 parent 40bedae commit 90ecead
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 24 deletions.
102 changes: 78 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,88 @@
# yaLDAP: yet another LDAP
<!-- markdownlint-disable MD033 -->
<h1 align="center">
chezmoi.sh · yaLDAP
<br/>
<img src="assets/9f0b3036-377c-4c59-a1aa-b7676401b305.png" alt="White Malamut puppy as logo" height="250px">
</h1>

yaLDAP is an easy-to-use LDAP server using YAML file as directory definition.
<h4 align="center">yaLDAP - Yet Another LDAP</h4>

<div align="center">

![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/chezmoi-sh/yaldap)
[![Test code (Go)](https://github.com/chezmoi-sh/yaldap/actions/workflows/merge_group,pull_request.go.test.yaml/badge.svg?event=push)](https://github.com/chezmoi-sh/yaldap/actions/workflows/merge_group,pull_request.go.test.yaml)
[![CodeQL](https://github.com/chezmoi-sh/yaldap/actions/workflows/pull_request,push,schedule.codeql.yaml/badge.svg)](https://github.com/chezmoi-sh/yaldap/actions/workflows/pull_request,push,schedule.codeql.yaml)
[![codecov](https://codecov.io/gh/chezmoi-sh/yaldap/branch/main/graph/badge.svg?token=20J4XPYH1H)](https://codecov.io/gh/chezmoi-sh/yaldap)
[![Go Report Card](https://goreportcard.com/badge/github.com/chezmoi-sh/yaldap)](https://goreportcard.com/report/github.com/chezmoi-sh/yaldap)

[![License](https://img.shields.io/badge/license-AGPL%20v3-blue?logo=git&logoColor=white&logoWidth=20)](LICENSE)

<a href="#information_source-about">About</a> ·
<a href="#-getting-started">Getting Started</a> ·
<a href="#arrow_forward-how-to-use-yaldap">How to use yaLDAP</a> ·
<a href="#wrench-configuration">Configuration</a> ·
<a href="#octocat-contribution">Contribution</a> ·
<a href="#ledger-license">License</a>

</div>

---

<!-- markdownlint-enable MD033 -->


## :information_source: About

yaLDAP is an easy-to-use LDAP server using YAML file as directory definition.


_Sometimes, we just need a simple LDAP compatible server to store user/group information and other information.
For this purpose, many simple LDAP server exists and manage user/group in a better way than yaLDAP. However, no one can
have a fully customisable LDAP directory that can be used to store information or to follow a specific directory structure._
**_I don't recommend to use this project for other thing than dev or homelab purpose; this LDAP server is not _(yet)_
compliant with the LDAP RFCs._**
have a fully customisable LDAP directory that can be used to store information or to follow a specific directory structure.
**This is why yaLDAP exists: to provide a simple LDAP server that can be used to store any kind of information in a
customisable way.**_

> [!CAUTION]
> _I don't recommend to use this project for other thing than dev or homelab purpose; this LDAP server is not _(yet)_
> compliant with the LDAP RFCs._
## 🚀 Getting Started

### Installing

> [!NOTE]
> yaLDAP is still in development and is not yet available other than as a Go installable package.
To start using yaLDAP, you need to install Go 1.20 or above. It is provided as a CLI directly installable from
Go, so you can install it using

```sh
go install github.com/chezmoi-sh/yaldap/cmd/yaldap@latest
```

## Usage
## :arrow_forward: How to use yaLDAP

## Configuration
To run yaLDAP, you need to provide a backend to use. Currently, only the YAML backend is available.
For example, to run yaLDAP with the YAML backend, you can use the following command:

```sh
yaldap run --backend.name yaml --backend.url <path-to-yaml-file>
```

Also, yaLDAP is ship with a set of tools that can be used to manage some part of the LDAP configuration, like hashing.
For example, to hash a password using bcrypt, you can use the following command:

```sh
echo -n "password" | yaldap tools hash bcrypt --rounds 10 -
$bcrypt$v=0$r=10$$24326124313024504b374745686b483639377870322f37367676397965792e5155752f5763383941532f44476d385a4a725555437637536b5133684b
```

For more information about the tools, you can use the following command:

```sh
yaldap tools --help
```

## :wrench: Configuration

### YAML

Expand Down Expand Up @@ -103,22 +169,10 @@ dc:org: #dn: dc=org
userPassword: eve
```
### Hashed passwords
In order to avoid storing clear text passwords in the YAML file, yaLDAP supports hashed passwords.
Currently, only `argon2`, `bcrypt`, `pbkdf2` and `scrypt` are supported.
## :octocat: Contribution
#### How to hash a password
If you want to contribute to yaLDAP, you can follow the [CONTRIBUTING.md](CONTRIBUTING.md) file.
```sh
echo -n "<password>" | yaldap tools hash <alogrithm> [<options>] -
```

For example, to hash a password using `bcrypt` and a cost of 10:

```sh
$ echo -n "password" | yaldap tools hash bcrypt --rounds 10 -
$bcrypt$v=0$r=10$$243261243130247935525748646434736f52794a2e474f3162714856755331496c616e54384b4d387346494a746c6b3141776e7a6c36736f377a6471
```
## :ledger: License
## Contribution
yaLDAP is licensed under the AGPL v3 License. See the [LICENSE](LICENSE) file for more information.
Binary file added assets/9f0b3036-377c-4c59-a1aa-b7676401b305.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 90ecead

Please sign in to comment.