-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Allow overriding the project id for a given TokenProvider #117
Comments
I'm not sure this fits in well with this crate? I think this crate is about finding ambient authentication context, including tokens and the project which the service is operating in. If you want to operate in the context of another project (but presumably using the same tokens?), I'm not convinced that should be in scope for this crate... Carrying a type like (I would suggest making (Thanks for the sponsorship, much appreciated!) |
No problem, as you say having that code in our downstream project works for us now. I will point out that other crates are relying on this information (rs-firebase-admin-sdk in our case), so others may find this useful going forward. But I can understand wanting to keep this crate focused, and if anyone else faces this difficulty they can grab this code. Maybe if many others run into this it may be worth re-examining? If you wish for now, please feel free to close this issue.
True, I can see about updating our code/the example above once I've tested it. |
Happy to keep this issue open and reconsider if more people come forward that would find this useful. |
In my company's application, we have created different GCP resources in different GCP projects, to allow us to more easily isolate what applications can access which services. We then wish to have our rust application use a service account with credentials acquired from the metadata service access resources in a different project. Similarly, we'd like the option to have our developers use their local credentials to access different projects for development purposes.
Currently, we are using our own local wrapper to provide this functionality, which looks like this:
As we found this useful, would a PR implementing this solution on the TokenProvider trait be useful to this project? I'm thinking it would be a new method,
override_project(self, project_id: String) -> impl TokenProvider
, that would return a similar ProviderWrapper.Thanks for providing this crate!
The text was updated successfully, but these errors were encountered: