From b09757d382dd891b8acf8a92d1fca1e90a4943ba Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Tue, 13 Jun 2023 00:58:14 -0400 Subject: [PATCH] Update readme --- README.md | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0abb0d6..d20a80b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,41 @@ # Docker registry -Docker registry written in Rust. +Orca is a pure-rust implementation of a Docker Registry. -This follows the [docker registry spec](https://docs.docker.com/registry/spec/api/). \ No newline at end of file +Note: Orca is still in early development ([status](#status)). + +## Features +* Low resource consumption +* Easy to deploy +* Single application and executable + +## Status +The project is still in early development, use at your own risk. Although the registry does work, and you can push and pull images from it, there is no simple way to modify user permissions and to add users to the registry. Currently, the only way to add a user and, modify their permissions, is to edit the sqlite database. + +### Adding users +These instructions are assuming the user is stored in the database, if you use LDAP auth, users are created automatically and you don't need all this. + +> Note: These instructions are subject to change or quickly become outdated without notes in the instructions. + +1. Open the sqlite database in an editor. + +2. Create a bcrypt password hash for the new user: +```shell +$ htpasswd -nB +``` + +3. Insert the new user's email, password hash into the `user_logins` table. The salt is not used, so you can put whatever there +```sql +INSERT INTO user_logins (email, password_hash, password_salt) VALUES ("example@email.com", "some password", "random salt") +``` + +4. Insert the new user into another table, `users` so the registry knows the source of the user +```sql +INSERT INTO users (username, email, login_source) VALUES ("example", "example@email.com", 0) +``` +a `login_source` of `0` means database + +5. Give the user registry permissions +```sql +INSERT INTO user_registry_permissions (email, user_type) VALUES ("example@email.com", 1) +``` +a `user_type` of `1` means admin, they have permission for all image repositories. \ No newline at end of file