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

SSO: store extra user information in the home database #752

Open
fflorent opened this issue Nov 15, 2023 · 3 comments
Open

SSO: store extra user information in the home database #752

fflorent opened this issue Nov 15, 2023 · 3 comments
Labels
enhancement New feature or request gouv.fr

Comments

@fflorent
Copy link
Collaborator

I start this discussion, with the hope to get some feedback.

At the ANCT, we would like to store some extra user information in the database, with the aim to detect through queries some illegitimate users who use our instance and remove access a posteriori.

We have thought of introducing some extra column in the users table which would just store JSON objects. The properties to store in the extra object could be defined in the environment variable (that could be crucial for admins so they comply with the GDPR if they have to).

@fflorent fflorent added enhancement New feature or request gouv.fr labels Nov 15, 2023
@fflorent
Copy link
Collaborator Author

Also it might be interesting to expose the extra object so it can be used in the ACL formulas. (I say might because part of me is reluctant to expose this information to anyone, even if we ask to the administrator to be careful because a document owner can access it)

@paulfitz
Copy link
Member

This may overlap somewhat with the options column:

@Column({name: 'options', type: nativeValues.jsonEntityType, nullable: true})
public options: UserOptions | null;

Which so far stores this kind of information:
// Non-core options for a user.
export interface UserOptions {
// Whether signing in with Google is allowed. Defaults to true if unset.
allowGoogleLogin?: boolean;
// The "sub" (subject) from the JWT issued by the password-based authentication provider.
authSubject?: string;
// Whether user is a consultant. Consultant users can be added to sites
// without being counted for billing. Defaults to false if unset.
isConsultant?: boolean;
// Locale selected by the user. Defaults to 'en' if unset.
locale?: string;
}

Maybe you could carve out an area within it for what you want?

fflorent pushed a commit to incubateur-territoires/grist-core that referenced this issue Nov 15, 2023
@fflorent
Copy link
Collaborator Author

Started working on this (timeboxed), I could add the extra info (user.options.extra) but it is not saved yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gouv.fr
Projects
Status: No status
Development

No branches or pull requests

2 participants