Skip to content

oauth2 protected service to service communication using service account tokens from kubernetes #291

Answered by vinckr
sjvaiz asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @sjvaiz

I havent tried this myself and the documentation does not contain specific information about using Kubernetes service account tokens to exchange for access tokens with Ory.

However, Ory does support the use of JWTs for OAuth 2.0 Grants, which allows a client to send a signed JWT token to an OpenID Connect Provider in exchange for an OAuth 2.0 access token read more here.
You can establish a trust relationship using the trustOAuth2JwtGrantIssuer function as shown here:

import { Configuration, OAuth2Api } from "@ory/client"  
  
const ory = new OAuth2Api(  
 new Configuration({  
 basePath: `https://${process.env.ORY_PROJECT_SLUG}.projects.oryapis.com`,  
 accessToken: process.e…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vinckr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants