Authentication in Xef Server
javipacheco opened this issue · comments
Javier Pérez Pacheco commented
The objective of this issue is to create a way to store organizations, projects and users in the server and find a way to create tokens for each user.
The provider tokens (OpenAI. Google Cloud, etc.) should be stored in the database for every user and should be used in the endpoint depending on the model
José Carlos Montañez commented
Relations proposal:
flowchart TD
A[Users]
B[Projects]
C[Organisation]
D[Tokens]
A -->|n - n| C
B -->|1 - n| C
D -->|1 - n| A
D -->|1 - 1| B
Javier Pérez Pacheco commented
The server is going to contain 4 entities in order to manage authorization in our calls:
Organisation
: contains the name of the different organisationsProjects
: all of the projects where we can create tokens. This entity has a relationship toOrganization
Users
: the users must have permission in the organization in order to be able to create token in the projectsTokens
: this entity has a relationship toUsers
andProjects
and contains the real token for OpenAI and Google Cloud. This entity also has axef-token
that we are going to use in our calls to AI