[17.0][ADD] fastapi_auth_apikey
@simahawk @lmignon @etobella @sbidoul Let me explain the case a bit:
- Odoo APIKeys exist.
- You can't choose which FastAPI app uses each APIKey (or APIKey scope).
- This module allows you to choose APIKey authentication and specify a Scope based on the user selected in the app.
- This is a simple and maintainable use of Odoo APIKeys with FastAPI, using what Odoo has.
We've seen the module at https://github.com/OCA/server-auth/tree/17.0/auth_api_key . It provides an additional APIKey layer to the system and more maintenance, etc. However, it's more complex, and if you only want it for this FastAPI case, you'll have to maintain a much more complex module (I'm not saying it's incorrect, just that it's for more complex cases).
How would you view the use of this proposed concept?
@Tisho99 Thank you for the proposal. A first glance at the code suggests that this is very interesting. I'll try to take a closer look over the next few days.
@Tisho99 Thank you for the proposal. A first glance at the code suggests that this is very interesting. I'll try to take a closer look over the next few days.
@lmignon , have you had time to review it? 😄
Is this a duplicate of #544 ?
Is this a duplicate of #544 ?
This is the 544.
My bad I meant #539
My bad I meant #539
Owl-y shit, I hadn't seen the module. I think the idea is a little different since it's still done by scope, so it's not the idea of keeping two modules identical. I don't know what you think about this point of view; I understand that OCA would follow the other module. In my opinion, I'm not entirely convinced that you can see the API key logs. In this case, a scope is used to mask that point. For our part, I have no problem canceling this PR.
@ValentinVinagre As there was an existing module in v16 (but was never merged?) It's arguable.
But to respect other work if @Tisho99 could base his work on it, that would be nice. (especially if it needs some migration scripts)
Otherwise I like the module name fastapi_auth_api_key better. With api and key separated as the camelcase APIKey translate to api_key in snake case.
ping @henrybackman @mmequignon
Hi @yvaucher
I also don't have problem closing this PR.
At glance, both modules are similar. This one uses Odoo core API Keys, and https://github.com/OCA/rest-framework/pull/539 uses OCA's
But I'd wait for more opinions
Thank you
@ValentinVinagre As there was an existing module in v16 (but was never merged?) It's arguable.
But to respect other work if @Tisho99 could base his work on it, that would be nice. (especially if it needs some migration scripts)
Otherwise I like the module name fastapi_auth_api_key better. With api and key separated as the camelcase APIKey translate to api_key in snake case.
ping @henrybackman @mmequignon
Okay, so that's why we created this module, and the OCA module is based on the "auth_api_key_group" module, as @Tisho99 points out. This module is based on the Odoo api-key concept. Given the different approaches, I wouldn't join them. We can change the name to distinguish it. What do you think? Fastapi_auth_odoo_api_key?
@Tisho99 change name to: Fastapi_auth_odoo_api_key or Fastapi_auth_scope_api_key