oauth2l | simple CLI for interacting with Google API authentication | OAuth library
kandi X-RAY | oauth2l Summary
kandi X-RAY | oauth2l Summary
oauth2l supports all Google OAuth 2.0 authentication flows for both user accounts and service accounts in different environments:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of oauth2l
oauth2l Key Features
oauth2l Examples and Code Snippets
Community Discussions
Trending Discussions on oauth2l
QUESTION
Update Thanks to @levi-harrison, I wrote a solution gcp-oidc-token-proxy
I'd like to scrape Cloud Run services that require (Google) authentication but this solution would be generally applicable to any endpoint secured by Google auth'd identities.
Equivalently, I can:
...ANSWER
Answered 2021-Oct-02 at 19:31Prometheus OAuth 2.0 authentication specifically supports the Client Credentials grant type, which uses the client_id
and client_secret
as credentials to request a token from the token_url
. The Google's OAuth 2.0 guide seems to describe using the JWT Bearer grant type, which is not supported by Prometheus.
You might want to look into the stackdriver_exporter, and also this thread.
QUESTION
I want to get the Oauth token from the GCP client credentials. Reference
...ANSWER
Answered 2020-Jun-03 at 14:43Okay, I realized that the http client is not to be used to connect directly. JWT offers another API, tokensource which should be used.
This reference was incorrect as I was confused with the goDoc's service account example.
The code should look like this->
QUESTION
My team is currently developing an application to list my company's domain users in GCP, using the Admin SDK, for onboarding and offboarding purposes.
We're using a service account to do this and we've have added the admin.directory.user.readonly
scope, in the Google Admin's advanced settings, to it. The Admin SDK API is activated and we can see the service account in the Credentials area.
When we invoke the https://www.googleapis.com/admin/directory/v1/users endpoint with the parameters viewType=domain_public
and domain=[our domain]
, while using an access token generated with oauth2l, we receive the following message:
ANSWER
Answered 2020-Feb-06 at 13:54The service account does not have permission to call Directory APi for your G Suite instance. What it does have access to do is act as a user in your domain within the context of the Directory API scope(s) you granted it access to.
When getting service account credentials you need to add the sub=admin@yourdomain.com parameter so that you are acting as your domain admin, not the service account. See:
https://developers.google.com/identity/protocols/OAuth2ServiceAccount
And some code examples at:
https://developers.google.com/admin-sdk/directory/v1/guides/delegation
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install oauth2l
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page