Repository navigation
Conversation
3a351b1 to
059e91b
Compare
|
@p-fruck this is outside my area of knowledge - can you expand a bit more on how you would see something like this being used in practice? |
|
I am not sure InvenTree should be an OIDC provider. We have only minimal user and group management features. Which was left purposely that way when I made the MFA and social provider upgrades so as to not have to maintain a secure identity provider suite and instead be a consumer of one. Are you willing to maintain this feature in a secure state for the foreseeable future? Because the second we merge this InvenTree is an identity provider and will be used as such - making it a critical security asset and possibly a target. I do not see why we would need this for federation, as long as you have unique IDs federation should work (eg. nextcloud uses the domain of the server and userid on the server). Can you lay out what you plan to implement in a feature request so we can discuss the planned architecture? Also, the sub route under |
|
I would actually be interested in what kind of federation features you have in mind? |
I am neither. I wanted to implement it as a plugin at first, but was not able because of the protected routes.
Is this also possible for extensions? I am fairly new to django and I really struggled integrating the OIDC provider into a separate extension
I'd be, since I/we will use this feature on a regular basis as explained below. UsecaseI am part of a local chaos community that interacts with other regional chaos communities on a regular basis. Since all of these communities have their own assets inside their hacker/maker spaces, we wanted to implement some kind of inventory management system and collectively agreed on using InvenTree which makes it a common standard among our communities. Since those communities are decentralized and run their own independent infrastructure, they also have different InvenTree instances and authentication providers. Since we share items across communities regularly, we wanted to have some functionality to share items across instances, so we can always keep track of the current location of our items. Since we trust the other communities, we also want to give them access to our InvenTree instance and manage the user permissions independently. Since we do not want to force other communities or individuals to some specific identity provider, we thought it would make sense for InvenTree to become its own identity provider (using the established OIDC standard) so that even communities/individuals using the integrated InvenTree (Django) accounts could authenticate against our instance using their respective account credentials. For now, this PR would allow us to give users of trusted InvenTree instances access to our instance simply by adding the foreign InvenTree instance as an OIDC provider. The users of this instance would the be able to manipulate items in our InvenTree. Based on this functionality, there should be features added in the future that allow for sharing resources like items and perhaps categories across instances using the InvenTree web GUI. Questions
|
|
Ok, you got my attention with ccc/chaos. Are you ok with moving this discussion into an issue and postponing the decision on this PR until we have a better understanding of the plan for federation? Knowing your target is chaos / the fediverse: why not use/build around ActivityPub and Mastodon? We could implement a notification provider with ActivityPub and sue Mastdons OAuth to do authentication. On a side note: A bunch of users and devs are German, I bet we have a few ppl from chaos here already. |
This draft utilizes the
django-oidc-providerpackage to allow InvenTree to act as an OIDC provider to other services. This feature can be enabled by settingINVENTREE_OIDC_PROVIDER_ENABLEDto true (default value is false). This allows InvenTree users to integrate other services with the InvenTree account management system.I am currently working towards a PoC of federation between InvenTree instances, which I wanted to develop as a separate plugin initially. Using InvenTree as an identity provider is the first step towards this goal which I could not implement into a separate plugin because I required an unprotected route for the the
.well-known/openid-configuration. The only way I could make this route unprotected was to serve it under theaccounts/route.If you would like to accept this PR I will also create some documentation to configure the OIDC provider.