This commit is contained in:
Gregory Wells
2026-03-24 15:34:03 -04:00
commit 31ad22ad38
21 changed files with 1237 additions and 0 deletions

56
README.md Normal file
View File

@@ -0,0 +1,56 @@
# FreeIPA Account Manager
A simple, lightweight web application for managing user profile photos in a FreeIPA server.
## Features
* **LDAP Authentication**: Secure login with existing FreeIPA credentials.
* **Profile Management**: View user details (Display Name, Email).
* **Photo Upload**: Users can upload and update their profile picture (`jpegPhoto` attribute).
* **Session Management**: Secure, cookie-based sessions with CSRF protection.
* **Customizable**: Configurable styling (logo, favicon) and LDAP settings.
## Prerequisites
* **Go 1.20+** installed on your machine.
* Access to an **FreeIPA Server**.
* A Service Account (Bind DN) with permission to search users and modify the `jpegPhoto` attribute.
## Setup & Installation
1. **Clone the Repository**
```bash
git clone https://github.com/GregoryWells2007/account-manager.git
cd account-manager
```
2. **Configure the Application**
Copy the example configuration file to the production path:
```bash
cp data/config.example.json data/config.json
```
5. **Edit config**
put in your config values for ldap, and whatevery styling guidelines you would want to use
4. **Install Dependencies**
```bash
go mod tidy
```
5. **Run the Server**
```bash
go run src/*.go
```
The application will be available at `http://<host>:<port>`.
## Directory Structure
* `src/`: Go source code (`main.go`, `ldap.go`, `session.go`, etc.).
* `src/pages/`: HTML templates for login and profile pages.
* `static/`: CSS files, images, and other static assets.
* `data/`: Configuration files and local assets (logos).
* `avatars/`: Stores cached user profile photos.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.