FusionAuth / fusionauth-issues

FusionAuth issue submission project
https://fusionauth.io
90 stars 12 forks source link

Add user link sources to the elasticsearch index #2791

Open mooreds opened 1 week ago

mooreds commented 1 week ago

Add user link sources to the elasticsearch index

Problem

I want to be able to find out the number of users in my FusionAuth database that signed in through each identity provider.

Solution

Add user link sources to the elasticsearch index so that I can query on them. The Id of the Identity Provider makes the most sense, that way we can support OIDC and SAML identity providers.

Alternatives/workarounds

Pull down every user, make a request against the links API and get the numbers that way.

Additional context

Internal: https://inversoft.slack.com/archives/C0407G6V5/p1718634909075539?thread_ts=1718633287.559109&cid=C0407G6V5

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

robotdan commented 1 week ago

In theory we could index this as part of the user, but it would likely be really slow because this is not part of the user data model currently but stored in a separate table.

Seems like it may be a stretch to make this part of the User index. We could consider adding additional search indicies, or building specific APIs to retrieve metrics such as this.