quarkiverse / quarkus-google-cloud-services

Google Cloud Services Quarkus Extensions

Home Page:https://docs.quarkiverse.io/quarkus-google-cloud-services/main/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Firebase Admin - User authentication

zZHorizonZz opened this issue · comments

I'm currently working on the implementation of the Firebase security auth mechanism. Would there be interest in this kind of functionality? Since I'm thinking about opening PR after some polishing.

Contribution is always welcome but the cost of maintenance must be evaluated before accepting a new functionality.

Will it be a new extension or new functionality inside an existing one ?
Will it be a lot of new code ?
Will it be testable ?
Does it support native without effort ?

If you have a prototype I can have a look somewhere, I can evaluate if the maintenance cost will not be too high

Contribution is always welcome but the cost of maintenance must be evaluated before accepting a new functionality.

Will it be a new extension or new functionality inside an existing one ? Will it be a lot of new code ? Will it be testable ? Does it support native without effort ?

If you have a prototype I can have a look somewhere, I can evaluate if the maintenance cost will not be too high

I will create an example repo after I'm done with it on my personal project and will let you know.

@loicmathieu I have created a prototype of how it possibly could work.

You can find it in my fork specifically changes are in this folder.

@zZHorizonZz it nicely integrates with Quarkus security and didn't seems to be too much to maintain so I'm totally OK to integrate it in the Google Cloud Services extension pack.

Can you open a PR ?
I think it misses a switch to enable it (disabled by default).

Just to be 100% sure, a Firebase auth it for end user auth only ? It cannot be used to retrieve Google Credentials like here https://github.com/quarkiverse/quarkus-google-cloud-services/blob/main/common/runtime/src/main/java/io/quarkiverse/googlecloudservices/common/GcpCredentialProducer.java ?

Just to be 100% sure, a Firebase auth it for end user auth only ? It cannot be used to retrieve Google Credentials like here https://github.com/quarkiverse/quarkus-google-cloud-services/blob/main/common/runtime/src/main/java/io/quarkiverse/googlecloudservices/common/GcpCredentialProducer.java ?

Hi, yes what this basically does is it will just verify if the token is valid Firebase JWT through the Firebase library. This firebase JWT is just basic jwt but it can include user_id and firebase claims. Users can obtain this token via the firebase client library or the firebase admin library can provide custom tokens.

Can you open a PR ?

Yes

I think it misses a switch to enable it (disabled by default).

I didn't add any configuration since I didn't know If it will be ok for PR but I will try to add some configuration.