Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ 💥 Add Authentication and ACLs #20

Merged
merged 72 commits into from
Aug 28, 2024
Merged

✨ 💥 Add Authentication and ACLs #20

merged 72 commits into from
Aug 28, 2024

Conversation

linkdd
Copy link
Contributor

@linkdd linkdd commented Aug 24, 2024

Decision Record

Access Control is an important part of any software dealing with potentially secret data (in this case, system logs).

Design

FlowG will use a Role Based Access Control design (RBAC for short). Each role will assign permissions to a specific scope. The following scopes has been identified:

Scope Name Description
read_pipelines Can see a pipeline's flow, but cannot update it nor delete it
write_pipelines Can create, read, update or delete a pipeline flow
read_transformers Can see the source code of a transformer, but cannot update it nor delete it
write_transformers Can create, read, update, or delete a transformer script
read_streams Can query a stream
write_streams Can purge a stream
read_acls Can list users and roles, but cannot update them nor delete them
write_acls Can create, read, update or delete roles and users
send_logs Can send logs to a pipeline for processing (useful for log sources)

Each user is associated to one or more roles. A user has a required password, and can have zero or more personal access tokens.

The user password will be used to login to the Web UI, while the personal access tokens will be used to access the API.

Implementation

Passwords and Personal Access Tokens will be hashed using Argon2.

The authentication system will use a separate BadgerDB database to store users and roles.

Changes

  • ✨ 🗃️ Add "auth database"
  • ✨ 🔒 Add permission validation
  • 💄 Add WebUI login view
  • 💄 Add WebUI user settings view
  • 💄 Add WebUI admin view
  • 💄 Display in WebUI only what the user has access to
  • ✨ Add API endpoints to manage roles
  • ✨ Add API endpoints to manage users
  • ✨ Add API endpoints to manage personal access tokens
  • ✨ 🔒 Add Token authentication to API
  • ✨ Add CLI to manage users and roles
  • 📝 Add documentation related to the new admin CLI usage
  • 📝 Add documentation related to the "auth database" design
  • 🔖 v0.2.0

License Agreement

  • I guarantee that I have the rights on the code submitted in this PR
  • I accept that this contribution will be released under the terms of the MIT License

@linkdd linkdd added this to the 1.0.0 milestone Aug 24, 2024
@linkdd linkdd self-assigned this Aug 24, 2024
@linkdd linkdd linked an issue Aug 24, 2024 that may be closed by this pull request
@linkdd linkdd changed the title ✨ Add Authentication and ACLs ✨ 💥 Add Authentication and ACLs Aug 28, 2024
@linkdd linkdd marked this pull request as ready for review August 28, 2024 19:02
@linkdd linkdd merged commit 04d341f into main Aug 28, 2024
2 checks passed
@linkdd linkdd deleted the auth-acl branch August 28, 2024 19:09
@linkdd linkdd mentioned this pull request Aug 29, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

✨ Authentication and ACLs
1 participant