Automated OAuth 2.0 Authorization Code Flow in CI/CD Pipeline with Postman CLI

120 Views Asked by At

Description:

I am working on setting up a CI/CD pipeline using GitLab, and I'm using Postman CLI to automate OAuth 2.0 flows for testing purposes. The specific scenario involves the OAuth 2.0 Authorization Code Flow, and I'm facing challenges in automating the flow without manual user interaction.

Context:

Authorization Server: OpenIddict CI/CD Platform: GitLab Tool Used: Postman CLI (Newman)

Challenge:

Due to the nature of CI/CD pipelines, there is no manual user interaction available to complete the authorization process. I need to obtain OAuth tokens programmatically without user input.

Current Approach:

I initially tried adapting the Postman collection to the Authorization Code Flow, but this requires manual interaction during the process. The environment includes a GitLab CI/CD runner.

Question:

What is the recommended approach or best practice for automating the OAuth 2.0 Authorization Code Flow in a CI/CD pipeline using Postman CLI? Is there a way to obtain tokens without manual user interaction, perhaps using client credentials directly?

I appreciate any insights, examples, or suggestions on how to achieve this within the constraints of a CI/CD environment.

0

There are 0 best solutions below