Skip to content
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

feat: exchange Metal API keys for LB API OAuth2 tokens #3

Merged
merged 6 commits into from
Sep 28, 2023

Conversation

ctreatma
Copy link
Collaborator

This adds an oauth2.TokenSource that uses the token exchange endpoint to request an OAuth2 JWT for the given API key.

The TokenSource is added to the context under the lbaas.ContextOAuth2 context key. The load balancer API client automatically looks for a TokenSource under that key, uses it to get the OAuth2 token, and adds the token to outgoing requests.

@ctreatma ctreatma marked this pull request as draft September 27, 2023 19:01
return err
}

// 3. Add the annotations
Copy link
Collaborator Author

@ctreatma ctreatma Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ID of the load balancer
  • Name of the load balancer
  • Metro of the load balancer
  • IP address of the load balancer
  • Listener port that this service is using

@ctreatma ctreatma marked this pull request as ready for review September 28, 2023 20:05
@ctreatma ctreatma merged commit 4351e3c into cprivitere:emlb Sep 28, 2023
@ctreatma ctreatma deleted the emlb-oauth branch September 28, 2023 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants