cloudoperators / heureka

Security and compliance management
Apache License 2.0
3 stars 1 forks source link

feat(authN): Refactor User Entity #85

Open lolaapenna opened 1 month ago

lolaapenna commented 1 month ago

Remove SAP affiliations from the user attributes and make it Unique User ID

drochow commented 1 month ago

You have sapID mentioned on multiple locations within the Project, having as a central unit the Entity and its filters:

https://github.com/cloudoperators/heureka/blob/main/internal/entity/user.go#L11 https://github.com/cloudoperators/heureka/blob/main/internal/entity/user.go#L20

This is as well present on the other Layers, e.g.: https://github.com/cloudoperators/heureka/blob/main/internal/database/mariadb/user.go#L19 https://github.com/cloudoperators/heureka/blob/main/internal/api/graphql/graph/schema/user.graphqls#L6

We need to rename those to uid. or uniqueUserId.

@MR2011 What do you think is the more appropriate name?

drochow commented 1 month ago

after internal discussion we aligned on uniqueUserId

drochow commented 1 month ago

To prepare the Token Based Authentication and differentiation of Human users from Technical Users, please add as well the type property for a user, which should be an enum that accepts: "technical" and "user". The enum should be enforced on all layers (including the Database)

michalkrzyz commented 1 month ago

@drochow What about UserFilter? Would you like to have entity.UserFilter to be extended for user type enum?