[ENH] - Add User
object to database
#930
Labels
area: workflow-improvements
Issue is affected by upcoming workflow improvements
needs: discussion 💬
This item needs team-level discussion before scoping
needs: testing ✅
roadmap: UX Experience
type: enhancement 💅🏼
Feature description
Currently,
conda-store
doesn't have the concept of aUser
. This leads to much confusion amongconda-store users and devs because:
docker compose up --build
to bring upconda-store
locally and then navigate tohttps://localhost:8080, you are presented with a login screen, suggesting that you need user
credentials
nebari
, you have to login with keycloakconda-store
has a robust permissioning systemIn actuality,
conda-store
doesn't store user credentials at all. Nebari users login with keycloak,which then mints a token that contains a user's role bindings for
conda-store
; then every requestsent to
conda-store-server
includes this token, whichconda-store
processes and uses to knowwhat environments/namespaces are available to the person who made the web request.
The effect of this choice is that we don't have to manage user credentials or keep track of users,
but at the cost of a lot of internal code complexity and developer confusion.
This issue is to start the discussion about adding a User table to the database. Potential issues:
Other notes
Currently, we are managing Roles using just python strings; i.e. there's no
Role
enum defined anywhere. In any context where we need to enforce a certain level of access, we do string comparison to figure out whether someone has the required role bindings to do the action.Additionally we have an
Enum
class forPermissions
, which are used for restricting access for certainconda-store
actions, e.g.environment::create
.Value and/or benefit
Key Workflows
A working implementation must
User
,Role
, andPermission
tablesUser
to haveadmin
,viewer
, oreditor
Role
for various namespace/environment rules.Role
toPermission
entries; e.g. aUser
with theeditor
Role
for namespace/environment*/foo
, should be able to create or edit environments namedfoo
in any namespace.The text was updated successfully, but these errors were encountered: